ppc4xx: Correct UART input clock calculation and passing to fdt
We now use a value in the gd (global data) structure for the UART input
frequency, since the PPC4xx_SYS_INFO struct is always rewritten completely
in get_sys_info().
Signed-off-by: Stefan Roese <sr@denx.de>
diff --git a/cpu/ppc4xx/4xx_uart.c b/cpu/ppc4xx/4xx_uart.c
index c6b229f..ac2b12b 100644
--- a/cpu/ppc4xx/4xx_uart.c
+++ b/cpu/ppc4xx/4xx_uart.c
@@ -192,9 +192,9 @@
* the UART divisor is available
*/
#ifdef CFG_EXT_SERIAL_CLOCK
- sys_info.freqUART = CFG_EXT_SERIAL_CLOCK;
+ gd->uart_clk = CFG_EXT_SERIAL_CLOCK;
#else
- sys_info.freqUART = sys_info.freqUART / udiv;
+ gd->uart_clk = sys_info.freqUART / udiv;
#endif
out_8((u8 *)base + UART_LCR, 0x80); /* set DLAB bit */