arm: allwinner: a23 timer functions are only used for arm64

This commit is contained in:
Emmanuel Vadot 2020-11-26 17:19:47 +00:00
parent e7d11d07e0
commit 978a8cccd8

View File

@ -119,8 +119,10 @@ static uint64_t timer_read_counter64(struct a10_timer_softc *sc);
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