diff options
author | Tom Rini <trini@ti.com> | 2013-11-14 11:48:15 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-11-14 11:48:15 -0500 |
commit | c3ebb8c38a5da5e40da2786c5d850d1f6555ff95 (patch) | |
tree | 5a31873d2a4994cd9b5a4fc4bed9bb0c4f28f62b /arch/powerpc/cpu/mpc85xx/fdt.c | |
parent | f9de54e9b09b4836fb3cda9d98a6dfba367b9734 (diff) | |
parent | 51abee64eee0186634858d1e6f91a65969c90125 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/fdt.c')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/fdt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 2ccd9c7b95..33bc900167 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -586,6 +586,7 @@ void ft_cpu_setup(void *blob, bd_t *bd) { int off; int val; + int len; sys_info_t sysinfo; /* delete crypto node if not on an E-processor */ @@ -615,8 +616,8 @@ void ft_cpu_setup(void *blob, bd_t *bd) get_sys_info(&sysinfo); off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4); while (off != -FDT_ERR_NOTFOUND) { - u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0); - val = cpu_to_fdt32(sysinfo.freq_processor[*reg]); + u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", &len); + val = cpu_to_fdt32(sysinfo.freq_processor[(*reg) / (len / 4)]); fdt_setprop(blob, off, "clock-frequency", &val, 4); off = fdt_node_offset_by_prop_value(blob, off, "device_type", "cpu", 4); |