[PATCH 2/2] sb1250: Initialize io_map_base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Correctly initialize io_map_base for the SB1250 PCI controller as
required for proper iomap support.  Based on a proposal from Daniel
Jacobowitz.

Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
---
Hello,

 This is the second half of a set of two changes resulting from my
investigation of how proper iomap support should be done for the SB1250 in
response to a report from Daniel.  This patch has to be applied on top of
the first half.  Tested successfully with a SWARM board and a pair of
DEFPA cards in the port I/O mode on either of the PCI buses each with no
regressions.  Note the driver used does not make use of the iomap feature
at the moment so the feature was not exactly tested, but is conceptually
correct.

 Please apply.

  Maciej

patch-2.6.26-rc1-20080505-drow-sb1250-pci-io-3
diff -up --recursive --new-file linux-2.6.26-rc1-20080505.macro/arch/mips/pci/pci-sb1250.c linux-2.6.26-rc1-20080505/arch/mips/pci/pci-sb1250.c
--- linux-2.6.26-rc1-20080505.macro/arch/mips/pci/pci-sb1250.c	2008-06-08 23:39:46.000000000 +0000
+++ linux-2.6.26-rc1-20080505/arch/mips/pci/pci-sb1250.c	2008-06-08 23:45:01.000000000 +0000
@@ -207,6 +207,7 @@ struct pci_controller sb1250_controller 
 
 static int __init sb1250_pcibios_init(void)
 {
+	void __iomem *io_map_base;
 	uint32_t cmdreg;
 	uint64_t reg;
 	extern int pci_probe_only;
@@ -253,9 +254,9 @@ static int __init sb1250_pcibios_init(vo
 	 * works correctly with most of Linux's drivers.
 	 * XXX ehs: Should this happen in PCI Device mode?
 	 */
-
-	set_io_port_base((unsigned long)
-			 ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES, 65536));
+	io_map_base = ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES, 1024 * 1024);
+	sb1250_controller.io_map_base = io_map_base;
+	set_io_port_base((unsigned long)io_map_base);
 
 #ifdef CONFIG_SIBYTE_HAS_LDT
 	/*


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux