diff options
author | roy zang <tie-fei.zang@freescale.com> | 2006-12-04 23:57:35 +0800 |
---|---|---|
committer | Zang Tiefei <roy@bus.ap.freescale.net> | 2006-12-04 23:57:35 +0800 |
commit | d3bb5ec198edad4869ac5276a5899881b7bf5433 (patch) | |
tree | 409a70e937d5f826df7929d11cb08a7cd207f5cd /cpu/mpc5xxx/cpu.c | |
parent | 41862d13a87ec58c21166b10fcb754c963bc46f2 (diff) | |
parent | 9d27b3a0685ff99fc477983f315c04d49f657a8a (diff) |
Merge /home/roy/CVS/7448/Open_Source/u-boot.git.dev
Diffstat (limited to 'cpu/mpc5xxx/cpu.c')
-rw-r--r-- | cpu/mpc5xxx/cpu.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c index 6b6f8282cf..813aa7935d 100644 --- a/cpu/mpc5xxx/cpu.c +++ b/cpu/mpc5xxx/cpu.c @@ -31,6 +31,10 @@ #include <mpc5xxx.h> #include <asm/processor.h> +#if defined(CONFIG_OF_FLAT_TREE) +#include <ft_build.h> +#endif + DECLARE_GLOBAL_DATA_PTR; int checkcpu (void) @@ -102,3 +106,26 @@ unsigned long get_tbclk (void) } /* ------------------------------------------------------------------------- */ + +#ifdef CONFIG_OF_FLAT_TREE +void +ft_cpu_setup(void *blob, bd_t *bd) +{ + u32 *p; + int len; + + /* Core XLB bus frequency */ + p = ft_get_prop(blob, "/cpus/" OF_CPU "/bus-frequency", &len); + if (p != NULL) + *p = cpu_to_be32(bd->bi_busfreq); + + /* SOC peripherals use the IPB bus frequency */ + p = ft_get_prop(blob, "/" OF_SOC "/bus-frequency", &len); + if (p != NULL) + *p = cpu_to_be32(bd->bi_ipbfreq); + + p = ft_get_prop(blob, "/" OF_SOC "/ethernet@3000/mac-address", &len); + if (p != NULL) + memcpy(p, bd->bi_enetaddr, 6); +} +#endif |