diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-07-25 01:29:53 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-07-25 01:29:53 -0400 |
commit | 7659c038d3d0a635b5aeff04aed523d7b6c1dde8 (patch) | |
tree | d75e5abe82a97bb029dac6dec5c77dfdeeb8437e | |
parent | 0de085bb474f64e4fdb2f1ff3268590792648c7b (diff) |
[POWERPC] Fix PCI indirect for big-endian cfg_addr
We didn't actually propogate the flag we pass into setup_indirect_pci()
to set indirect_type and thus were getting the wrong endianness if
PPC_INDIRECT_TYPE_BIG_ENDIAN was set.
Also, we need to or in additional flags rather than just doing a
direct assignment.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/indirect_pci.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 51c223385feb..87122275c9b4 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -216,7 +216,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary) | |||
216 | 216 | ||
217 | /* check PCI express link status */ | 217 | /* check PCI express link status */ |
218 | if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { | 218 | if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { |
219 | hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG | | 219 | hose->indirect_type |= PPC_INDIRECT_TYPE_EXT_REG | |
220 | PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS; | 220 | PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS; |
221 | if (fsl_pcie_check_link(hose)) | 221 | if (fsl_pcie_check_link(hose)) |
222 | hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK; | 222 | hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK; |
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index a8ac2dfdd3d4..5294560c7b00 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
@@ -160,4 +160,5 @@ setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data, u32 | |||
160 | mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); | 160 | mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); |
161 | hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK); | 161 | hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK); |
162 | hose->ops = &indirect_pci_ops; | 162 | hose->ops = &indirect_pci_ops; |
163 | hose->indirect_type = flags; | ||
163 | } | 164 | } |