From owner-svn-src-head@freebsd.org Tue Sep 5 05:45:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 111A2E1B52A; Tue, 5 Sep 2017 05:45:59 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D543B764A6; Tue, 5 Sep 2017 05:45:58 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v855jwUb083603; Tue, 5 Sep 2017 05:45:58 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v855jwL4083602; Tue, 5 Sep 2017 05:45:58 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201709050545.v855jwL4083602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 5 Sep 2017 05:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323172 - head/sys/arm/mv/armada38x X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/arm/mv/armada38x X-SVN-Commit-Revision: 323172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 05:45:59 -0000 Author: mw Date: Tue Sep 5 05:45:57 2017 New Revision: 323172 URL: https://svnweb.freebsd.org/changeset/base/323172 Log: Add Armada 80x0/70x0 compatible to 38x RTC driver Marvell Armada 80x0/70x0 SoC family uses same RTC IP as Armada 38x. This patch adds Armada 8k compatible to Marvell RTC driver. Submitted by: Rafal Kozik Obtained from: Semihalf Sponsored by: Semihalf Differential Revision: https://reviews.freebsd.org/D12186 Modified: head/sys/arm/mv/armada38x/armada38x_rtc.c Modified: head/sys/arm/mv/armada38x/armada38x_rtc.c ============================================================================== --- head/sys/arm/mv/armada38x/armada38x_rtc.c Tue Sep 5 05:42:37 2017 (r323171) +++ head/sys/arm/mv/armada38x/armada38x_rtc.c Tue Sep 5 05:45:57 2017 (r323172) @@ -126,6 +126,12 @@ static driver_t mv_rtc_driver = { sizeof(struct mv_rtc_softc), }; +static struct ofw_compat_data mv_rtc_compat[] = { + {"marvell,armada-380-rtc", true}, + {"marvell,armada-8k-rtc", true}, + {NULL, false}, +}; + static devclass_t mv_rtc_devclass; DRIVER_MODULE(a38x_rtc, simplebus, mv_rtc_driver, mv_rtc_devclass, 0, 0); @@ -174,7 +180,7 @@ mv_rtc_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "marvell,armada-380-rtc")) + if (!ofw_bus_search_compatible(dev, mv_rtc_compat)->ocd_data) return (ENXIO); device_set_desc(dev, "Marvell Integrated RTC");