summaryrefslogtreecommitdiff
path: root/lib_i386
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2009-11-24 20:04:18 +1100
committerWolfgang Denk <wd@denx.de>2009-12-05 01:04:18 +0100
commit564a9984bdbf86a02cf4f0d848933a9fff4a1d18 (patch)
tree09f093703b988d3a229294649429672452a5a891 /lib_i386
parent27f13075a659da046372dfe249d808f2f6ddb432 (diff)
i386: Rearrange Interupt Handling
In preperation for full relocation Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'lib_i386')
-rw-r--r--lib_i386/interrupts.c4
-rw-r--r--lib_i386/pcat_interrupts.c33
2 files changed, 3 insertions, 34 deletions
diff --git a/lib_i386/interrupts.c b/lib_i386/interrupts.c
index 3f3613a2fba..efbad72202d 100644
--- a/lib_i386/interrupts.c
+++ b/lib_i386/interrupts.c
@@ -109,8 +109,10 @@ void irq_free_handler(int irq)
return;
}
-__isr__ do_irq(int irq)
+void do_irq(int hw_irq)
{
+ int irq = hw_irq - 0x20;
+
if (irq < 0 || irq >= CONFIG_SYS_NUM_IRQS) {
printf("do_irq: bad irq number %d\n", irq);
return;
diff --git a/lib_i386/pcat_interrupts.c b/lib_i386/pcat_interrupts.c
index f01298e9cf2..67e6e97e35e 100644
--- a/lib_i386/pcat_interrupts.c
+++ b/lib_i386/pcat_interrupts.c
@@ -40,45 +40,12 @@
#error "CONFIG_SYS_NUM_IRQS must equal 16 if CONFIG_SYS_NUM_IRQS is defined"
#endif
-DECLARE_INTERRUPT(0);
-DECLARE_INTERRUPT(1);
-DECLARE_INTERRUPT(3);
-DECLARE_INTERRUPT(4);
-DECLARE_INTERRUPT(5);
-DECLARE_INTERRUPT(6);
-DECLARE_INTERRUPT(7);
-DECLARE_INTERRUPT(8);
-DECLARE_INTERRUPT(9);
-DECLARE_INTERRUPT(10);
-DECLARE_INTERRUPT(11);
-DECLARE_INTERRUPT(12);
-DECLARE_INTERRUPT(13);
-DECLARE_INTERRUPT(14);
-DECLARE_INTERRUPT(15);
-
int interrupt_init(void)
{
u8 i;
disable_interrupts();
- /* Setup interrupts */
- set_vector(0x20, irq_0);
- set_vector(0x21, irq_1);
- set_vector(0x23, irq_3);
- set_vector(0x24, irq_4);
- set_vector(0x25, irq_5);
- set_vector(0x26, irq_6);
- set_vector(0x27, irq_7);
- set_vector(0x28, irq_8);
- set_vector(0x29, irq_9);
- set_vector(0x2a, irq_10);
- set_vector(0x2b, irq_11);
- set_vector(0x2c, irq_12);
- set_vector(0x2d, irq_13);
- set_vector(0x2e, irq_14);
- set_vector(0x2f, irq_15);
-
/* Mask all interrupts */
outb(0xff, MASTER_PIC + IMR);
outb(0xff, SLAVE_PIC + IMR);