diff options
author | Wolfgang Denk <wd@denx.de> | 2008-02-22 13:03:28 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-22 13:03:28 +0100 |
commit | 6a2dcaf1ee014008f90143cf1045ac80d9d25d1f (patch) | |
tree | ba6b87b625b0bb2056147799797faf67ed443171 /board/sbc8641d | |
parent | 45d65b7f285b17d21270ff002127c246431bd668 (diff) | |
parent | d5908b093955415f3d340706378b991f911af671 (diff) | |
download | u-boot-imx-6a2dcaf1ee014008f90143cf1045ac80d9d25d1f.zip u-boot-imx-6a2dcaf1ee014008f90143cf1045ac80d9d25d1f.tar.gz u-boot-imx-6a2dcaf1ee014008f90143cf1045ac80d9d25d1f.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx
Diffstat (limited to 'board/sbc8641d')
-rw-r--r-- | board/sbc8641d/sbc8641d.c | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index 7adc42f..78656e9 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/board/sbc8641d/sbc8641d.c @@ -35,11 +35,8 @@ #include <asm/immap_86xx.h> #include <asm/immap_fsl_pci.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 +#include <libfdt.h> +#include <fdt_support.h> #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) extern void ddr_enable_ecc (unsigned int dram_size); @@ -341,18 +338,34 @@ void pci_init_board(void) } -#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) -void ft_board_setup (void *blob, bd_t * bd) + +#if defined(CONFIG_OF_BOARD_SETUP) + +void +ft_board_setup (void *blob, bd_t *bd) { - u32 *p; - int len; + int node, tmp[2]; + const char *path; - ft_cpu_setup (blob, bd); + 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); + node = fdt_path_offset(blob, "/aliases"); + tmp[0] = 0; + if (node >= 0) { +#ifdef CONFIG_PCI1 + path = fdt_getprop(blob, node, "pci0", NULL); + if (path) { + tmp[1] = pci1_hose.last_busno - pci1_hose.first_busno; + do_fixup_by_path(blob, path, "bus-range", &tmp, 8, 1); + } +#endif +#ifdef CONFIG_PCI2 + path = fdt_getprop(blob, node, "pci1", NULL); + if (path) { + tmp[1] = pci2_hose.last_busno - pci2_hose.first_busno; + do_fixup_by_path(blob, path, "bus-range", &tmp, 8, 1); + } +#endif } } #endif |