diff options
author | Jon Loeliger <jdl@freescale.com> | 2006-08-09 14:41:17 -0500 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2006-08-09 14:41:17 -0500 |
commit | 92c427b18982167064de454ae5248ec466998919 (patch) | |
tree | a60a3a9e3f3dec07edf6e6505bfc45c9e0a2dc01 /board/mpc8540ads/mpc8540ads.c | |
parent | 281f69ede28cd3d8be5d62a96b5a0b73e6065858 (diff) | |
parent | 34c3c0e01dbf1f8cc2bd08de92f2b89ba84921eb (diff) |
Merge branch 'mpc85xx'
Conflicts:
include/ft_build.h
include/pci.h
Resolved, though.
Diffstat (limited to 'board/mpc8540ads/mpc8540ads.c')
-rw-r--r-- | board/mpc8540ads/mpc8540ads.c | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/board/mpc8540ads/mpc8540ads.c b/board/mpc8540ads/mpc8540ads.c index d0eb6904ad..fbcb397290 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 |