summaryrefslogtreecommitdiff
path: root/board/mpc8540ads
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-08-19 02:04:56 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-08-19 02:04:56 +0200
commit4a39616da41840bbc5b4c3f69df9861c2e6a8425 (patch)
treeb1f3182b68f5115de3f37a2f4bed74971c2786d9 /board/mpc8540ads
parent5196a7a03bc436435787e1ad7044af94d93a5448 (diff)
parent86c8e17f25e972a7e272950a0735fad84e082b88 (diff)
downloadu-boot-imx-4a39616da41840bbc5b4c3f69df9861c2e6a8425.zip
u-boot-imx-4a39616da41840bbc5b4c3f69df9861c2e6a8425.tar.gz
u-boot-imx-4a39616da41840bbc5b4c3f69df9861c2e6a8425.tar.bz2
Merge with http://opensource.freescale.com/pub/scm/u-boot-85xx.git#for_wd
Diffstat (limited to 'board/mpc8540ads')
-rw-r--r--board/mpc8540ads/mpc8540ads.c45
1 files changed, 28 insertions, 17 deletions
diff --git a/board/mpc8540ads/mpc8540ads.c b/board/mpc8540ads/mpc8540ads.c
index d0eb690..fbcb397 100644
--- a/board/mpc8540ads/mpc8540ads.c
+++ b/board/mpc8540ads/mpc8540ads.c
@@ -31,6 +31,12 @@
#include <asm/immap_85xx.h>
#include <spd.h>
+#if defined(CONFIG_OF_FLAT_TREE)
+#include <ft_build.h>
+extern void ft_cpu_setup(void *blob, bd_t *bd);
+#endif
+
+
#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
extern void ddr_enable_ecc(unsigned int dram_size);
#endif
@@ -311,24 +317,8 @@ long int fixed_sdram (void)
* Initialize PCI Devices, report devices found.
*/
-#ifndef CONFIG_PCI_PNP
-static struct pci_config_table pci_mpc85xxads_config_table[] = {
- { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
- PCI_IDSEL_NUMBER, PCI_ANY_ID,
- pci_cfgfunc_config_device, { PCI_ENET0_IOADDR,
- PCI_ENET0_MEMADDR,
- PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
- } },
- { }
-};
-#endif
-
-static struct pci_controller hose = {
-#ifndef CONFIG_PCI_PNP
- config_table: pci_mpc85xxads_config_table,
-#endif
-};
+static struct pci_controller hose;
#endif /* CONFIG_PCI */
@@ -342,3 +332,24 @@ pci_init_board(void)
pci_mpc85xx_init(&hose);
#endif /* CONFIG_PCI */
}
+
+
+#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
+void
+ft_board_setup(void *blob, bd_t *bd)
+{
+ u32 *p;
+ int len;
+
+#ifdef CONFIG_PCI
+ ft_pci_setup(blob, bd);
+#endif
+ ft_cpu_setup(blob, bd);
+
+ p = ft_get_prop(blob, "/memory/reg", &len);
+ if (p != NULL) {
+ *p++ = cpu_to_be32(bd->bi_memstart);
+ *p = cpu_to_be32(bd->bi_memsize);
+ }
+}
+#endif