diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-12-01 17:57:09 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-12-01 17:57:09 +0000 |
commit | a62a0f262e0179df8c632f529c95abf54ef78332 (patch) | |
tree | 80e6a7a7d407d08e218332bb3fcccdaf9f28fcc1 /arch/mips/deskstation | |
parent | fd095d09f2d475dc2e8599b1b8bae1cd65e91685 (diff) |
Part #2 merging back my changes ...
Diffstat (limited to 'arch/mips/deskstation')
-rw-r--r-- | arch/mips/deskstation/hw-access.c | 46 | ||||
-rw-r--r-- | arch/mips/deskstation/int-handler.S | 31 |
2 files changed, 35 insertions, 42 deletions
diff --git a/arch/mips/deskstation/hw-access.c b/arch/mips/deskstation/hw-access.c index 8b1bd0e3b..64659ba76 100644 --- a/arch/mips/deskstation/hw-access.c +++ b/arch/mips/deskstation/hw-access.c @@ -7,7 +7,7 @@ * * Copyright (C) 1996, 1997 by Ralf Baechle * - * $Id: hw-access.c,v 1.2 1997/07/23 17:40:54 ralf Exp $ + * $Id: hw-access.c,v 1.3 1997/07/29 17:46:42 ralf Exp $ */ #include <linux/config.h> #include <linux/delay.h> @@ -46,69 +46,69 @@ fd_outb(unsigned char value, unsigned int port) * How to access the floppy DMA functions. */ static void -fd_enable_dma(void) +fd_enable_dma(int channel) { - enable_dma(FLOPPY_DMA); + enable_dma(channel); } static void -fd_disable_dma(void) +fd_disable_dma(int channel) { - disable_dma(FLOPPY_DMA); + disable_dma(int channel); } static int -fd_request_dma(void) +fd_request_dma(int channel) { - return request_dma(FLOPPY_DMA, "floppy"); + return request_dma(channel, "floppy"); } static void -fd_free_dma(void) +fd_free_dma(int channel) { - free_dma(FLOPPY_DMA); + free_dma(channel); } static void -fd_clear_dma_ff(void) +fd_clear_dma_ff(int channel) { - clear_dma_ff(FLOPPY_DMA); + clear_dma_ff(channel); } static void -fd_set_dma_mode(char mode) +fd_set_dma_mode(int channel, char mode) { - set_dma_mode(FLOPPY_DMA, mode); + set_dma_mode(channel, mode); } static void -fd_set_dma_addr(unsigned int addr) +fd_set_dma_addr(int channel, unsigned int addr) { - set_dma_addr(FLOPPY_DMA, addr); + set_dma_addr(channel, addr); } static void -fd_set_dma_count(unsigned int count) +fd_set_dma_count(int channel, unsigned int count) { - set_dma_count(FLOPPY_DMA, count); + set_dma_count(channel, count); } static int -fd_get_dma_residue(void) +fd_get_dma_residue(int channel) { - return get_dma_residue(FLOPPY_DMA); + return get_dma_residue(channel); } static void -fd_enable_irq(void) +fd_enable_irq(int irq) { - enable_irq(FLOPPY_IRQ); + enable_irq(irq); } static void -fd_disable_irq(void) +fd_disable_irq(int irq) { - disable_irq(FLOPPY_IRQ); + disable_irq(irq); } void diff --git a/arch/mips/deskstation/int-handler.S b/arch/mips/deskstation/int-handler.S index b7fd32d71..508110fef 100644 --- a/arch/mips/deskstation/int-handler.S +++ b/arch/mips/deskstation/int-handler.S @@ -1,7 +1,9 @@ /* * Deskstation rPC44/Tyne specific interrupt handler code * - * Copyright (C) 1994, 1995, 1996 by Ralf Baechle + * Copyright (C) 1994, 1995, 1996, 1997 by Ralf Baechle + * + * $Id: int-handler.S,v 1.3 1997/09/20 19:20:09 root Exp $ */ #include <asm/asm.h> #include <asm/mipsconfig.h> @@ -9,7 +11,7 @@ #include <asm/regdef.h> #include <asm/stackframe.h> -#error "FIXME - PORT_BASE is defined to port_base which breaks this file" +#error "FIXME - PORT_BASE is defined to mips_io_port_base which breaks this file" .text .set noreorder @@ -43,12 +45,8 @@ /* * Now call the real handler */ - la t3,IRQ_vectors - sll t2,a0,PTRLOG - addu t3,t2 - LONG_L t3,(t3) - jalr t3 - nop # delay slot + jal do_IRQ + move a1,sp /* * Unblock first pic */ @@ -57,7 +55,7 @@ nor s1,zero,s1 and t1,s1 sb t1,%lo(cache_21)(s4) - jr v0 + j ret_from_irq sb t1,%lo(PORT_BASE+0x21)(s0) # delay slot /* @@ -85,13 +83,8 @@ poll_second: li a0,0x0f /* * Now call the real handler */ - la t3,IRQ_vectors - addiu a0,8 - sll t2,a0,PTRLOG - addu t3,t2 - LONG_L t3,(t3) - jalr t3 - nop # delay slot + jal do_IRQ + nop /* * Unblock second pic */ @@ -100,12 +93,12 @@ poll_second: li a0,0x0f nor s1,zero,s1 and t1,t1,s1 sb t1,%lo(cache_A1)(s4) - jr v0 - sb t1,%lo(PORT_BASE+0xa1)(s0) # delay slot + j ret_from_irq + sb t1,%lo(PORT_BASE+0xa1)(s0) /* * "Jump extender" to reach spurious_interrupt */ 3: j spurious_interrupt - nop # delay slot + nop END(deskstation_handle_int) |