summaryrefslogtreecommitdiff
path: root/board/mpc8540ads/mpc8540ads.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-10-20 23:52:58 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-10-20 23:52:58 +0200
commitd67c14c0f4e390dc7069bbe852f5ec8ea1acc8fc (patch)
tree8eecbb0f2c98e2619abe8eafb3cbae188d4e6e30 /board/mpc8540ads/mpc8540ads.c
parentba999c531ed16ec749b2b6f4b0133cee38842b91 (diff)
parent3acb7727ce6aa403e938e7cf3761924590bead47 (diff)
downloadu-boot-imx-d67c14c0f4e390dc7069bbe852f5ec8ea1acc8fc.zip
u-boot-imx-d67c14c0f4e390dc7069bbe852f5ec8ea1acc8fc.tar.gz
u-boot-imx-d67c14c0f4e390dc7069bbe852f5ec8ea1acc8fc.tar.bz2
Merge with http://www.jdl.com/software/u-boot-86xx.git
Diffstat (limited to 'board/mpc8540ads/mpc8540ads.c')
-rw-r--r--board/mpc8540ads/mpc8540ads.c46
1 files changed, 27 insertions, 19 deletions
diff --git a/board/mpc8540ads/mpc8540ads.c b/board/mpc8540ads/mpc8540ads.c
index d0eb690..914e51a 100644
--- a/board/mpc8540ads/mpc8540ads.c
+++ b/board/mpc8540ads/mpc8540ads.c
@@ -31,6 +31,11 @@
#include <asm/immap_85xx.h>
#include <spd.h>
+#if defined(CONFIG_OF_FLAT_TREE)
+#include <ft_build.h>
+#endif
+
+
#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
extern void ddr_enable_ecc(unsigned int dram_size);
#endif
@@ -311,24 +316,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 */
@@ -337,8 +326,27 @@ void
pci_init_board(void)
{
#ifdef CONFIG_PCI
- extern void pci_mpc85xx_init(struct pci_controller *hose);
-
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