patch-2.3.16 linux/arch/arm/kernel/hw-footbridge.c

Next file: linux/arch/arm/kernel/ioport.c
Previous file: linux/arch/arm/kernel/head-armv.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/arch/arm/kernel/hw-footbridge.c linux/arch/arm/kernel/hw-footbridge.c
@@ -44,7 +44,7 @@
 
 static int irqmap_ebsa[] __initdata = { IRQ_IN1, IRQ_IN0, IRQ_PCI, IRQ_IN3 };
 
-__initfunc(static int ebsa_irqval(struct pci_dev *dev))
+static int __init ebsa_irqval(struct pci_dev *dev)
 {
 	unsigned char pin;
 	
@@ -59,7 +59,7 @@
 #ifdef CONFIG_CATS
 static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
 
-__initfunc(static int cats_irqval(struct pci_dev *dev))
+static int __init cats_irqval(struct pci_dev *dev)
 {
 	if (dev->irq >= 128)
 		return 16 + (dev->irq & 0x1f);
@@ -80,7 +80,7 @@
 }
 #endif
 
-__initfunc(void pcibios_fixup_ebsa285(struct pci_dev *dev))
+void __init pcibios_fixup_ebsa285(struct pci_dev *dev)
 {
 	/* Latency timer of 32 */
 	pci_write_config_byte(dev, PCI_LATENCY_TIMER, 32);
@@ -284,7 +284,7 @@
 	irq_pci_err, SA_INTERRUPT, 0, "PCI error", NULL, NULL
 };
 
-__initfunc(void pcibios_init_ebsa285(void))
+void __init pcibios_init_ebsa285(void)
 {
 	setup_arm_irq(IRQ_PCI_ERR, &irq_pci_error);
 }
@@ -592,7 +592,7 @@
 /*
  * Initialise the Winbond W83977F chip.
  */
-__initfunc(static void wb977_init(void))
+static void __init wb977_init(void)
 {
 	request_region(0x370, 2, "W83977AF configuration");
 
@@ -642,7 +642,7 @@
 	gpio_modify_op(GPIO_IOLOAD, 0);
 }
 
-__initfunc(static void cpld_init(void))
+static void __init cpld_init(void)
 {
 	unsigned long flags;
 
@@ -662,7 +662,7 @@
 #define dprintk printk
 #endif
 
-#define WRITE_RWA(r,v) do { outb((r), 0x279); outb((v), 0xa79); } while (0)
+#define WRITE_RWA(r,v) do { outb((r), 0x279); udelay(10); outb((v), 0xa79); } while (0)
 
 static inline void rwa010_unlock(void)
 {
@@ -671,8 +671,10 @@
 	WRITE_RWA(2, 2);
 	mdelay(10);
 
-	for (i = 0; i < sizeof(rwa_unlock); i++)
+	for (i = 0; i < sizeof(rwa_unlock); i++) {
 		outb(rwa_unlock[i], 0x279);
+		udelay(10);
+	}
 }
 
 static inline void rwa010_read_ident(void)
@@ -685,22 +687,22 @@
 
 	outb(1, 0x279);
 
-	mdelay(10);
+	mdelay(1);
 
 	dprintk("Identifier: ");
 	for (i = 0; i < 9; i++) {
 		si[i] = 0;
 		for (j = 0; j < 8; j++) {
 			int bit;
-			mdelay(1);
+			udelay(250);
 			inb(0x203);
-			mdelay(1);
+			udelay(250);
 			bit = inb(0x203);
 			dprintk("%02X ", bit);
+			bit = (bit == 0xaa) ? 1 : 0;
 			si[i] |= bit << j;
 		}
-		mdelay(10);
-		dprintk("%02X ", si[i]);
+		dprintk("(%02X) ", si[i]);
 	}
 	dprintk("\n");
 }
@@ -842,7 +844,7 @@
 	outb(1, 0x38b);
 }
 
-__initfunc(static void rwa010_init(void))
+static void __init rwa010_init(void)
 {
 	rwa010_unlock();
 	rwa010_read_ident();
@@ -918,7 +920,7 @@
 
 #endif
 
-__initfunc(void hw_init(void))
+void __init hw_init(void)
 {
 	extern void register_isa_ports(unsigned int, unsigned int, 
 				       unsigned int);
@@ -943,9 +945,10 @@
 		spin_unlock_irqrestore(&gpio_lock, flags);
 	}
 #endif
-
+#ifdef CONFIG_CATS
 	if (machine_is_cats())
 		cats_hw_init();
+#endif
 
 	leds_event(led_start);
 }

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