diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-07-20 14:49:29 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-07-23 23:30:11 -0400 |
commit | 7391ff35b241dbcba471e05059b5c05fdc8196db (patch) | |
tree | 80cfb39a1c647fb9807bc2917d72ad52edfb517b | |
parent | f64fddbeac737bfc8d966423f067a9af9eeec887 (diff) |
[POWERPC] Make sure virtual P2P bridge registers are setup on PCIe PHB
For the Freescale PCIe PHBs Not all firmwares setup the virtual P2P
bridge registers properly. Make sure they get setup based on what
the struct pci_controller got from the device tree.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index dcd0ca86bdf6..f88a9aecdf16 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -118,11 +118,24 @@ static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev) | |||
118 | return; | 118 | return; |
119 | } | 119 | } |
120 | 120 | ||
121 | /* Clear out any of the virtual P2P bridge registers */ | ||
122 | pci_write_config_word(dev, PCI_IO_BASE_UPPER16, 0); | ||
123 | pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, 0); | ||
124 | pci_write_config_byte(dev, PCI_IO_BASE, 0x10); | ||
125 | pci_write_config_byte(dev, PCI_IO_LIMIT, 0); | ||
126 | pci_write_config_word(dev, PCI_MEMORY_BASE, 0x10); | ||
127 | pci_write_config_word(dev, PCI_MEMORY_LIMIT, 0); | ||
128 | pci_write_config_word(dev, PCI_PREF_BASE_UPPER32, 0x0); | ||
129 | pci_write_config_word(dev, PCI_PREF_LIMIT_UPPER32, 0x0); | ||
130 | pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, 0x10); | ||
131 | pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, 0); | ||
132 | |||
121 | if (hose->io_resource.flags) { | 133 | if (hose->io_resource.flags) { |
122 | res = &dev->resource[res_idx++]; | 134 | res = &dev->resource[res_idx++]; |
123 | res->start = hose->io_resource.start; | 135 | res->start = hose->io_resource.start; |
124 | res->end = hose->io_resource.end; | 136 | res->end = hose->io_resource.end; |
125 | res->flags = hose->io_resource.flags; | 137 | res->flags = hose->io_resource.flags; |
138 | update_bridge_resource(dev, res); | ||
126 | } | 139 | } |
127 | 140 | ||
128 | for (i = 0; i < 3; i++) { | 141 | for (i = 0; i < 3; i++) { |
@@ -130,6 +143,7 @@ static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev) | |||
130 | res->start = hose->mem_resources[i].start; | 143 | res->start = hose->mem_resources[i].start; |
131 | res->end = hose->mem_resources[i].end; | 144 | res->end = hose->mem_resources[i].end; |
132 | res->flags = hose->mem_resources[i].flags; | 145 | res->flags = hose->mem_resources[i].flags; |
146 | update_bridge_resource(dev, res); | ||
133 | } | 147 | } |
134 | } | 148 | } |
135 | 149 | ||