summaryrefslogtreecommitdiff
path: root/drivers/pci_auto.c
diff options
context:
space:
mode:
authorEd Swarthout <Ed.Swarthout@freescale.com>2007-07-11 14:52:08 -0500
committerWolfgang Denk <wd@denx.de>2007-07-11 23:43:30 +0200
commite8b85f3ba4cd8930e0a2fea2100c815d64201765 (patch)
treefa463a90ebe3588e61c86d174c78e7cd8ead5975 /drivers/pci_auto.c
parent571f49fa717004ca4268b4e24057efc7bf9f987b (diff)
downloadu-boot-imx-e8b85f3ba4cd8930e0a2fea2100c815d64201765.zip
u-boot-imx-e8b85f3ba4cd8930e0a2fea2100c815d64201765.tar.gz
u-boot-imx-e8b85f3ba4cd8930e0a2fea2100c815d64201765.tar.bz2
pciauto setup bridge
The P2P bridge bus numbers programmed into the device are relative to hose->first_busno. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Diffstat (limited to 'drivers/pci_auto.c')
-rw-r--r--drivers/pci_auto.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pci_auto.c b/drivers/pci_auto.c
index 9fa18e5..f16f8d3 100644
--- a/drivers/pci_auto.c
+++ b/drivers/pci_auto.c
@@ -165,8 +165,10 @@ void pciauto_prescan_setup_bridge(struct pci_controller *hose,
pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &cmdstat);
/* Configure bus number registers */
- pci_hose_write_config_byte(hose, dev, PCI_PRIMARY_BUS, PCI_BUS(dev));
- pci_hose_write_config_byte(hose, dev, PCI_SECONDARY_BUS, sub_bus);
+ pci_hose_write_config_byte(hose, dev, PCI_PRIMARY_BUS,
+ PCI_BUS(dev) - hose->first_busno);
+ pci_hose_write_config_byte(hose, dev, PCI_SECONDARY_BUS,
+ sub_bus - hose->first_busno);
pci_hose_write_config_byte(hose, dev, PCI_SUBORDINATE_BUS, 0xff);
if (pci_mem) {
@@ -219,7 +221,8 @@ void pciauto_postscan_setup_bridge(struct pci_controller *hose,
struct pci_region *pci_io = hose->pci_io;
/* Configure bus number registers */
- pci_hose_write_config_byte(hose, dev, PCI_SUBORDINATE_BUS, sub_bus);
+ pci_hose_write_config_byte(hose, dev, PCI_SUBORDINATE_BUS,
+ sub_bus - hose->first_busno);
if (pci_mem) {
/* Round memory allocator to 1MB boundary */