summaryrefslogtreecommitdiff
path: root/board/tqm834x/tqm834x.c
diff options
context:
space:
mode:
authorRafal Jaworowski <raj@pollux.denx.de>2005-10-17 02:39:53 +0200
committerRafal Jaworowski <raj@pollux.denx.de>2005-10-17 02:39:53 +0200
commit6902df56a0b493f369153b09d11afcd74a580561 (patch)
tree1f52eec48325cca757cf2ea3d65a448cbecaec9d /board/tqm834x/tqm834x.c
parent326bf40fb7a4862da5dcc4e166721633b3422835 (diff)
downloadu-boot-imx-6902df56a0b493f369153b09d11afcd74a580561.zip
u-boot-imx-6902df56a0b493f369153b09d11afcd74a580561.tar.gz
u-boot-imx-6902df56a0b493f369153b09d11afcd74a580561.tar.bz2
Add PCI support for the TQM834x board.
Diffstat (limited to 'board/tqm834x/tqm834x.c')
-rw-r--r--board/tqm834x/tqm834x.c48
1 files changed, 20 insertions, 28 deletions
diff --git a/board/tqm834x/tqm834x.c b/board/tqm834x/tqm834x.c
index 9e620eb..f681dc8 100644
--- a/board/tqm834x/tqm834x.c
+++ b/board/tqm834x/tqm834x.c
@@ -30,10 +30,7 @@
#include <spd.h>
#include <miiphy.h>
#include <asm-ppc/mmu.h>
-
-#if defined(CONFIG_PCI)
#include <pci.h>
-#endif
#define IOSYNC asm("eieio")
#define ISYNC asm("isync")
@@ -145,37 +142,32 @@ int checkboard (void)
puts("Board: TQM834x\n");
#ifdef CONFIG_PCI
- printf("PCI1: 32 bit, %d MHz (compiled)\n",
- CONFIG_SYS_CLK_FREQ / 1000000);
-#else
- printf("PCI1: disabled\n");
-#endif
-
- return 0;
-}
-
-#if defined(CONFIG_PCI)
-/*
- * Initialize PCI Devices, report devices found
- */
+ DECLARE_GLOBAL_DATA_PTR;
+ volatile immap_t * immr;
+ u32 w, f;
-/* FIXME: No PCI support */
+ immr = (immap_t *)CFG_IMMRBAR;
+ if (!(immr->reset.rcwh & RCWH_PCIHOST)) {
+ printf("PCI: NOT in host mode..?!\n");
+ return 0;
+ }
-#endif /* CONFIG_PCI */
+ /* get bus width */
+ w = 32;
+ if (immr->reset.rcwh & RCWH_PCI64)
+ w = 64;
-/**************************************************************************
- * pci_init_board()
- */
-void
-pci_init_board(void)
-{
-#ifdef CONFIG_PCI
- extern void pci_mpc83xx_init(volatile struct pci_controller *hose);
+ /* get clock */
+ f = gd->pci_clk;
- pci_mpc83xx_init(hose);
-#endif /* CONFIG_PCI */
+ printf("PCI1: %d bit, %d MHz\n", w, f / 1000000);
+#else
+ printf("PCI: disabled\n");
+#endif
+ return 0;
}
+
/**************************************************************************
*
* Local functions