From ceb69a899f0819bce825083bd487c6afacc0d1b4 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Fri, 11 Sep 2009 00:59:07 +0200 Subject: ixp4xx: timer and clocks cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch does a few simple cleanups of the ixp4xx timer and clocksource/clockevent code in mach-ixp4xx/common.c: - ixp4xx_clocksource_init() is static and always returns 0, which is ignored by its only caller: make it return void - ixp4xx_clockevent_init(): ditto - ixp4xx_get_cycles() is only referenced locally: make it static - use the ixp4xx_timer_irq.dev_id field to pass &clockevent_ixp4xx to ixp4xx_timer_interrupt() via its dev_id parameter, allowing the code in ixp4xx_timer_interrupt() to be smaller and faster Tested on an ixp420 machine (ds101). Signed-off-by: Mikael Pettersson Signed-off-by: Krzysztof Hałasa diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 5083f03..cfd52fb 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -41,8 +41,8 @@ #include #include -static int __init ixp4xx_clocksource_init(void); -static int __init ixp4xx_clockevent_init(void); +static void __init ixp4xx_clocksource_init(void); +static void __init ixp4xx_clockevent_init(void); static struct clock_event_device clockevent_ixp4xx; /************************************************************************* @@ -267,7 +267,7 @@ void __init ixp4xx_init_irq(void) static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id) { - struct clock_event_device *evt = &clockevent_ixp4xx; + struct clock_event_device *evt = dev_id; /* Clear Pending Interrupt by writing '1' to it */ *IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND; @@ -281,6 +281,7 @@ static struct irqaction ixp4xx_timer_irq = { .name = "timer1", .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, .handler = ixp4xx_timer_interrupt, + .dev_id = &clockevent_ixp4xx, }; void __init ixp4xx_timer_init(void) @@ -401,7 +402,7 @@ void __init ixp4xx_sys_init(void) /* * clocksource */ -cycle_t ixp4xx_get_cycles(struct clocksource *cs) +static cycle_t ixp4xx_get_cycles(struct clocksource *cs) { return *IXP4XX_OSTS; } @@ -417,14 +418,12 @@ static struct clocksource clocksource_ixp4xx = { unsigned long ixp4xx_timer_freq = FREQ; EXPORT_SYMBOL(ixp4xx_timer_freq); -static int __init ixp4xx_clocksource_init(void) +static void __init ixp4xx_clocksource_init(void) { clocksource_ixp4xx.mult = clocksource_hz2mult(ixp4xx_timer_freq, clocksource_ixp4xx.shift); clocksource_register(&clocksource_ixp4xx); - - return 0; } /* @@ -480,7 +479,7 @@ static struct clock_event_device clockevent_ixp4xx = { .set_next_event = ixp4xx_set_next_event, }; -static int __init ixp4xx_clockevent_init(void) +static void __init ixp4xx_clockevent_init(void) { clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC, clockevent_ixp4xx.shift); @@ -491,5 +490,4 @@ static int __init ixp4xx_clockevent_init(void) clockevent_ixp4xx.cpumask = cpumask_of(0); clockevents_register_device(&clockevent_ixp4xx); - return 0; } -- cgit v0.10.2 From 74c32e7234afc4586391c0c0f290d266a3e57fe5 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Fri, 11 Sep 2009 00:56:54 +0200 Subject: ixp4xx: arch_idle() documentation fixup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The body of the mach-ixp4xx arch_idle() is mysteriously disabled by an #if 0 .. #endif. Normally one would expect to find a call to cpu_do_idle() there, but that call is disabled, even though cpu_do_idle() is implemented for XScale cores (and ixp4xx is one). The explanation can be found in the ixp42x developer's manual which states that the XScale core clock and power management registers aren't implemented on ixp42x [3.5.2.2]. Also, the disabled code has suffered from bit rot: - it checks hlt_counter which is obsolete, as that variable and all related code now is private to kernel/process.c - it passes too many parameters to cpu_do_idle() So this patch: - adds a comment before the #if 0 to explain why cpu_do_idle() mustn't be called on ixp4xx - removes the obsolete test of hlt_counter and the obsolete parameter to cpu_do_idle() This is purely a documentation fixup and changes no generated code. Even so, it has been tested on an ixp420 machine (ds101). Signed-off-by: Mikael Pettersson Signed-off-by: Krzysztof Hałasa diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h index d2aa26f..54c0af7 100644 --- a/arch/arm/mach-ixp4xx/include/mach/system.h +++ b/arch/arm/mach-ixp4xx/include/mach/system.h @@ -13,9 +13,11 @@ static inline void arch_idle(void) { + /* ixp4xx does not implement the XScale PWRMODE register, + * so it must not call cpu_do_idle() here. + */ #if 0 - if (!hlt_counter) - cpu_do_idle(0); + cpu_do_idle(); #endif } -- cgit v0.10.2 From dfdd8cc903288bb2e2ad6731545be3db7304c133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Ha=C5=82asa?= Date: Mon, 21 Sep 2009 18:31:24 +0200 Subject: Add MAINTAINERS entry for ARM/INTEL IXP4xx arch support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Krzysztof Hałasa diff --git a/MAINTAINERS b/MAINTAINERS index 751a307..7bf7045 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -685,6 +685,13 @@ M: Lennert Buytenhek L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) S: Maintained +ARM/INTEL IXP4XX ARM ARCHITECTURE +M: Imre Kaloz +M: Krzysztof Halasa +L: linux-arm-kernel@lists.infradead.org +S: Maintained +F: arch/arm/mach-ixp4xx/ + ARM/INTEL XSC3 (MANZANO) ARM CORE M: Lennert Buytenhek M: Dan Williams -- cgit v0.10.2