[PATCH] powerpc/cpm2 Fix set interrupt type

Kumar Gala galak at kernel.crashing.org
Sat Feb 7 03:44:52 EST 2009


On Jan 27, 2009, at 2:44 AM, paulfax wrote:

> This is a simple change to correct problems when using set_irq_type  
> on platforms using CPM2.
> This code correct the problem on most platform but still fails on  
> 8272 derived platforms for some interrupts.
> On 8272 PC2 & 3 are missing and PC 23 & 29 are added, which this  
> patch does not address.
>
> Signed-off-by: Paul Bilke <paul at conspiracy.net>
> ---
>
>
>
>
> diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/ 
> cpm2_pic.c
> index b16ca3e..78f1f7c 100644
> --- a/arch/powerpc/sysdev/cpm2_pic.c
> +++ b/arch/powerpc/sysdev/cpm2_pic.c
> @@ -165,7 +165,7 @@ static int cpm2_set_irq_type(unsigned int virq,  
> unsigned int flow_type)
>                        edibit = (14 - (src - CPM2_IRQ_EXT1));
>        else
>                if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0)
> -                       edibit = (31 - (src - CPM2_IRQ_PORTC15));
> +                       edibit = (31 - (CPM2_IRQ_PORTC0 - src));
>                else
>                        return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 :  
> -EINVAL;


applied

- k



More information about the Linuxppc-dev mailing list