[PATCH 03/14] at91: factorize at91 interrupts init to soc
H Hartley Sweeten
hartleys at visionengravers.com
Mon Apr 25 18:11:11 EDT 2011
On Monday, April 25, 2011 11:31 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>
> they are the same except the default priority
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre at atmel.com>
> Cc: Patrice Vilchez <patrice.vilchez at atmel.com>
[snip]
> diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
> index b0d235e..ba08329 100644
> --- a/arch/arm/mach-at91/board-1arm.c
> +++ b/arch/arm/mach-at91/board-1arm.c
> @@ -65,7 +65,7 @@ static void __init onearm_map_io(void)
>
> static void __init onearm_init_irq(void)
> {
> - at91rm9200_init_interrupts(NULL);
> + at91_init_interrupts(NULL);
> }
[snip]
> diff --git a/arch/arm/mach-at91/soc.c b/arch/arm/mach-at91/soc.c
> index 81f5815..f0a1661 100644
> --- a/arch/arm/mach-at91/soc.c
> +++ b/arch/arm/mach-at91/soc.c
> @@ -20,6 +20,18 @@
>
> static struct at91_soc __initdata current_soc;
>
> +void __init at91_init_interrupts(unsigned int *priority)
> +{
> + if (!priority)
> + priority = current_soc.default_irq_priority;
> +
> + /* Initialize the AIC interrupt controller */
> + at91_aic_init(priority);
> +
> + /* Enable GPIO interrupts */
> + at91_gpio_irq_setup();
> +}
> +
All the board files call at91_init_interrupts with a NULL priority. Why not just
remove the parameter entirely, make MACHINE_START.init_irq = at91_init_interrupts,
and then remove all the {board}_init_irq functions.
Regards,
Hartley
More information about the linux-arm-kernel
mailing list