Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] Alchemy: fix PCI resource conflict
@ 2007-12-06 17:56 Sergei Shtylyov
  2007-12-06 18:26 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2007-12-06 17:56 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips

... by getting the PCI resources back into the 32-bit range -- there's no need
therefore for CONFIG_RESOURCES_64BIT either. This makes Alchemy PCI work again
while currently the kernel skips the bus scan.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

 arch/mips/au1000/Kconfig              |    9 ---------
 arch/mips/au1000/common/pci.c         |    8 ++++----
 include/asm-mips/mach-au1x00/au1000.h |    9 +++++----
 3 files changed, 9 insertions(+), 17 deletions(-)

Index: linux-2.6/arch/mips/au1000/Kconfig
===================================================================
--- linux-2.6.orig/arch/mips/au1000/Kconfig
+++ linux-2.6/arch/mips/au1000/Kconfig
@@ -7,7 +7,6 @@ config MIPS_MTX1
 	bool "4G Systems MTX-1 board"
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
-	select RESOURCES_64BIT if PCI
 	select SOC_AU1500
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -22,7 +21,6 @@ config MIPS_DB1000
 	select SOC_AU1000
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
-	select RESOURCES_64BIT if PCI
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_DB1100
@@ -44,7 +42,6 @@ config MIPS_DB1500
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
 	select MIPS_DISABLE_OBSOLETE_IDE
-	select RESOURCES_64BIT if PCI
 	select SYS_SUPPORTS_BIG_ENDIAN
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -54,7 +51,6 @@ config MIPS_DB1550
 	select HW_HAS_PCI
 	select DMA_NONCOHERENT
 	select MIPS_DISABLE_OBSOLETE_IDE
-	select RESOURCES_64BIT if PCI
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_MIRAGE
@@ -68,7 +64,6 @@ config MIPS_PB1000
 	select SOC_AU1000
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
-	select RESOURCES_64BIT if PCI
 	select SWAP_IO_SPACE
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -77,7 +72,6 @@ config MIPS_PB1100
 	select SOC_AU1100
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
-	select RESOURCES_64BIT if PCI
 	select SWAP_IO_SPACE
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -86,7 +80,6 @@ config MIPS_PB1200
 	select SOC_AU1200
 	select DMA_NONCOHERENT
 	select MIPS_DISABLE_OBSOLETE_IDE
-	select RESOURCES_64BIT if PCI
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_PB1500
@@ -94,7 +87,6 @@ config MIPS_PB1500
 	select SOC_AU1500
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
-	select RESOURCES_64BIT if PCI
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_PB1550
@@ -103,7 +95,6 @@ config MIPS_PB1550
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
 	select MIPS_DISABLE_OBSOLETE_IDE
-	select RESOURCES_64BIT if PCI
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_XXS1500
Index: linux-2.6/arch/mips/au1000/common/pci.c
===================================================================
--- linux-2.6.orig/arch/mips/au1000/common/pci.c
+++ linux-2.6/arch/mips/au1000/common/pci.c
@@ -39,15 +39,15 @@
 
 /* TBD */
 static struct resource pci_io_resource = {
-	.start	= (resource_size_t)PCI_IO_START,
-	.end	= (resource_size_t)PCI_IO_END,
+	.start	= PCI_IO_START,
+	.end	= PCI_IO_END,
 	.name	= "PCI IO space",
 	.flags	= IORESOURCE_IO
 };
 
 static struct resource pci_mem_resource = {
-	.start	= (resource_size_t)PCI_MEM_START,
-	.end	= (resource_size_t)PCI_MEM_END,
+	.start	= PCI_MEM_START,
+	.end	= PCI_MEM_END,
 	.name	= "PCI memory space",
 	.flags	= IORESOURCE_MEM
 };
Index: linux-2.6/include/asm-mips/mach-au1x00/au1000.h
===================================================================
--- linux-2.6.orig/include/asm-mips/mach-au1x00/au1000.h
+++ linux-2.6/include/asm-mips/mach-au1x00/au1000.h
@@ -1680,10 +1680,11 @@ enum soc_au1200_ints {
 #define Au1500_PCI_MEM_START      0x440000000ULL
 #define Au1500_PCI_MEM_END        0x44FFFFFFFULL
 
-#define PCI_IO_START    (Au1500_PCI_IO_START + 0x1000)
-#define PCI_IO_END      (Au1500_PCI_IO_END)
-#define PCI_MEM_START   (Au1500_PCI_MEM_START)
-#define PCI_MEM_END     (Au1500_PCI_MEM_END)
+#define PCI_IO_START    (u32)(Au1500_PCI_IO_START + 0x1000)
+#define PCI_IO_END      (u32) Au1500_PCI_IO_END
+#define PCI_MEM_START   (u32) Au1500_PCI_MEM_START
+#define PCI_MEM_END     (u32) Au1500_PCI_MEM_END
+
 #define PCI_FIRST_DEVFN (0<<3)
 #define PCI_LAST_DEVFN  (19<<3)
 

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

* Re: [PATCH] Alchemy: fix PCI resource conflict
  2007-12-06 17:56 [PATCH] Alchemy: fix PCI resource conflict Sergei Shtylyov
@ 2007-12-06 18:26 ` Ralf Baechle
  2007-12-06 18:33   ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2007-12-06 18:26 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-mips

On Thu, Dec 06, 2007 at 08:56:06PM +0300, Sergei Shtylyov wrote:
> From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Date: Thu, 6 Dec 2007 20:56:06 +0300
> To: ralf@linux-mips.org
> Cc: linux-mips@linux-mips.org
> Subject: [PATCH] Alchemy: fix PCI resource conflict
> Content-Type: text/plain;
> 	charset="us-ascii"
> 
> ... by getting the PCI resources back into the 32-bit range -- there's no need
> therefore for CONFIG_RESOURCES_64BIT either. This makes Alchemy PCI work again
> while currently the kernel skips the bus scan.

So now you're using the numeric overflow to get things to "work"?

  Ralf

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

* Re: [PATCH] Alchemy: fix PCI resource conflict
  2007-12-06 18:26 ` Ralf Baechle
@ 2007-12-06 18:33   ` Sergei Shtylyov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2007-12-06 18:33 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

Hello.

Ralf Baechle wrote:

>>From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>Date: Thu, 6 Dec 2007 20:56:06 +0300
>>To: ralf@linux-mips.org
>>Cc: linux-mips@linux-mips.org
>>Subject: [PATCH] Alchemy: fix PCI resource conflict
>>Content-Type: text/plain;
>>	charset="us-ascii"

>>... by getting the PCI resources back into the 32-bit range -- there's no need
>>therefore for CONFIG_RESOURCES_64BIT either. This makes Alchemy PCI work again
>>while currently the kernel skips the bus scan.

> So now you're using the numeric overflow to get things to "work"?

    Kinda. :-) Note that it was used in non-PCI case anyway.

>   Ralf

WBR, Sergei

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

end of thread, other threads:[~2007-12-06 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 17:56 [PATCH] Alchemy: fix PCI resource conflict Sergei Shtylyov
2007-12-06 18:26 ` Ralf Baechle
2007-12-06 18:33   ` Sergei Shtylyov

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