diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-09-02 09:03:08 -0500 |
---|---|---|
committer | Tom Rix <Tom.Rix@windriver.com> | 2009-10-03 09:04:17 -0500 |
commit | 865f24dc92d03928c09b7f20a3133823e53c1ac3 (patch) | |
tree | 455bd68614d879f650e82fe44f445d903a85e38c /board/freescale/p1_p2_rdb | |
parent | 8b8376e81ca725772fa7a3e1b58ca55a761cdf1d (diff) | |
download | u-boot-imx-865f24dc92d03928c09b7f20a3133823e53c1ac3.zip u-boot-imx-865f24dc92d03928c09b7f20a3133823e53c1ac3.tar.gz u-boot-imx-865f24dc92d03928c09b7f20a3133823e53c1ac3.tar.bz2 |
ppc/8xxx: Refactor code to determine if PCI is enabled & agent/host
Refactor the code into a simple bitmask lookup table that determines if
a given PCI controller is enabled and if its in host/root-complex or
agent/end-point mode.
Each processor in the PQ3/MPC86xx family specified different encodings
for the cfg_host_agt[] and cfg_IO_ports[] boot strapping signals.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board/freescale/p1_p2_rdb')
-rw-r--r-- | board/freescale/p1_p2_rdb/pci.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/board/freescale/p1_p2_rdb/pci.c b/board/freescale/p1_p2_rdb/pci.c index 174a8a7..a3617d5 100644 --- a/board/freescale/p1_p2_rdb/pci.c +++ b/board/freescale/p1_p2_rdb/pci.c @@ -59,9 +59,8 @@ void pci_init_board(void) #ifdef CONFIG_PCIE2 SET_STD_PCIE_INFO(pci_info[num], 2); - pcie_ep = (host_agent == 2) || (host_agent == 4) || - (host_agent == 6) || (host_agent == 0); - pcie_configured = (io_sel == 0xE); + pcie_ep = is_fsl_pci_agent(LAW_TRGT_IF_PCIE_2, host_agent); + pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_2, io_sel); if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){ puts ("\n PCIE2 connected to Slot 1 as "); @@ -80,9 +79,8 @@ void pci_init_board(void) #ifdef CONFIG_PCIE1 SET_STD_PCIE_INFO(pci_info[num], 1); - pcie_ep = (host_agent <= 1) || (host_agent == 4) || - (host_agent == 5); - pcie_configured = (io_sel == 0xE); + pcie_ep = is_fsl_pci_agent(LAW_TRGT_IF_PCIE_1, host_agent); + pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel); if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){ puts ("\n PCIE1 connected to Slot 2 as "); |