Commit 900b170a authored by Richard Cochran's avatar Richard Cochran Committed by Linus Torvalds

ARM: fix regression in IXP4xx clocksource

Commit 234b6ced

   clocksource: convert ARM 32-bit up counting clocksources

broke the build for ixp4xx and made big endian operation impossible.
This commit restores the original behaviour.
Signed-off-by: default avatarRichard Cochran <richard.cochran@omicron.at>
Signed-off-by: default avatarKrzysztof Hałasa <khc@pm.waw.pl>
[ Thomas says that we might want to have generic BE accessor functions
  to the MMIO clock source, but that hasn't happened yet, so in the
  meantime this seems to be the short-term fix for the particular
  problem - Linus ]
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent af8a927c
...@@ -419,14 +419,20 @@ static void notrace ixp4xx_update_sched_clock(void) ...@@ -419,14 +419,20 @@ static void notrace ixp4xx_update_sched_clock(void)
/* /*
* clocksource * clocksource
*/ */
static cycle_t ixp4xx_clocksource_read(struct clocksource *c)
{
return *IXP4XX_OSTS;
}
unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ; unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
EXPORT_SYMBOL(ixp4xx_timer_freq); EXPORT_SYMBOL(ixp4xx_timer_freq);
static void __init ixp4xx_clocksource_init(void) static void __init ixp4xx_clocksource_init(void)
{ {
init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq); init_sched_clock(&cd, ixp4xx_update_sched_clock, 32, ixp4xx_timer_freq);
clocksource_mmio_init(&IXP4XX_OSTS, "OSTS", ixp4xx_timer_freq, 200, 32, clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32,
clocksource_mmio_readl_up); ixp4xx_clocksource_read);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment