Skip to contentSkip to conversation

Au1000 : fix PCI controller registration

PATCH In review Florian Fainelli 2 participants 6 messages Sep 25, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 Au1000 : fix PCI controller registration

The PCI controller fails to register, as PCI_MEM_END was greater than IOMEM_RESOURCE_END and Au1500_PCI_IO_END was greater than IOPORT_RESOURCE_END

IO{MEM,PORT}_RESOURCE_END value were adjust to represent the actual memory map of the au1x00.

include/asm-mips/mach-au1x00/au1000.h +2 -2
index 58fca8a..046920a 100644
@@ -1680,9 +1680,9 @@ extern au1xxx_irq_map_t au1xxx_irq_map[];
 #define PCI_LAST_DEVFN  (19<<3)
 
 #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */
-#define IOPORT_RESOURCE_END   0xffffffff
+#define IOPORT_RESOURCE_END   0xfffffffffULL
 #define IOMEM_RESOURCE_START  0x10000000
-#define IOMEM_RESOURCE_END    0xffffffff
+#define IOMEM_RESOURCE_END    0xfffffffffULL
 
   /*
    * Borrowed from the PPC arch:
#1 lore raw

include/asm-mips/mach-au1x00/au1000.h extern au1xxx_irq_map_t au1xxx_irq_map[]; · line 1683

Quoted 10 lines · Florian Fainelli
include/asm-mips/mach-au1x00/au1000.h +1 -1
index 58fca8a..046920a 100644
@@ -1680,9 +1680,9 @@ extern au1xxx_irq_map_t au1xxx_irq_map[];
 #define PCI_LAST_DEVFN  (19<<3)
 
 #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */
-#define IOPORT_RESOURCE_END   0xffffffff
+#define IOPORT_RESOURCE_END   0xfffffffffULL

So you're saying that PCI has just under 64GB worth of ioport address space on Alchemy? That's not how I recall my PCI spec ...

Ralf

#2 lore raw

Le mardi 25 septembre 2007, Ralf Baechle a écrit :

Quoted 8 lines · Florian Fainelli
Quoted 7 lines
(quoted diff) +0 -0

b/include/asm-mips/mach-au1x00/au1000.h index 58fca8a..046920a 100644

include/asm-mips/mach-au1x00/au1000.h +0 -0
@@ -1680,9 +1680,9 @@ extern au1xxx_irq_map_t au1xxx_irq_map[];
 #define PCI_LAST_DEVFN  (19<<3)
 
Quoted 6 lines

include/asm-mips/mach-au1x00/au1000.h extern au1xxx_irq_map_t au1xxx_irq_map[]; · line 1683

Quoted 3 lines
include/asm-mips/mach-au1x00/au1000.h +1 -1
 #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */
-#define IOPORT_RESOURCE_END   0xffffffff
+#define IOPORT_RESOURCE_END   0xfffffffffULL

So you're saying that PCI has just under 64GB worth of ioport address space on Alchemy? That's not how I recall my PCI spec ...

Errm, no, actually, Alchemy has a 36bits PCI adressing mode if I recall right.

Quoted 2 lines

Ralf

Signature · 2 lines
Cordialement, Florian Fainelli
------------------------------
#3 lore raw
Quoted 8 lines · Florian Fainelli
Quoted 6 lines

include/asm-mips/mach-au1x00/au1000.h extern au1xxx_irq_map_t au1xxx_irq_map[]; · line 1683

Quoted 3 lines

#define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */

include/asm-mips/mach-au1x00/au1000.h +1 -1
-#define IOPORT_RESOURCE_END   0xffffffff
+#define IOPORT_RESOURCE_END   0xfffffffffULL

So you're saying that PCI has just under 64GB worth of ioport address space on Alchemy? That's not how I recall my PCI spec ...

Errm, no, actually, Alchemy has a 36bits PCI adressing mode if I recall right.

Nope. IOspace is max. 4GB with PCI, even on 64-bit PCI.

Ralf

#4 lore raw

Le mardi 25 septembre 2007, Ralf Baechle a écrit :

Quoted 8 lines · Florian Fainelli
Quoted 7 lines
Quoted 6 lines

include/asm-mips/mach-au1x00/au1000.h extern au1xxx_irq_map_t au1xxx_irq_map[]; · line 1683

Quoted 3 lines

#define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */

include/asm-mips/mach-au1x00/au1000.h +1 -1
-#define IOPORT_RESOURCE_END   0xffffffff
+#define IOPORT_RESOURCE_END   0xfffffffffULL

So you're saying that PCI has just under 64GB worth of ioport address space on Alchemy? That's not how I recall my PCI spec ...

Quoted 4 lines
Quoted 2 lines

Errm, no, actually, Alchemy has a 36bits PCI adressing mode if I recall right.

Nope. IOspace is max. 4GB with PCI, even on 64-bit PCI.

Talking with John Crispin, the MTX-1 really needs this 64Gb IO space thing, otherwise it does not work and the PCI controller still does not register. We are preparing a real fix for this.

Quoted 2 lines

Ralf

Signature · 2 lines
Cordialement, Florian Fainelli
------------------------------
#5 lore raw

PATCH 2/3 Au1000 : fix PCI controller registration

In reply to Florian Fainelli

The PCI controller fails to register, as PCI_MEM_END was greater than IOMEM_RESOURCE_END and Au1500_PCI_IO_END was greater than IOPORT_RESOURCE_END

IO{MEM,PORT}_RESOURCE_END value were adjust to represent the actual memory map of the au1x00.

The previous patch introduced a 64GB PCI adressing space, which is wrong.

include/asm-mips/mach-au1x00/au1000.h +2 -2
index 58fca8a..d5dbe64 100644
@@ -1680,9 +1680,9 @@ extern au1xxx_irq_map_t au1xxx_irq_map[];
 #define PCI_LAST_DEVFN  (19<<3)
 
 #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */
-#define IOPORT_RESOURCE_END   0xffffffff
+#define IOPORT_RESOURCE_END   0xffffffffULL
 #define IOMEM_RESOURCE_START  0x10000000
-#define IOMEM_RESOURCE_END    0xffffffff
+#define IOMEM_RESOURCE_END    0xffffffffULL
 
   /*
    * Borrowed from the PPC arch: