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

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

diff -u --recursive --new-file v2.3.15/linux/arch/alpha/kernel/sys_takara.c linux/arch/alpha/kernel/sys_takara.c
@@ -25,9 +25,9 @@
 #include <asm/core_cia.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 
@@ -127,7 +127,7 @@
  */
 
 static int __init
-takara_map_irq(struct pci_dev *dev, int slot, int pin)
+takara_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
 	static char irq_tab[15][5] __initlocaldata = {
 		{ 16+3, 16+3, 16+3, 16+3, 16+3},   /* slot  6 == device 3 */
@@ -150,16 +150,18 @@
 	return COMMON_TABLE_LOOKUP;
 }
 
-static int __init
-takara_swizzle(struct pci_dev *dev, int *pinp)
+static u8 __init
+takara_swizzle(struct pci_dev *dev, u8 *pinp)
 {
 	int slot = PCI_SLOT(dev->devfn);
 	int pin = *pinp;
 	unsigned int ctlreg = inl(0x500);
 	unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
 
-	/* Check first for built-in bridges.  */
-	if (busslot > 16 && ((1<<(36-busslot)) & ctlreg)) {
+	/* Check for built-in bridges.  */
+	if (dev->bus->number != 0
+	    && busslot > 16
+	    && ((1<<(36-busslot)) & ctlreg)) {
 		if (pin == 1)
 			pin += (20 - busslot);
 		else {
@@ -174,11 +176,10 @@
 }
 
 static void __init
-takara_pci_fixup(void)
+takara_init_pci(void)
 {
-	layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
-	common_pci_fixup(takara_map_irq, takara_swizzle);
-	/* enable_ide(0x26e); */
+	common_init_pci();
+	/* ns87312_enable_ide(0x26e); */
 }
 
 
@@ -194,17 +195,21 @@
 	DO_CIA_BUS,
 	machine_check:		cia_machine_check,
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
+	min_io_address:		DEFAULT_IO_BASE,
+	min_mem_address:	CIA_DEFAULT_MEM_BASE,
 
 	nr_irqs:		20,
 	irq_probe_mask:		_PROBE_MASK(20),
 	update_irq_hw:		takara_update_irq_hw,
-	ack_irq:		generic_ack_irq,
+	ack_irq:		common_ack_irq,
 	device_interrupt:	takara_device_interrupt,
 
 	init_arch:		cia_init_arch,
 	init_irq:		takara_init_irq,
-	init_pit:		generic_init_pit,
-	pci_fixup:		takara_pci_fixup,
-	kill_arch:		generic_kill_arch,
+	init_pit:		common_init_pit,
+	init_pci:		takara_init_pci,
+	kill_arch:		common_kill_arch,
+	pci_map_irq:		takara_map_irq,
+	pci_swizzle:		takara_swizzle,
 };
 ALIAS_MV(takara)

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