diff options
author | Wolfgang Denk <wd@denx.de> | 2008-10-21 21:19:35 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-10-21 21:19:35 +0200 |
commit | 06c29422189388f3082c5bab226af17e90d51ee7 (patch) | |
tree | 195737b9980828723081f2e86fad200ad2d49de6 /cpu/ppc4xx/cpu.c | |
parent | 055b12f2ffd7c34eea7e983a0588b24f2e69e0e3 (diff) | |
parent | f4d14c55504ce40287321bd63ee269e3233ee4ae (diff) | |
download | u-boot-imx-06c29422189388f3082c5bab226af17e90d51ee7.zip u-boot-imx-06c29422189388f3082c5bab226af17e90d51ee7.tar.gz u-boot-imx-06c29422189388f3082c5bab226af17e90d51ee7.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Diffstat (limited to 'cpu/ppc4xx/cpu.c')
-rw-r--r-- | cpu/ppc4xx/cpu.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c index 66a7737..a676b30 100644 --- a/cpu/ppc4xx/cpu.c +++ b/cpu/ppc4xx/cpu.c @@ -41,6 +41,18 @@ DECLARE_GLOBAL_DATA_PTR; void board_reset(void); +/* + * To provide an interface to detect CPU number for boards that support + * more then one CPU, we implement the "weak" default functions here. + * + * Returns CPU number + */ +int __get_cpu_num(void) +{ + return NA_OR_UNKNOWN_CPU; +} +int get_cpu_num(void) __attribute__((weak, alias("__get_cpu_num"))); + #if defined(CONFIG_405GP) || \ defined(CONFIG_440EP) || defined(CONFIG_440GR) || \ defined(CONFIG_440EPX) || defined(CONFIG_440GRX) @@ -274,8 +286,13 @@ int checkcpu (void) #if !defined(CONFIG_IOP480) char addstr[64] = ""; sys_info_t sys_info; + int cpu_num; - puts ("CPU: "); + cpu_num = get_cpu_num(); + if (cpu_num >= 0) + printf("CPU%d: ", cpu_num); + else + puts("CPU: "); get_sys_info(&sys_info); |