Commit 726e90aacf0b1ecb0e7055be574622fbe3e450ba
Committed by
Stefan Roese
1 parent
1eac2a7141
Exists in
master
and in
54 other branches
[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>
Showing 1 changed file with 4 additions and 5 deletions Side-by-side Diff
cpu/mpc5xxx/cpu.c
... | ... | @@ -112,22 +112,21 @@ |
112 | 112 | ft_cpu_setup(void *blob, bd_t *bd) |
113 | 113 | { |
114 | 114 | u32 *p; |
115 | - ulong clock; | |
116 | 115 | int len; |
117 | 116 | |
118 | - clock = bd->bi_busfreq; | |
117 | + /* Core XLB bus frequency */ | |
119 | 118 | p = ft_get_prop(blob, "/cpus/" OF_CPU "/bus-frequency", &len); |
120 | 119 | if (p != NULL) |
121 | - *p = cpu_to_be32(clock); | |
120 | + *p = cpu_to_be32(bd->bi_busfreq); | |
122 | 121 | |
122 | + /* SOC peripherals use the IPB bus frequency */ | |
123 | 123 | p = ft_get_prop(blob, "/" OF_SOC "/bus-frequency", &len); |
124 | 124 | if (p != NULL) |
125 | - *p = cpu_to_be32(clock); | |
125 | + *p = cpu_to_be32(bd->bi_ipbfreq); | |
126 | 126 | |
127 | 127 | p = ft_get_prop(blob, "/" OF_SOC "/ethernet@3000/mac-address", &len); |
128 | 128 | if (p != NULL) |
129 | 129 | memcpy(p, bd->bi_enetaddr, 6); |
130 | - | |
131 | 130 | } |
132 | 131 | #endif |