Date: Fri, 9 Dec 2016 19:40:33 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309754 - stable/11/sys/arm/allwinner Message-ID: <201612091940.uB9JeXFo028495@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Fri Dec 9 19:40:33 2016 New Revision: 309754 URL: https://svnweb.freebsd.org/changeset/base/309754 Log: MFC r304793 (jmcneill): Remove dependency on allwinner_soc_family() as it is not available on arm64. Modified: stable/11/sys/arm/allwinner/aw_rtc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/allwinner/aw_rtc.c ============================================================================== --- stable/11/sys/arm/allwinner/aw_rtc.c Fri Dec 9 19:36:13 2016 (r309753) +++ stable/11/sys/arm/allwinner/aw_rtc.c Fri Dec 9 19:40:33 2016 (r309754) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #define LOSC_MAGIC 0x16aa0000 #define LOSC_BUSY_MASK 0x00000380 -#define IS_SUN7I (allwinner_soc_family() == ALLWINNERSOC_SUN7I) +#define IS_SUN7I (sc->type == A20_RTC) #define YEAR_MIN (IS_SUN7I ? 1970 : 2010) #define YEAR_MAX (IS_SUN7I ? 2100 : 2073) @@ -108,6 +108,7 @@ static struct ofw_compat_data compat_dat struct aw_rtc_softc { struct resource *res; + int type; bus_size_t rtc_date; bus_size_t rtc_time; }; @@ -169,8 +170,9 @@ aw_rtc_attach(device_t dev) device_printf(dev, "could not allocate resources\n"); return (ENXIO); } - - switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { + + sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + switch (sc->type) { case A10_RTC: case A20_RTC: sc->rtc_date = A10_RTC_DATE_REG;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612091940.uB9JeXFo028495>