summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2006-11-29 16:23:42 +0100
committerStefan Roese <sr@denx.de>2006-11-29 16:23:42 +0100
commit726e90aacf0b1ecb0e7055be574622fbe3e450ba (patch)
tree62ffc5aca45a9907fca3b504eed2adf75c7b1a1f
parent1eac2a71417b6675b11aace72102a2e7fde8f5c6 (diff)
downloadu-boot-imx-726e90aacf0b1ecb0e7055be574622fbe3e450ba.zip
u-boot-imx-726e90aacf0b1ecb0e7055be574622fbe3e450ba.tar.gz
u-boot-imx-726e90aacf0b1ecb0e7055be574622fbe3e450ba.tar.bz2
[PATCH] [MPC52xx] Use IPB bus frequency for SOC peripherals
The soc node of the mpc52xx needs to be loaded with the IPB bus frequency, not the XLB frequency. This patch depends on the previous patches for MPC52xx device tree support Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--cpu/mpc5xxx/cpu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
index 20e6735..813aa79 100644
--- a/cpu/mpc5xxx/cpu.c
+++ b/cpu/mpc5xxx/cpu.c
@@ -112,21 +112,20 @@ void
ft_cpu_setup(void *blob, bd_t *bd)
{
u32 *p;
- ulong clock;
int len;
- clock = bd->bi_busfreq;
+ /* Core XLB bus frequency */
p = ft_get_prop(blob, "/cpus/" OF_CPU "/bus-frequency", &len);
if (p != NULL)
- *p = cpu_to_be32(clock);
+ *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(clock);
+ *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