X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fsyslib%2Fi8259.c;h=b9391e65014124f946d83704ef88e54cf58f3a8d;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c6c361b99ceb1012d8d6b054e170fd50db716b8a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c index c6c361b99..b9391e650 100644 --- a/arch/ppc/syslib/i8259.c +++ b/arch/ppc/syslib/i8259.c @@ -10,7 +10,7 @@ unsigned char cached_8259[2] = { 0xff, 0xff }; #define cached_A1 (cached_8259[0]) #define cached_21 (cached_8259[1]) -static spinlock_t i8259_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(i8259_lock); int i8259_pic_irq_offset; @@ -140,15 +140,31 @@ struct hw_interrupt_type i8259_pic = { }; static struct resource pic1_iores = { - "8259 (master)", 0x20, 0x21, IORESOURCE_BUSY + .name = "8259 (master)", + .start = 0x20, + .end = 0x21, + .flags = IORESOURCE_BUSY, }; static struct resource pic2_iores = { - "8259 (slave)", 0xa0, 0xa1, IORESOURCE_BUSY + .name = "8259 (slave)", + .start = 0xa0, + .end = 0xa1, + .flags = IORESOURCE_BUSY, }; static struct resource pic_edgectrl_iores = { - "8259 edge control", 0x4d0, 0x4d1, IORESOURCE_BUSY + .name = "8259 edge control", + .start = 0x4d0, + .end = 0x4d1, + .flags = IORESOURCE_BUSY, +}; + +static struct irqaction i8259_irqaction = { + .handler = no_action, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, + .name = "82c59 secondary cascade", }; /* @@ -185,8 +201,7 @@ i8259_init(long intack_addr) spin_unlock_irqrestore(&i8259_lock, flags); /* reserve our resources */ - request_irq( i8259_pic_irq_offset + 2, no_action, SA_INTERRUPT, - "82c59 secondary cascade", NULL ); + setup_irq( i8259_pic_irq_offset + 2, &i8259_irqaction); request_resource(&ioport_resource, &pic1_iores); request_resource(&ioport_resource, &pic2_iores); request_resource(&ioport_resource, &pic_edgectrl_iores);