diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-02-29 13:56:44 +0100 |
---|---|---|
committer | Marian Balakowicz <m8@semihalf.com> | 2008-02-29 13:56:44 +0100 |
commit | e18489e8c27e843e337258fb00f2652ff0f43b92 (patch) | |
tree | 2a3b2afa224e61cb7f1206a1641007e526d25160 /cpu/mpc86xx/fdt.c | |
parent | 75fa002c47171b73fb4c1f2c2fe4d6391c136276 (diff) | |
parent | b29661fc1151077776454288051bc9a488351ce8 (diff) |
Merge branch 'master' of git://www.denx.de/git/u-boot into new-image
Diffstat (limited to 'cpu/mpc86xx/fdt.c')
-rw-r--r-- | cpu/mpc86xx/fdt.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cpu/mpc86xx/fdt.c b/cpu/mpc86xx/fdt.c new file mode 100644 index 00000000000..379306ea4f3 --- /dev/null +++ b/cpu/mpc86xx/fdt.c @@ -0,0 +1,35 @@ +/* + * Copyright 2008 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * Version 2 as published by the Free Software Foundation. + */ + +#include <common.h> +#include <libfdt.h> +#include <fdt_support.h> + +void ft_cpu_setup(void *blob, bd_t *bd) +{ + do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, + "timebase-frequency", bd->bi_busfreq / 4, 1); + do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, + "bus-frequency", bd->bi_busfreq, 1); + do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, + "clock-frequency", bd->bi_intfreq, 1); + do_fixup_by_prop_u32(blob, "device_type", "soc", 4, + "bus-frequency", bd->bi_busfreq, 1); + + fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); + +#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) \ + || defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) + fdt_fixup_ethernet(blob, bd); +#endif + +#ifdef CFG_NS16550 + do_fixup_by_compat_u32(blob, "ns16550", + "clock-frequency", bd->bi_busfreq, 1); +#endif +} |