MINI2440: Updated early nand loader
[u-boot-openmoko/mini2440.git] / cpu / mpc86xx / fdt.c
blob379306ea4f302ff51d5371a73e531b9bcbb48d94
1 /*
2 * Copyright 2008 Freescale Semiconductor, Inc.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * Version 2 as published by the Free Software Foundation.
7 */
9 #include <common.h>
10 #include <libfdt.h>
11 #include <fdt_support.h>
13 void ft_cpu_setup(void *blob, bd_t *bd)
15 do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
16 "timebase-frequency", bd->bi_busfreq / 4, 1);
17 do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
18 "bus-frequency", bd->bi_busfreq, 1);
19 do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
20 "clock-frequency", bd->bi_intfreq, 1);
21 do_fixup_by_prop_u32(blob, "device_type", "soc", 4,
22 "bus-frequency", bd->bi_busfreq, 1);
24 fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
26 #if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) \
27 || defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
28 fdt_fixup_ethernet(blob, bd);
29 #endif
31 #ifdef CFG_NS16550
32 do_fixup_by_compat_u32(blob, "ns16550",
33 "clock-frequency", bd->bi_busfreq, 1);
34 #endif