powerpc: enable access to HT Host-Bridge on Maple
PATCH 1/1 powerpc: enable access to HT Host-Bridge on Maple
CPC925/CPC945 use special window to access host bridge functionality of u3-ht. Provide a way to access this device.
--- arch/powerpc/platforms/maple/pci.c | 55 ++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-)
arch/powerpc/platforms/maple/pci.c +55 -0
@@ -207,6 +207,54 @@ static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose,return hose->cfg_data +u3_ht_cfa1 (bus, devfn, offset); } +static int u3_ht_root_read_config (struct pci_controller *hose,u8 offset, +int len,u32 *val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr; + addr += ((offset & ~3 ) <<2 ) + (4 - len - (offset &3 )); + +switch (len) { +case 1 : + *val =in_8 (addr); +break ; +case 2 : + *val =in_be16 (addr); +break ; +default : + *val =in_be32 (addr); +break ; + } + +return PCIBIOS_SUCCESSFUL ; +} + +static int u3_ht_root_write_config (struct pci_controller *hose,u8 offset, +int len,u32 val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr + ((offset & ~3 ) <<2 ) + (4 - len - (offset &3 )); + +if (offset >=PCI_BASE_ADDRESS_0 && offset <PCI_CAPABILITY_LIST ) +return PCIBIOS_SUCCESSFUL ; + +switch (len) { +case 1 : +out_8 (addr, val); +break ; +case 2 : +out_be16 (addr, val); +break ; +default : +out_be32 (addr, val); +break ; + } + +return PCIBIOS_SUCCESSFUL ; +} +static int u3_ht_read_config (struct pci_bus *bus,unsigned int devfn,int offset,int len,u32 *val) {
@@ -217,6 +265,9 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,if (hose ==NULL )return PCIBIOS_DEVICE_NOT_FOUND ; +if (bus->number == hose->first_busno && devfn ==PCI_DEVFN (0 ,0 )) +return u3_ht_root_read_config (hose, offset, len, val); +if (offset >0xff )return PCIBIOS_BAD_REGISTER_NUMBER ;
@@ -252,6 +303,9 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,if (hose ==NULL )return PCIBIOS_DEVICE_NOT_FOUND ; +if (bus->number == hose->first_busno && devfn ==PCI_DEVFN (0 ,0 )) +return u3_ht_root_write_config (hose, offset, len, val); +if (offset >0xff )return PCIBIOS_BAD_REGISTER_NUMBER ;
@@ -428,6 +482,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)* reg_property and using some accessor functions instead */ hose->cfg_data =ioremap (0xf2000000 ,0x02000000 ); + hose->cfg_addr =ioremap (0xf8070000 ,0x1000 ); hose->first_busno =0 ; hose->last_busno =0xef ;
Signature · 1 line
1.7.5.4
Quoted 2 lines
CPC925/CPC945 use special window to access host bridge functionality of u3-ht. Provide a way to access this device.
Why? Is anything going to use it?
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 216
Quoted 8 lines
+static int u3_ht_root_read_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +6
-0+ int len, u32 *val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr; + addr += ((offset & ~3 ) <<2 ) + (4 - len - (offset &3 ));
This will only work for len 1,2,4 with offset a multiple of len, is that guaranteed here?
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 241
Quoted 11 lines
+static int u3_ht_root_write_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +5
-0+ int len, u32 val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr + ((offset & ~3) << 2) + (4 - len - (offset& 3));
arch/powerpc/platforms/maple/pci.c +3
-0+ +if (offset >=PCI_BASE_ADDRESS_0 && offset <PCI_CAPABILITY_LIST ) +return PCIBIOS_SUCCESSFUL ;
This is a workaround for something; at the very least it needs a comment, but probably it shouldn't be here at all.
arch/powerpc/platforms/maple/pci.c static int u3_ht_read_config(struct pci_bus · line 273
Quoted 13 lines
static int u3_ht_read_config(struct
pci_bus*bus, unsigned int devfn,arch/powerpc/platforms/maple/pci.c +3
-0int offset, int len, u32 *val) {@@ -217,6 +265,9 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, if (hose == NULL)return PCIBIOS_DEVICE_NOT_FOUND ; +if (bus->number == hose->first_busno && devfn ==PCI_DEVFN (0 ,0 )) +return u3_ht_root_read_config (hose, offset, len, val); +if (offset >0xff )return PCIBIOS_BAD_REGISTER_NUMBER ;
u3_ht_root_read_config() can get an offset out of range this way.
arch/powerpc/platforms/maple/pci.c static void __init setup_u3_ht(struct pci_controller* hose) · line 485
Quoted 2 lines
arch/powerpc/platforms/maple/pci.c +1
-0hose->cfg_data =ioremap (0xf2000000 ,0x02000000 ); + hose->cfg_addr =ioremap (0xf8070000 ,0x1000 );
Eww. You could just make a global instead of abusing existing fields, there can be only one CPC9x5 in a system anyway.
Segher
Hello,
Thanks for the review.
Quoted 5 lines · Segher Boessenkool
Quoted 3 lines
CPC925/CPC945 use special window to access host bridge functionality of
u3-ht. Provide a way to access this device.Why? Is anything going to use it?
Hmmm. Why not? Initially I stumbled upon the fact that powermac provides such acces. Then I discovered that it provides configuration for memory windows and other parts. (I needed it for my hack to add AGP bridge on U3 in Linux, as I didn't want to change firmware).
Quoted 11 lines
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 216
Quoted 8 lines
+static int u3_ht_root_read_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +6
-0+ int len, u32 *val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr; + addr += ((offset & ~3 ) <<2 ) + (4 - len - (offset &3 ));This will only work for len 1,2,4 with offset a multiple of len, is that guaranteed here?
I have to check. I think there is no guarantee, but standard accessors are created exactly for 1, 2 and 4-byte access. And IIRC according to PCI specs, offset should be len-aligned.
Quoted 7 lines
Quoted 7 lines
+static int u3_ht_root_write_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +5
-0+ int len, u32 val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr + ((offset & ~3) << 2) + (4 - len - (offset
Quoted 8 lines
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 241
Quoted 4 lines
& 3));
arch/powerpc/platforms/maple/pci.c +3
-0+ +if (offset >=PCI_BASE_ADDRESS_0 && offset <PCI_CAPABILITY_LIST ) +return PCIBIOS_SUCCESSFUL ;This is a workaround for something; at the very least it needs a comment,
but probably it shouldn't be here at all.
I'll add a comment. Basically these registers are unimplemented on u3/u4 bridges and at least some kinds of access to them cause system freeze. I'll try to check what triggers what this night.
Quoted 8 lines
Quoted 8 lines
static int u3_ht_read_config(struct
pci_bus*bus, unsigned int devfn,arch/powerpc/platforms/maple/pci.c +0
-0int offset, int len, u32 *val) {@@ -217,6 +265,9 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, if (hose == NULL)return PCIBIOS_DEVICE_NOT_FOUND ;
Quoted 7 lines
arch/powerpc/platforms/maple/pci.c static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, · line 272
Quoted 5 lines
arch/powerpc/platforms/maple/pci.c +3
-0+if (bus->number == hose->first_busno && devfn ==PCI_DEVFN (0 ,0 )) +return u3_ht_root_read_config (hose, offset, len, val); +if (offset >0xff )return PCIBIOS_BAD_REGISTER_NUMBER ;
u3_ht_root_read_config()can get an offset out of range this way.
Yes, as offsets for this host bridge can be larger then 0xff. U3/U4 have some HT configuration there, and I didn't want to impose a limit there. If you are against this, I can change the order of calls.
Quoted 6 lines
arch/powerpc/platforms/maple/pci.c static void __init setup_u3_ht(struct pci_controller* hose) · line 485
Quoted 3 lines
arch/powerpc/platforms/maple/pci.c +1
-0hose->cfg_data =ioremap (0xf2000000 ,0x02000000 ); + hose->cfg_addr =ioremap (0xf8070000 ,0x1000 );Eww. You could just make a global instead of abusing existing fields, there can be only one CPC9x5 in a system anyway.
This was a copy-paste of corresponding PowerMac code. Do you really want for me to change this to global variable?
BTW: I see a lot of code duplication between PowerMac and Maple pci.c files. Would you like a patch that merges those files to something like arch/powerpc/sysdev/u3-pci.c? I can try merging them...
Signature · 2 lines
With best wishes Dmitry
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
CPC925/CPC945 use special window to access host bridge functionality of
u3-ht. Provide a way to access this device.Why? Is anything going to use it?
Hmmm. Why not?
Because if nothing uses it it is essentially dead code.
Quoted 3 lines
Initially I stumbled upon the fact that powermac provides
such acces. Then I discovered that it provides configuration for memory windows and other parts.
There are no memory windows in there afaik. The main use is the HT link config stuff, which in a few places needs special handling to work :-/
Quoted 2 lines
(I needed it for my hack to add AGP bridge on U3 in Linux, as I didn't want to change firmware).
Can you tell more about this?
Quoted 12 lines
Quoted 11 lines
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 216
Quoted 8 lines
+static int u3_ht_root_read_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +6
-0+ int len, u32 *val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr; + addr += ((offset & ~3 ) <<2 ) + (4 - len - (offset &3 ));This will only work for len 1,2,4 with offset a multiple of len, is that guaranteed here?
Quoted 3 lines
I have to check. I think there is no guarantee, but standard accessors are created exactly for 1, 2 and 4-byte access. And IIRC according to PCI specs, offset should be len-aligned.
If other places that need it do not do an alignment check, you don't need to either I suppose. But could you make the switch for length have explicit 1,2,4 and default error?
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
+static int u3_ht_root_write_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +5
-0+ int len, u32 val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr + ((offset & ~3) << 2) + (4 - len - (offsetQuoted 8 lines
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 241
Quoted 4 lines
& 3));
arch/powerpc/platforms/maple/pci.c +3
-0+ +if (offset >=PCI_BASE_ADDRESS_0 && offset <PCI_CAPABILITY_LIST ) +return PCIBIOS_SUCCESSFUL ;This is a workaround for something; at the very least it needs a comment,
but probably it shouldn't be here at all.
Quoted 3 lines
I'll add a comment. Basically these registers are unimplemented on u3/u4 bridges and at least some kinds of access to them cause system freeze. I'll try to check what triggers what this night.
I don't think the hardware freezes, but probably Linux isn't happy when it tries to write to the non-existent BARs. Or something like that.
Quoted 17 lines
Quoted 9 lines
Quoted 9 lines
static int u3_ht_read_config(struct
pci_bus*bus, unsigned int
devfn,arch/powerpc/platforms/maple/pci.c +0
-0int offset, int len, u32 *val) {@@ -217,6 +265,9 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, if (hose == NULL)return PCIBIOS_DEVICE_NOT_FOUND ;Quoted 7 lines
arch/powerpc/platforms/maple/pci.c static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, · line 272
Quoted 5 lines
arch/powerpc/platforms/maple/pci.c +3
-0+if (bus->number == hose->first_busno && devfn ==PCI_DEVFN (0 ,0 )) +return u3_ht_root_read_config (hose, offset, len, val); +if (offset >0xff )return PCIBIOS_BAD_REGISTER_NUMBER ;
u3_ht_root_read_config()can get an offset out of range this way.
Quoted 3 lines
Yes, as offsets for this host bridge can be larger then
0xff. U3/U4 have some HT configuration there, and I didn't want to impose a limit there. If you are against this, I can change the order of calls.
The HT config is at (PCI) offset 0x40. There are no implemented registers at PCI offset >= 0x100. That corresponds to f8070000..f80703ff, there's one 4-byte PCI reg per 16 byte U3 bus address.
Quoted 8 lines
Quoted 5 lines
arch/powerpc/platforms/maple/pci.c static void __init setup_u3_ht(struct pci_controller* hose) · line 485
Quoted 2 lines
arch/powerpc/platforms/maple/pci.c +1
-0hose->cfg_data =ioremap (0xf2000000 ,0x02000000 ); + hose->cfg_addr =ioremap (0xf8070000 ,0x1000 );Eww. You could just make a global instead of abusing existing fields, there can be only one CPC9x5 in a system anyway.
This was a copy-paste of corresponding PowerMac code. Do you really want for me to change this to global variable?
It could use a comment at least. The addresses aren't "cfg_data" and "cfg_addr" at all.
Quoted 3 lines
BTW: I see a lot of code duplication between PowerMac and Maple
pci.cfiles. Would you like a patch that merges those files to something likearch/powerpc/sysdev/u3-pci.c? I can try merging them...
That would be most excellent! I hope there isn't much pmac special-casing needed for that.
Thanks,
Segher
Quoted 9 lines · Segher Boessenkool
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
CPC925/CPC945 use special window to access host bridge functionality of
u3-ht. Provide a way to access this device.Why? Is anything going to use it?
Hmmm. Why not?
Because if nothing uses it it is essentially dead code.
1) It provides some (possibly debug) information to users
2) It provides a way to configure (e.g. HT address mask (reg 80), some bridge control regs (around c0-ff), etc.
Quoted 8 lines
Quoted 4 lines
Initially I stumbled upon the fact that powermac provides such acces. Then I discovered that it provides configuration for memory windows
and other parts.There are no memory windows in there afaik. The main use is the HT link config stuff, which in a few places needs special handling to work :-/
Register 80 (0xf8070200) is an HT1 address mask, which configures which memory belongs to HT bridge & devices (contrary to AGP/PCIe)
Quoted 4 lines
Quoted 2 lines
(I needed it for my hack to add AGP bridge on U3 in Linux, as I didn't want to change firmware).
Can you tell more about this?
I have a Mapple-D board (aka IBM PPC970FX ev. kit). It has an AGP slot, which I would like to use. The slot is unsupported in PIBS (the original firmware) (it doesn't enumerate devices behind the slot, it doesn't setup it, it doesn't put u3-agp in device tree).
I didn't want to hack the PIBS (at least while it's possible and for initial debug of the hardware setup),
so I had to develop a patch for Linux kernel which would:
1) configure hardware (memory windows, IRQs, etc).
2) tell Linux about the AGP bridge.
Second part is more or less complete (with some hacks though). Basically I register an u3-agp slot if there is no u3-agp and u4-pcie devices. This still needs an improvement before I'd submit this code anywhere.
I've mostly finished the HW setup (I can see devices behind the bridge). The radeon plugged into AGP slot starts to warm up, but it fails somewhere. The thing I still miss (or at least one of them) is the IRQ routing. Ben gave me some possible pointers, so I'll have to check if he is right or not. Unfortunately
I still hand't time to accomplish this. I can show my (possibly a bit ugly) code,
but it still doesn't fully work.
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 216
Quoted 8 lines
+static int u3_ht_root_read_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +6
-0+ int len, u32 *val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr; + addr += ((offset & ~3 ) <<2 ) + (4 - len - (offset &3 ));This will only work for len 1,2,4 with offset a multiple of len, is that
guaranteed here?
Quoted 8 lines
Quoted 3 lines
I have to check. I think there is no guarantee, but standard accessors are created exactly for 1, 2 and 4-byte access. And IIRC according to PCI specs, offset should be len-aligned.
If other places that need it do not do an alignment check, you don't need
to either I suppose. But could you make the switch for length have explicit 1,2,4 and default error?
Yes, of course. I wanted to overcome this, but of course I can split it back to the switch.
BTW: the corresponding PowerMac code has a bug: try reading VID/DID as a byte. word and dword and compare the outcome with the output from typical PCI device.
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 241
Quoted 11 lines
+static int u3_ht_root_write_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +5
-0+ int len, u32 val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr + ((offset & ~3) << 2) + (4 - len - (offset& 3));
arch/powerpc/platforms/maple/pci.c +3
-0+ +if (offset >=PCI_BASE_ADDRESS_0 && offset <PCI_CAPABILITY_LIST ) +return PCIBIOS_SUCCESSFUL ;This is a workaround for something; at the very least it needs a comment,
but probably it shouldn't be here at all.
Quoted 8 lines
Quoted 4 lines
I'll add a comment. Basically these registers are unimplemented on u3/u4
bridges and at least some kinds of access to them cause system freeze. I'll try to check what triggers what this night.I don't think the hardware freezes, but probably Linux isn't happy when it
tries to write to the non-existent BARs. Or something like that.
IIRC I've had problems even when reading. Will run an experiment tomorrow.
Quoted 23 lines
Quoted 17 lines
Quoted 9 lines
Quoted 9 lines
static int u3_ht_read_config(struct
pci_bus*bus, unsigned int
devfn,arch/powerpc/platforms/maple/pci.c +0
-0int offset, int len, u32 *val) {@@ -217,6 +265,9 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, if (hose == NULL)return PCIBIOS_DEVICE_NOT_FOUND ;Quoted 7 lines
arch/powerpc/platforms/maple/pci.c static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, · line 272
Quoted 5 lines
arch/powerpc/platforms/maple/pci.c +3
-0+if (bus->number == hose->first_busno && devfn ==PCI_DEVFN (0 ,0 )) +return u3_ht_root_read_config (hose, offset, len, val); +if (offset >0xff )return PCIBIOS_BAD_REGISTER_NUMBER ;
u3_ht_root_read_config()can get an offset out of range this way.Quoted 5 lines
Yes, as offsets for this host bridge can be larger then
0xff. U3/U4 have
some HT configuration there, and I didn't want to impose a limit there.
If you are against this, I can change the order of calls.
Quoted 4 lines
The HT config is at (PCI) offset
0x40. There are no implemented registers
at PCI offset >=0x100. That corresponds tof8070000..f80703ff, there's one 4-byte PCI reg per 16 byte U3 bus address.
Hmmm. I saw the "HT Performance Monitor" part of the U4 spec, but didn't notice that all regs are marked as "not implemented".
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
arch/powerpc/platforms/maple/pci.c static void __init setup_u3_ht(struct pci_controller* hose) · line 485
Quoted 2 lines
arch/powerpc/platforms/maple/pci.c +1
-0hose->cfg_data =ioremap (0xf2000000 ,0x02000000 ); + hose->cfg_addr =ioremap (0xf8070000 ,0x1000 );Eww. You could just make a global instead of abusing existing fields,
there can be only one CPC9x5 in a system anyway.
Quoted 6 lines
Quoted 3 lines
This was a copy-paste of corresponding PowerMac code. Do you really want
for me to change this to global variable?It could use a comment at least. The addresses aren't "
cfg_data" and "cfg_addr" at all.
Fine, I'll add a comment here.
Quoted 7 lines
Quoted 3 lines
BTW: I see a lot of code duplication between PowerMac and Maple
pci.cfiles. Would you like a patch that merges those files to something likearch/powerpc/sysdev/u3-pci.c? I can try merging them...That would be most excellent! I hope there isn't much pmac special- casing
needed for that.
Still have to check. Please don't expect a patch soon.
Signature · 2 lines
With best wishes Dmitry
Hello,
Quoted 16 lines · Segher Boessenkool
Quoted 16 lines
Quoted 15 lines
Quoted 11 lines
+static int u3_ht_root_write_config(struct
pci_controller*hose, u8 offset,
+ int len, u32 val)arch/powerpc/platforms/maple/pci.c +4
-0+{ +volatile void __iomem *addr; + + addr = hose->cfg_addr + ((offset & ~3) << 2) + (4 - len - (offset& 3));
+
+ if (offset >=PCI_BASE_ADDRESS_0&& offset <PCI_CAPABILITY_LIST)
+ returnPCIBIOS_SUCCESSFUL;This is a workaround for something; at the very least it needs a comment,
but probably it shouldn't be here at all.
Quoted 6 lines
Quoted 3 lines
I'll add a comment. Basically these registers are unimplemented on u3/u4 bridges and at least some kinds of access to them cause system freeze. I'll try to check what triggers what this night.
I don't think the hardware freezes, but probably Linux isn't happy when it tries to write to the non-existent BARs. Or something like that.
I've run several experiments. At least writing to the ROM_ADDRESS (0x30) causes some kind of strange reboot (I see 'Error: Magic number in message area NVRAM is not valid.') errors on the service console and Linux consoles are silent. Writing to other BARs seem to cause no direct effect (reg remains =0), but causes very strange behaviour during boot. All PCI access cycles seem to return 0, strange DRAM ECC error pops up, etc. I'd prefer to leave these register writes disabled, even if it's the problem of some hardware revision (?).
Signature · 2 lines
With best wishes Dmitry
Quoted 6 lines · Segher Boessenkool
Quoted 3 lines
CPC925/CPC945 use special window to access host bridge functionality of
u3-ht. Provide a way to access this device.Why? Is anything going to use it?
Quoted 11 lines
arch/powerpc/platforms/maple/pci.c static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, · line 216
Quoted 8 lines
+static int u3_ht_root_read_config(struct
pci_controller*hose, u8 offset,arch/powerpc/platforms/maple/pci.c +6
-0+ int len, u32 *val) +{ +volatile void __iomem *addr; + + addr = hose->cfg_addr; + addr += ((offset & ~3 ) <<2 ) + (4 - len - (offset &3 ));This will only work for len 1,2,4 with offset a multiple of len, is that guaranteed here?
I think the upper layer does. Dbl check tho.
Quoted 5 lines
arch/powerpc/platforms/maple/pci.c static void __init setup_u3_ht(struct pci_controller* hose) · line 485
Quoted 2 lines
arch/powerpc/platforms/maple/pci.c +1
-0hose->cfg_data =ioremap (0xf2000000 ,0x02000000 ); + hose->cfg_addr =ioremap (0xf8070000 ,0x1000 );Eww. You could just make a global instead of abusing existing fields, there can be only one CPC9x5 in a system anyway.
Nah, that's fine, we abuse it that way regulary :-)
Cheers,
Ben.