diff options
author | Tom Rini <trini@ti.com> | 2012-09-25 19:23:55 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-09-25 19:23:55 (GMT) |
commit | 5675b509165b67465a20e5cf71e07f40b449ef0c (patch) | |
tree | 9886f3e8fa8734ec9f8d9cb484fcaa87ff70203f /arch/powerpc/lib | |
parent | ee1f4caaa2a3f79d692155eec8a4c7289d60e106 (diff) | |
parent | d69dba367aed051663d0ee1ece013c8232bfa9f5 (diff) | |
download | u-boot-fsl-qoriq-5675b509165b67465a20e5cf71e07f40b449ef0c.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r-- | arch/powerpc/lib/board.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index fea310e..07feaf5 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -345,6 +345,13 @@ ulong get_effective_memsize(void) #endif } +int __fixup_cpu(void) +{ + return 0; +} + +int fixup_cpu(void) __attribute__((weak, alias("__fixup_cpu"))); + /* * This is the first part of the initialization sequence that is * implemented in C, but still running from ROM. @@ -521,9 +528,8 @@ void board_init_f(ulong bootflag) addr_sp -= 16; addr_sp &= ~0xF; s = (ulong *) addr_sp; - *s-- = 0; - *s-- = 0; - addr_sp = (ulong) s; + *s = 0; /* Terminate back chain */ + *++s = 0; /* NULL return address */ debug("Stack Pointer at: %08lx\n", addr_sp); /* @@ -647,6 +653,12 @@ void board_init_r(gd_t *id, ulong dest_addr) * We need to update it to point to the same CPU entry in RAM. */ gd->cpu += dest_addr - CONFIG_SYS_MONITOR_BASE; + + /* + * If we didn't know the cpu mask & # cores, we can save them of + * now rather than 'computing' them constantly + */ + fixup_cpu(); #endif #ifdef CONFIG_SYS_EXTRA_ENV_RELOC |