Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2017 05:45:58 +0000 (UTC)
From:      Marcin Wojtas <mw@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323172 - head/sys/arm/mv/armada38x
Message-ID:  <201709050545.v855jwL4083602@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <rk@semihalf.com>
  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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709050545.v855jwL4083602>