summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/fdt.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-10-22 07:33:52 +0200
committerStefan Roese <sr@denx.de>2007-10-31 21:20:50 +0100
commitfa8aea20456e6f1dba43f46bcc72024dd9499998 (patch)
tree7b8bc5fca4c569ac91bf920e91d1ccb9b389d32b /cpu/ppc4xx/fdt.c
parent837c730b4d7c6b1ddf3d1e247cb4445005d9bf0d (diff)
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 <sr@denx.de>
Diffstat (limited to 'cpu/ppc4xx/fdt.c')
-rw-r--r--cpu/ppc4xx/fdt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c
index 2acb250e055..44e95a5a91a 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));