From fa8aea20456e6f1dba43f46bcc72024dd9499998 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 22 Oct 2007 07:33:52 +0200 Subject: ppc4xx: Add freqUART to CPU speed detection This value is needed later for the device tree configuration of the uart clock. Signed-off-by: Stefan Roese --- cpu/ppc4xx/fdt.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpu/ppc4xx/fdt.c') diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c index 2acb250..44e95a5 100644 --- a/cpu/ppc4xx/fdt.c +++ b/cpu/ppc4xx/fdt.c @@ -79,10 +79,17 @@ static void do_fixup_uart(void *fdt, int offset, int i, bd_t *bd) { int rc; u32 val; + PPC4xx_SYS_INFO sys_info; + + get_sys_info(&sys_info); debug("Updating node UART%d\n", i); +#if defined(CFG_EXT_SERIAL_CLOCK) val = cpu_to_fdt32(CFG_EXT_SERIAL_CLOCK); +#else + val = cpu_to_fdt32(sys_info.freqUART); +#endif rc = fdt_setprop(fdt, offset, "clock-frequency", &val, 4); if (rc) printf("Unable to update node UART, err=%s\n", fdt_strerror(rc)); -- cgit v1.1