patch-2.3.16 linux/arch/alpha/kernel/sys_ruffian.c

Next file: linux/arch/alpha/kernel/sys_rx164.c
Previous file: linux/arch/alpha/kernel/sys_rawhide.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/arch/alpha/kernel/sys_ruffian.c linux/arch/alpha/kernel/sys_ruffian.c
@@ -3,7 +3,7 @@
  *
  *	Copyright (C) 1995 David A Rusling
  *	Copyright (C) 1996 Jay A Estabrook
- *	Copyright (C) 1998 Richard Henderson
+ *	Copyright (C) 1998, 1999 Richard Henderson
  *
  * Code supporting the RUFFIAN.
  */
@@ -26,9 +26,9 @@
 #include <asm/core_pyxis.h>
 
 #include "proto.h"
-#include "irq.h"
-#include "bios32.h"
-#include "machvec.h"
+#include "irq_impl.h"
+#include "pci_impl.h"
+#include "machvec_impl.h"
 
 static void
 ruffian_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
@@ -164,18 +164,6 @@
 }
 
 
-/*
- * For RUFFIAN, we do not want to make any modifications to the PCI
- * setup.  But we may need to do some kind of init.
- */
-
-static void __init
-ruffian_pci_fixup(void)
-{
-	/* layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE); */
-}
-
-
 #ifdef BUILDING_FOR_MILO
 /*
  * The DeskStation Ruffian motherboard firmware does not place
@@ -215,31 +203,9 @@
 }
 #endif /* BUILDING_FOR_MILO */
 
-static void __init
-ruffian_init_arch(unsigned long *mem_start, unsigned long *mem_end)
-{
-	/* FIXME: What do we do with ruffian_get_bank_size above?  */
-
-#if 1
-	pyxis_init_arch(mem_start, mem_end);
-#else
-	pyxis_enable_errors();
-	if (!pyxis_srm_window_setup()) {
-		printk("ruffian_init_arch: Skipping window register rewrites."
-		       "\n... Trust DeskStation firmware!\n");
-	}
-	pyxis_finish_init_arch();
-#endif
-}
-
 static void
 ruffian_init_pit (void)
 {
-	/* Ruffian depends on the system timer established in MILO! */
-        timer_resource.start = 0x70;
-        timer_resource.end = 0x70 + 0x10;
-        request_resource(&ioport_resource, &timer_resource);
-
 	outb(0xb6, 0x43);       /* pit counter 2: speaker */
 	outb(0x31, 0x42);
 	outb(0x13, 0x42);
@@ -254,7 +220,15 @@
 	*(vuip) PYXIS_RESET = 0x0000dead;
 	mb();
 #endif
-	generic_kill_arch(mode, reboot_cmd);
+	common_kill_arch(mode, reboot_cmd);
+}
+
+static int __init
+ruffian_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+	/* We don't know anything about the PCI routing, so leave
+	   the IRQ unchanged.  */
+	return dev->irq;
 }
 
 
@@ -266,11 +240,12 @@
 	vector_name:		"Ruffian",
 	DO_EV5_MMU,
 	DO_DEFAULT_RTC,
-	/* For the moment, do not use BWIO on RUFFIAN.  */
-	IO(PYXIS,pyxis,pyxis),
+	DO_PYXIS_IO,
 	DO_PYXIS_BUS,
 	machine_check:		pyxis_machine_check,
 	max_dma_address:	ALPHA_RUFFIAN_MAX_DMA_ADDRESS,
+	min_io_address:		DEFAULT_IO_BASE,
+	min_mem_address:	DEFAULT_MEM_BASE,
 
 	nr_irqs:		48,
 	irq_probe_mask:		RUFFIAN_PROBE_MASK,
@@ -278,10 +253,12 @@
 	ack_irq:		ruffian_ack_irq,
 	device_interrupt:	ruffian_device_interrupt,
 
-	init_arch:		ruffian_init_arch,
+	init_arch:		pyxis_init_arch,
 	init_irq:		ruffian_init_irq,
 	init_pit:		ruffian_init_pit,
-	pci_fixup:		ruffian_pci_fixup,
+	init_pci:		common_init_pci,
 	kill_arch:		ruffian_kill_arch,
+	pci_map_irq:		ruffian_map_irq,
+	pci_swizzle:		common_swizzle,
 };
 ALIAS_MV(ruffian)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)