X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cpu%2Fmpc86xx%2Ffdt.c;h=51f3f4c2203ba6f1d18d3cbe917b76ac614d1aa7;hb=e598dfc22c8789991d165714bec53b2390fc999d;hp=383b06b5ae61e4bbea0a65d63a5aa0eaa211650e;hpb=a9f3acbcd07da72b5446ce557531a3ed8b8beff0;p=u-boot diff --git a/cpu/mpc86xx/fdt.c b/cpu/mpc86xx/fdt.c index 383b06b5ae..51f3f4c220 100644 --- a/cpu/mpc86xx/fdt.c +++ b/cpu/mpc86xx/fdt.c @@ -9,15 +9,17 @@ #include #include #include -#include "mp.h" +#include DECLARE_GLOBAL_DATA_PTR; +extern void ft_fixup_num_cores(void *blob); + void ft_cpu_setup(void *blob, bd_t *bd) { -#if (CONFIG_NUM_CPUS > 1) +#ifdef CONFIG_MP int off; - u32 bootpg; + u32 bootpg = determine_mp_bootpg(); #endif do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, @@ -48,16 +50,11 @@ void ft_cpu_setup(void *blob, bd_t *bd) "clock-frequency", CONFIG_SYS_NS16550_CLK, 1); #endif -#if (CONFIG_NUM_CPUS > 1) - /* if we have 4G or more of memory, put the boot page at 4Gb-1M */ - if (gd->ram_size > 0xfffff000) - bootpg = 0xfff00000; - else - bootpg = gd->ram_size - (1024 * 1024); - +#ifdef CONFIG_MP /* Reserve the boot page so OSes dont use it */ off = fdt_add_mem_rsv(blob, bootpg, (u64)4096); if (off < 0) printf("%s: %s\n", __FUNCTION__, fdt_strerror(off)); #endif + ft_fixup_num_cores(blob); }