diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-11-04 11:39:55 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-01-05 13:49:07 -0600 |
commit | 7cb8f79b44c70a3c66891f407254d9c739e2e7da (patch) | |
tree | 2391fe8167005e70b710c32c8cbe1bd02811daf2 /board/tqc | |
parent | 9263e829f025661cbd3a80675285b42c14350ea4 (diff) | |
download | u-boot-imx-7cb8f79b44c70a3c66891f407254d9c739e2e7da.zip u-boot-imx-7cb8f79b44c70a3c66891f407254d9c739e2e7da.tar.gz u-boot-imx-7cb8f79b44c70a3c66891f407254d9c739e2e7da.tar.bz2 |
ppc/85xx: Move to using fsl_setup_hose on TQM 85xx
We can use fsl_setup_hose to determine if we are a agent/end-point or
a host. Rather than using some SoC specific register we can just look
at the PCI cfg space of the host controller to determine this.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board/tqc')
-rw-r--r-- | board/tqc/tqm85xx/tqm85xx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/tqc/tqm85xx/tqm85xx.c b/board/tqc/tqm85xx/tqm85xx.c index 3931ec5..aa7827e 100644 --- a/board/tqc/tqm85xx/tqm85xx.c +++ b/board/tqc/tqm85xx/tqm85xx.c @@ -549,7 +549,6 @@ static inline void init_pci1(void) { volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); #ifdef CONFIG_PCI1 - uint host_agent = (gur->porbmsr & MPC85xx_PORBMSR_HA) >> 16; volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *)CONFIG_SYS_PCI1_ADDR; struct pci_controller *hose = &pci1_hose; struct pci_region *r = hose->regions; @@ -561,7 +560,7 @@ static inline void init_pci1(void) /* PORPLLSR[16] */ uint pci_clk_sel = gur->porpllsr & MPC85xx_PORDEVSR_PCI1_SPD; - uint pci_agent = is_fsl_pci_agent(LAW_TRGT_IF_PCI_1, host_agent); + int pci_agent = fsl_setup_hose(hose, CONFIG_SYS_PCI1_ADDR); uint pci_speed = CONFIG_SYS_CLK_FREQ; /* PCI PSPEED in [4:5] */ @@ -626,14 +625,15 @@ static inline void init_pcie1(void) volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); #ifdef CONFIG_PCIE1 uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19; - uint host_agent = (gur->porbmsr & MPC85xx_PORBMSR_HA) >> 16; volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *)CONFIG_SYS_PCIE1_ADDR; struct pci_controller *hose = &pcie1_hose; - int pcie_ep = is_fsl_pci_agent(LAW_TRGT_IF_PCIE_1, host_agent); + int pcie_ep; struct pci_region *r = hose->regions; int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel); + pcie_ep = fsl_setup_hose(hose, CONFIG_SYS_PCIE1_ADDR); + if (pcie_configured && !(gur->devdisr & MPC85xx_DEVDISR_PCIE)){ printf ("PCIe: %s, base address %x", pcie_ep ? "End point" : "Root complex", (uint)pci); |