patch-2.1.126 linux/arch/mips/sni/hw-access.c

Next file: linux/arch/mips/sni/int-handler.S
Previous file: linux/arch/mips/sni/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/arch/mips/sni/hw-access.c linux/arch/mips/sni/hw-access.c
@@ -1,4 +1,4 @@
-/* $Id: hw-access.c,v 1.5 1998/05/07 00:39:56 ralf Exp $
+/* $Id: hw-access.c,v 1.8 1998/09/16 22:50:46 ralf Exp $
  *
  * Low-level hardware access stuff for SNI RM200 PCI
  *
@@ -10,6 +10,7 @@
  */
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/kbd_ll.h>
 #include <linux/kbdcntrlr.h>
 #include <linux/kernel.h>
 #include <linux/linkage.h>
@@ -23,144 +24,7 @@
 #include <asm/irq.h>
 #include <asm/mc146818rtc.h>
 #include <asm/pgtable.h>
-#include <asm/vector.h>
-
-extern int FLOPPY_IRQ;
-extern int FLOPPY_DMA;
-
-/*
- * How to access the FDC's registers.
- */
-static unsigned char
-fd_inb(unsigned int port)
-{
-	return inb_p(port);
-}
-
-static void
-fd_outb(unsigned char value, unsigned int port)
-{
-	outb_p(value, port);
-}
-
-/*
- * How to access the floppy DMA functions.
- */
-static void
-fd_enable_dma(int channel)
-{
-	enable_dma(channel);
-}
-
-static void
-fd_disable_dma(int channel)
-{
-	disable_dma(channel);
-}
-
-static int
-fd_request_dma(int channel)
-{
-	return request_dma(channel, "floppy");
-}
-
-static void
-fd_free_dma(int channel)
-{
-	free_dma(channel);
-}
-
-static void
-fd_clear_dma_ff(int channel)
-{
-	clear_dma_ff(channel);
-}
-
-static void
-fd_set_dma_mode(int channel, char mode)
-{
-	set_dma_mode(channel, mode);
-}
-
-static void
-fd_set_dma_addr(int channel, unsigned int addr)
-{
-	set_dma_addr(channel, addr);
-}
-
-static void
-fd_set_dma_count(int channel, unsigned int count)
-{
-	set_dma_count(channel, count);
-}
-
-static int
-fd_get_dma_residue(int channel)
-{
-	return get_dma_residue(channel);
-}
-
-static void
-fd_enable_irq(int irq)
-{
-	enable_irq(irq);
-}
-
-static void
-fd_disable_irq(int irq)
-{
-	disable_irq(irq);
-}
-
-void
-sni_fd_cacheflush(const void *addr, size_t size)
-{
-	flush_cache_all();
-}
-
-/*
- * RTC stuff (This is a guess on how the RM handles this ...)
- */
-static unsigned char
-rtc_read_data(unsigned long addr)
-{
-	outb_p(addr, RTC_PORT(0));
-	return inb_p(RTC_PORT(1));
-}
-
-static void
-rtc_write_data(unsigned char data, unsigned long addr)
-{
-	outb_p(addr, RTC_PORT(0));
-	outb_p(data, RTC_PORT(1));
-}
-
-struct feature sni_rm200_pci_feature = {
-	/*
-	 * How to access the floppy controller's ports
-	 */
-	fd_inb,
-	fd_outb,
-	/*
-	 * How to access the floppy DMA functions.
-	 */
-	fd_enable_dma,
-	fd_disable_dma,
-	fd_request_dma,
-	fd_free_dma,
-	fd_clear_dma_ff,
-	fd_set_dma_mode,
-	fd_set_dma_addr,
-	fd_set_dma_count,
-	fd_get_dma_residue,
-	fd_enable_irq,
-	fd_disable_irq,
-	/*
-	 * How to access the RTC functions.
-	 */
-	rtc_read_data,
-	rtc_write_data
-};
+#include <asm/sni.h>
 
 #define KBD_STAT_IBF		0x02	/* Keyboard input buffer full */
 
@@ -200,5 +64,7 @@
 	kbd_write_output = sni_write_output;
 	kbd_write_command = sni_write_command;
 	kbd_read_status = sni_read_status;
+	request_irq(PCIMT_KEYBOARD_IRQ, keyboard_interrupt,
+	            0, "keyboard", NULL);
 	request_region(0x60, 16, "keyboard");
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov