diff options
Diffstat (limited to 'arch/mips/jazz')
-rw-r--r-- | arch/mips/jazz/hw-access.c | 28 | ||||
-rw-r--r-- | arch/mips/jazz/int-handler.S | 90 | ||||
-rw-r--r-- | arch/mips/jazz/jazzdma.c | 15 | ||||
-rw-r--r-- | arch/mips/jazz/setup.c | 4 |
4 files changed, 48 insertions, 89 deletions
diff --git a/arch/mips/jazz/hw-access.c b/arch/mips/jazz/hw-access.c index 4cb45ea89..2ed460ee1 100644 --- a/arch/mips/jazz/hw-access.c +++ b/arch/mips/jazz/hw-access.c @@ -6,6 +6,8 @@ * for more details. * * Copyright (C) 1995, 1996, 1997 by Ralf Baechle + * + * $Id: hw-access.c,v 1.4 1997/07/29 17:46:45 ralf Exp $ */ #include <linux/delay.h> #include <linux/linkage.h> @@ -40,64 +42,64 @@ 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) { vdma_enable(JAZZ_FLOPPY_DMA); } static void -fd_disable_dma(void) +fd_disable_dma(int channel) { vdma_disable(JAZZ_FLOPPY_DMA); } static int -fd_request_dma(void) +fd_request_dma(int channel) { return 0; } static void -fd_free_dma(void) +fd_free_dma(int channel) { } static void -fd_clear_dma_ff(void) +fd_clear_dma_ff(int channel) { } static void -fd_set_dma_mode(char mode) +fd_set_dma_mode(int channel, char mode) { vdma_set_mode(JAZZ_FLOPPY_DMA, mode); } static void -fd_set_dma_addr(unsigned int a) +fd_set_dma_addr(int channel, unsigned int a) { vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(PHYSADDR(a))); } static void -fd_set_dma_count(unsigned int count) +fd_set_dma_count(int channel, unsigned int count) { vdma_set_count(JAZZ_FLOPPY_DMA, count); } static int -fd_get_dma_residue(void) +fd_get_dma_residue(int channel) { return vdma_get_residue(JAZZ_FLOPPY_DMA); } static void -fd_enable_irq(void) +fd_enable_irq(int irq) { } static void -fd_disable_irq(void) +fd_disable_irq(int irq) { } @@ -148,7 +150,8 @@ struct feature jazz_feature = { rtc_write_data }; -static volatile keyboard_hardware *jazz_kh = (keyboard_hardware *)JAZZ_KEYBOARD_ADDRESS; +static volatile keyboard_hardware *jazz_kh = + (keyboard_hardware *) JAZZ_KEYBOARD_ADDRESS; static unsigned char jazz_read_input(void) { @@ -177,5 +180,4 @@ void jazz_keyboard_setup(void) kbd_write_command = jazz_write_command; kbd_read_status = jazz_read_status; request_region(0x60, 16, "keyboard"); - r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | JAZZ_IE_KEYBOARD); } diff --git a/arch/mips/jazz/int-handler.S b/arch/mips/jazz/int-handler.S index 7d8fc5659..4c233ef54 100644 --- a/arch/mips/jazz/int-handler.S +++ b/arch/mips/jazz/int-handler.S @@ -9,6 +9,8 @@ * interrupts. These interrupts should use their own vectors. * Squeeze the last cycles out of the handlers. Only a dead * cycle is a good cycle. + * + * $Id: int-handler.S,v 1.3 1997/09/20 19:20:11 root Exp $ */ #include <asm/asm.h> #include <asm/mipsconfig.h> @@ -110,12 +112,8 @@ ll_isa_irq: lw a0,JAZZ_EISA_IRQ_ACK /* * 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 */ @@ -124,8 +122,8 @@ ll_isa_irq: lw a0,JAZZ_EISA_IRQ_ACK nor s1,zero,s1 and a0,s1 sb a0,%lo(cache_21)(s4) - jr v0 - sb a0,%lo(JAZZ_PORT_BASE)+0x21(s0) # delay slot + j ret_from_irq + sb a0,%lo(JAZZ_PORT_BASE)+0x21(s0) .align 5 ack_second: /* @@ -144,13 +142,8 @@ ack_second: /* /* * 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 + move a1,sp /* * Unblock second pic @@ -160,8 +153,8 @@ ack_second: /* nor s1,zero,s1 and a0,s1 sb a0,%lo(cache_A1)(s4) - jr v0 - sb a0,%lo(JAZZ_PORT_BASE)+0xa1(s0) # delay slot + j ret_from_irq + sb a0,%lo(JAZZ_PORT_BASE)+0xa1(s0) /* * Hmm... This is not just a plain PC clone so the question is @@ -187,40 +180,35 @@ ll_timer: lw zero,JAZZ_TIMER_REGISTER # timer irq cleared on read li a0,0 jal do_IRQ - move a1,sp # delay slot + move a1,sp mfc0 t0,CP0_STATUS # disable interrupts again ori t0,1 xori t0,1 mtc0 t0,CP0_STATUS - j ret_from_sys_call - nop # delay slot + j ret_from_irq + nop /* * CPU count/compare IRQ (unused) */ ll_count: j return - mtc0 zero,CP0_COMPARE + mtc0 zero,CP0_COMPARE #if 0 /* * Call the handler for the interrupt * (Currently unused) */ -call_real: la t0,IRQ_vectors - - /* +call_real: /* * temporarily disable interrupt */ mfc0 t2,CP0_STATUS and t2,s1 - - addu t0,t3 - lw t0,(t0) - mtc0 t2,CP0_STATUS # delay slot - jalr t0 - nor s1,zero,s1 # delay slot + mtc0 t2,CP0_STATUS + nor s1,zero,s1 + jal do_IRQ /* * reenable interrupt @@ -228,9 +216,7 @@ call_real: la t0,IRQ_vectors mfc0 t2,CP0_STATUS or t2,s1 mtc0 t2,CP0_STATUS - - jr v0 - nop # delay slot + j ret_from_irq #endif .data @@ -247,14 +233,14 @@ ll_vectors: PTR ll_count # Count/Compare IRQ * Interrupt handlers for local devices. */ .text + .set reorder loc_no_irq: PANIC("Unimplemented loc_no_irq handler") /* - * Parallel port IRQ + * Parallel port IRQ, remapped to level 5 */ loc_parallel: li s1,~JAZZ_IE_PARALLEL li a0,JAZZ_PARALLEL_IRQ b loc_call - li t3,PTRSIZE*JAZZ_PARALLEL_IRQ # delay slot /* * Floppy IRQ, remapped to level 6 @@ -262,7 +248,6 @@ loc_parallel: li s1,~JAZZ_IE_PARALLEL loc_floppy: li s1,~JAZZ_IE_FLOPPY li a0,JAZZ_FLOPPY_IRQ b loc_call - li t3,PTRSIZE*JAZZ_FLOPPY_IRQ # delay slot /* * Sound? What sound hardware (whistle) ??? @@ -271,20 +256,15 @@ loc_sound: PANIC("Unimplemented loc_sound handler") loc_video: PANIC("Unimplemented loc_video handler") /* - * Ethernet interrupt handler + * Ethernet interrupt handler, remapped to level 13 */ loc_ethernet: li s1,~JAZZ_IE_ETHERNET li a0,JAZZ_ETHERNET_IRQ b loc_call - li t3,PTRSIZE*JAZZ_ETHERNET_IRQ # delay slot -/* - * SCSI interrupt handler - */ loc_scsi: li s1,~JAZZ_IE_SCSI - li a0,JAZZ_SCSI_IRQ + li a0,12 # JAZZ_SCSI_IRQ b loc_call - li t3,PTRSIZE*JAZZ_SCSI_IRQ # delay slot /* * Keyboard interrupt handler @@ -292,42 +272,36 @@ loc_scsi: li s1,~JAZZ_IE_SCSI loc_keyboard: li s1,~JAZZ_IE_KEYBOARD li a0,JAZZ_KEYBOARD_IRQ b loc_call - li t3,PTRSIZE*JAZZ_KEYBOARD_IRQ # re-map to irq level 1 loc_mouse: PANIC("Unimplemented loc_mouse handler") /* - * Serial port 1 IRQ + * Serial port 1 IRQ, remapped to level 3 */ loc_serial1: li s1,~JAZZ_IE_SERIAL1 li a0,JAZZ_SERIAL1_IRQ b loc_call - li t3,PTRSIZE*JAZZ_SERIAL1_IRQ # delay slot /* - * Serial port 2 IRQ + * Serial port 2 IRQ, remapped to level 4 */ loc_serial2: li s1,~JAZZ_IE_SERIAL2 li a0,JAZZ_SERIAL2_IRQ b loc_call - li t3,PTRSIZE*JAZZ_SERIAL2_IRQ # delay slot /* * Call the interrupt handler for an interrupt generated by a * local device. */ -loc_call: la t0,IRQ_vectors # delay slot - - /* +loc_call: /* * Temporarily disable interrupt source */ lhu t2,JAZZ_IO_IRQ_ENABLE - addu t0,t3 # make ptr to IRQ handler - lw t0,(t0) - and t2,s1 # delay slot + and t2,s1 sh t2,JAZZ_IO_IRQ_ENABLE - jalr t0 # call IRQ handler - nor s1,zero,s1 # delay slot + + nor s1,zero,s1 + jal do_IRQ /* * Reenable interrupt @@ -336,14 +310,12 @@ loc_call: la t0,IRQ_vectors # delay slot or t2,s1 sh t2,JAZZ_IO_IRQ_ENABLE - jr v0 - nop # delay slot + j ret_from_irq /* * "Jump extender" to reach spurious_interrupt */ 3: j spurious_interrupt - nop # delay slot /* * Vectors for interrupts generated by local devices diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index 988499c79..7d4f3b3e3 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c @@ -514,18 +514,3 @@ int vdma_get_residue(int channel) return residual; } - -/* - * Get DMA channel enable register - */ -int vdma_get_enable(int channel) -{ - int enable; - - enable = r4030_read_reg32(JAZZ_R4030_CHNL_ENABLE+(channel<<5)); - - if (vdma_debug) - printk("vdma_get_enable: channel %d: enable=%d\n",channel,enable); - - return enable; -} diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index 3bbf84947..3bbe3714e 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c @@ -6,12 +6,13 @@ * for more details. * * Copyright (C) 1996, 1997 by Ralf Baechle + * + * $Id: setup.c,v 1.4 1997/07/29 17:57:06 ralf Exp $ */ #include <linux/init.h> #include <linux/ioport.h> #include <linux/sched.h> #include <linux/interrupt.h> -#include <linux/mm.h> #include <asm/bootinfo.h> #include <asm/keyboard.h> #include <asm/irq.h> @@ -20,7 +21,6 @@ #include <asm/reboot.h> #include <asm/vector.h> #include <asm/io.h> -#include <asm/pgtable.h> /* * Initial irq handlers. |