Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 2/2] sb1250: Initialize io_map_base
@ 2008-06-09 16:20 Maciej W. Rozycki
  2008-06-11 17:19 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2008-06-09 16:20 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Daniel Jacobowitz, linux-mips

 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@linux-mips.org>
---
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
 	/*

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] sb1250: Initialize io_map_base
  2008-06-09 16:20 [PATCH 2/2] sb1250: Initialize io_map_base Maciej W. Rozycki
@ 2008-06-11 17:19 ` Ralf Baechle
  2008-06-16  0:21   ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2008-06-11 17:19 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Daniel Jacobowitz, linux-mips

On Mon, Jun 09, 2008 at 05:20:03PM +0100, Maciej W. Rozycki wrote:

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

Applied.

>  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

I split the two siamese twins since the one is only a cleanup while the
other is 2.6.26 / -stable stuff.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] sb1250: Initialize io_map_base
  2008-06-11 17:19 ` Ralf Baechle
@ 2008-06-16  0:21   ` Maciej W. Rozycki
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2008-06-16  0:21 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Daniel Jacobowitz, linux-mips

On Wed, 11 Jun 2008, Ralf Baechle wrote:

> I split the two siamese twins since the one is only a cleanup while the
> other is 2.6.26 / -stable stuff.

 Both are clean-ups in principle -- if unset .io_map_base is currently
initialized from mips_io_port_base in ioport_map_pci().  Though if you
want to fulfil the promise put there for the -stable branch too...

  Maciej

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-16  0:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 16:20 [PATCH 2/2] sb1250: Initialize io_map_base Maciej W. Rozycki
2008-06-11 17:19 ` Ralf Baechle
2008-06-16  0:21   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox