Skip to contentSkip to conversation

More on Various PMac PCI patches

PATCH Michel Lanners 2 participants 2 messages Sep 12, 1999 – Sep 13, 1999

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

Here is another round of PCI patches for the PowerMacs, against 2.2.12 official.

It includes all my previous patches, cleaned up a bit, with the special cases upon region enabling removed for VGA and IDE, and with special care for PlanB. That's since with OF's assignments, PlanB collides with the memory held by control.

I haven't had time to investigate the potential PCMCIA problems nor find an appropriate solution, so this PCI stuff might need to change further. I just wanted to get it out the door, since more and more people seem to be bothered by the lack of fixup code for the PCI bus.

Enjoy, and report any and all problems to me!

Michel

-------------------------------------------------------------------------

Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   [email protected]            |
http://www.cpu.lu/~mlan        |                     Learn Always. "
arch/ppc/kernel/pci.c +12 -1
diff -uNr linux-2.2.12-pristine/arch/ppc/kernel/pci.c linux-2.2.12/arch/ppc/kernel/pci.c
@@ -22,6 +22,14 @@
 
 #include "pci.h"
 
+#undef DEBUG
+
+#ifdef DEBUG
+#define DBG(x...) printk(x)
+#else
+#define DBG(x...)
+#endif
+
 unsigned long isa_io_base     = 0;
 unsigned long isa_mem_base    = 0;
 unsigned long pci_dram_offset = 0;
@@ -99,8 +107,11 @@
 		if (reg == 0 || ((reg[0] >> 8) & 0xff) != dev->devfn)
 			continue;
 		/* this is the node, see if it has interrupts */
-		if (node->n_intrs > 0) 
+		if (node->n_intrs > 0) {
 			dev->irq = node->intrs[0].line;
+			DBG("PCI: setting IRQ %d on device %02x:%02x.\n",
+				dev->irq, dev->bus->number, dev->devfn);
+		}
 		break;
 	}
 }
arch/ppc/kernel/pmac_pci.c +82 -10

133 lines not on this page · raw message

arch/ppc/kernel/pmac_setup.c +3 -2
diff -uNr linux-2.2.12-pristine/arch/ppc/kernel/pmac_setup.c linux-2.2.12/arch/ppc/kernel/pmac_setup.c
@@ -640,8 +640,9 @@
         ppc_ide_md.ide_init_hwif = pmac_ide_init_hwif_ports;
 
 	/* _IO_BASE isn't set yet, so it's just as well that
-	   ppc_ide_md.io_base isn't used any more. :-) */
-        ppc_ide_md.io_base = _IO_BASE;
+	   ppc_ide_md.io_base isn't used any more. :-)
+        ppc_ide_md.io_base = _IO_BASE;	*/
+	ppc_ide_md.io_base = 0;
 #endif		
 }
 
drivers/block/ide-pmac.c +3 -3
diff -uNr linux-2.2.12-pristine/drivers/block/ide-pmac.c linux-2.2.12/drivers/block/ide-pmac.c
@@ -110,10 +110,10 @@
 	pio = ide_get_best_pio_mode(drive, pio, 4, &d);
 	switch (pio) {
 	case 4:
-		out_le32((unsigned *)(IDE_DATA_REG + 0x200 + _IO_BASE), 0x211025);
+		out_le32((unsigned *)(IDE_DATA_REG + 0x200), 0x211025);
 		break;
 	default:
-		out_le32((unsigned *)(IDE_DATA_REG + 0x200 + _IO_BASE), 0x2f8526);
+		out_le32((unsigned *)(IDE_DATA_REG + 0x200), 0x2f8526);
 		break;
 	}
 }
@@ -183,7 +183,7 @@
 		if (i >= MAX_HWIFS)
 			break;
 
-		base = (unsigned long) ioremap(np->addrs[0].address, 0x200) - _IO_BASE;
+		base = (unsigned long) ioremap(np->addrs[0].address, 0x200);
 
 		/* XXX This is bogus. Should be fixed in the registry by checking
 		   the kind of host interrupt controller, a bit like gatwick
include/asm-ppc/io.h +3 -1
diff -uNr linux-2.2.12-pristine/include/asm-ppc/io.h linux-2.2.12/include/asm-ppc/io.h
@@ -32,7 +32,9 @@
 extern unsigned long isa_io_base;
 extern unsigned long isa_mem_base;
 extern unsigned long pci_dram_offset;
-#define _IO_BASE	isa_io_base
+/* We're correcting io base addresses in pci fixup code */
+/* #define _IO_BASE	isa_io_base */
+#define _IO_BASE	0
 #define _ISA_MEM_BASE	isa_mem_base
 #define PCI_DRAM_OFFSET	pci_dram_offset
 #endif /* CONFIG_APUS */
#1 lore raw

Hi,

Quoted 8 lines

Here is another round of PCI patches for the PowerMacs, against 2.2.12 official.

It includes all my previous patches, cleaned up a bit, with the special cases upon region enabling removed for VGA and IDE, and with special care for PlanB. That's since with OF's assignments, PlanB collides with the memory held by control.

Quoted 6 lines

I haven't had time to investigate the potential PCMCIA problems nor find an appropriate solution, so this PCI stuff might need to change further. I just wanted to get it out the door, since more and more people seem to be bothered by the lack of fixup code for the PCI bus.

Enjoy, and report any and all problems to me!

It looks OK to me, but of course I'm no PPC expert...

Have a nice fortnight

Signature · 5 lines
Martin `MJ' Mares   <[email protected]>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"This message transmited on 100% recycled electrons."

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/