Commit e66a022a authored by Ben Hutchings's avatar Ben Hutchings Committed by Krzysztof Hałasa

arm/ixp4xx: Rename FREQ macro to avoid collisions

FREQ is a ridiculously short name for a platform-specific macro in a
generic header, and it now conflicts with an enumeration in the
gspca/ov519 driver.

Also delete conditional reference to ixp4xx_get_board_tick_rate()
which is not defined anywhere.
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarKrzysztof Hałasa <khc@pm.waw.pl>
parent 3c3a3b4c
...@@ -432,7 +432,7 @@ static struct clocksource clocksource_ixp4xx = { ...@@ -432,7 +432,7 @@ static struct clocksource clocksource_ixp4xx = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS, .flags = CLOCK_SOURCE_IS_CONTINUOUS,
}; };
unsigned long ixp4xx_timer_freq = 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)
{ {
...@@ -496,7 +496,7 @@ static struct clock_event_device clockevent_ixp4xx = { ...@@ -496,7 +496,7 @@ static struct clock_event_device clockevent_ixp4xx = {
static void __init ixp4xx_clockevent_init(void) static void __init ixp4xx_clockevent_init(void)
{ {
clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC, clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC,
clockevent_ixp4xx.shift); clockevent_ixp4xx.shift);
clockevent_ixp4xx.max_delta_ns = clockevent_ixp4xx.max_delta_ns =
clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx); clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
* timer register ignores the bottom 2 bits of the LATCH value. * timer register ignores the bottom 2 bits of the LATCH value.
*/ */
#define FREQ 66666000 #define IXP4XX_TIMER_FREQ 66666000
#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) #define CLOCK_TICK_RATE \
(((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
...@@ -69,11 +69,7 @@ static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned ...@@ -69,11 +69,7 @@ static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned
} }
if (value > 20 && value < 32767) if (value > 20 && value < 32767)
#ifndef FREQ count = (IXP4XX_TIMER_FREQ / (value * 4)) - 1;
count = (ixp4xx_get_board_tick_rate() / (value * 4)) - 1;
#else
count = (FREQ / (value * 4)) - 1;
#endif
ixp4xx_spkr_control(pin, count); ixp4xx_spkr_control(pin, count);
......
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