svn commit: r368067 - head/sys/arm/allwinner
Emmanuel Vadot
manu at FreeBSD.org
Thu Nov 26 17:19:48 UTC 2020
Author: manu
Date: Thu Nov 26 17:19:47 2020
New Revision: 368067
URL: https://svnweb.freebsd.org/changeset/base/368067
Log:
arm: allwinner: a23 timer functions are only used for arm64
Modified:
head/sys/arm/allwinner/a10_timer.c
Modified: head/sys/arm/allwinner/a10_timer.c
==============================================================================
--- head/sys/arm/allwinner/a10_timer.c Thu Nov 26 17:19:30 2020 (r368066)
+++ head/sys/arm/allwinner/a10_timer.c Thu Nov 26 17:19:47 2020 (r368067)
@@ -119,8 +119,10 @@ static uint64_t timer_read_counter64(struct a10_timer_
static void a10_timer_eventtimer_setup(struct a10_timer_softc *sc);
#endif
+#if defined(__aarch64__)
static void a23_timer_timecounter_setup(struct a10_timer_softc *sc);
static u_int a23_timer_get_timecount(struct timecounter *tc);
+#endif
static int a10_timer_irq(void *);
static int a10_timer_probe(device_t);
@@ -138,6 +140,7 @@ static struct timecounter a10_timer_timecounter = {
.tc_quality = 1000,
};
+#if defined(__aarch64__)
static struct timecounter a23_timer_timecounter = {
.tc_name = "a10_timer timer0",
.tc_get_timecount = a23_timer_get_timecount,
@@ -146,6 +149,7 @@ static struct timecounter a23_timer_timecounter = {
/* We want it to be selected over the arm generic timecounter */
.tc_quality = 2000,
};
+#endif
#define A10_TIMER_MEMRES 0
#define A10_TIMER_IRQRES 1
@@ -158,7 +162,9 @@ static struct resource_spec a10_timer_spec[] = {
static struct ofw_compat_data compat_data[] = {
{"allwinner,sun4i-a10-timer", A10_TIMER},
+#if defined(__aarch64__)
{"allwinner,sun8i-a23-timer", A23_TIMER},
+#endif
{NULL, 0},
};
@@ -374,6 +380,7 @@ a10_timer_timer_stop(struct eventtimer *et)
* Timecounter functions for A23 and above
*/
+#if defined(__aarch64__)
static void
a23_timer_timecounter_setup(struct a10_timer_softc *sc)
{
@@ -415,6 +422,7 @@ a23_timer_get_timecount(struct timecounter *tc)
/* Counter count backwards */
return (~0u - val);
}
+#endif
/*
* Timecounter functions for A10 and A13, using the 64 bits counter
More information about the svn-src-head
mailing list