diff options
author | Gerald Van Baren <vanbaren@cideas.com> | 2007-03-31 12:23:51 -0400 |
---|---|---|
committer | Gerald Van Baren <vanbaren@cideas.com> | 2007-03-31 12:23:51 -0400 |
commit | 213bf8c822de8eecaf69860684469cdaba2e9e6a (patch) | |
tree | 178e19684d4024081de2caa27ec5f1806846672f /board/mpc8360emds/pci.c | |
parent | 781e09ee6e3e3e392ab362c1f0ef1068adc76e3e (diff) | |
download | u-boot-imx-213bf8c822de8eecaf69860684469cdaba2e9e6a.zip u-boot-imx-213bf8c822de8eecaf69860684469cdaba2e9e6a.tar.gz u-boot-imx-213bf8c822de8eecaf69860684469cdaba2e9e6a.tar.bz2 |
Add a flattened device tree (fdt) command (2 of 2)
Modifications to the existing code to support the new fdt command.
Diffstat (limited to 'board/mpc8360emds/pci.c')
-rw-r--r-- | board/mpc8360emds/pci.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/board/mpc8360emds/pci.c b/board/mpc8360emds/pci.c index 67cd709..158effe 100644 --- a/board/mpc8360emds/pci.c +++ b/board/mpc8360emds/pci.c @@ -21,6 +21,10 @@ #if defined(CONFIG_OF_FLAT_TREE) #include <ft_build.h> #endif +#if defined(CONFIG_OF_LIBFDT) +#include <libfdt.h> +#include <libfdt_env.h> +#endif #include <asm/fsl_i2c.h> @@ -299,6 +303,22 @@ void pci_init_board(void) } #endif /* CONFIG_PCISLAVE */ +#if defined(CONFIG_OF_LIBFDT) +void +ft_pci_setup(void *blob, bd_t *bd) +{ + int nodeoffset; + int err; + int tmp[2]; + + nodeoffset = fdt_path_offset (fdt, "/" OF_SOC "/pci@8500"); + if (nodeoffset >= 0) { + tmp[0] = cpu_to_be32(hose[0].first_busno); + tmp[1] = cpu_to_be32(hose[0].last_busno); + err = fdt_setprop(fdt, nodeoffset, "bus-range", tmp, sizeof(tmp)); + } +} +#endif /* CONFIG_OF_LIBFDT */ #ifdef CONFIG_OF_FLAT_TREE void ft_pci_setup(void *blob, bd_t *bd) |