diff options
author | Poonam Aggrwal | 2009-09-02 13:35:21 +0530 |
---|---|---|
committer | Kumar Gala | 2009-09-08 09:10:08 -0500 |
commit | 58442dc01e47cc8ce42af4f29486a34cad60b9d2 (patch) | |
tree | c89902a6131b557e2d64cd3be9854e845f24ae6c /cpu | |
parent | 3e7b6c1f2db5ec31f9e7dbc3e0cbca602167a46a (diff) |
ppc/85xx,86xx: Handling Unknown SOC version
Incase the system is detected with Unknown SVR, let the system boot
with a default value and a proper message.
Now with dynamic detection of SOC properties from SVR, this is necessary
to prevent a crash.
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/mpc85xx/cpu.c | 10 | ||||
-rw-r--r-- | cpu/mpc86xx/cpu.c | 5 | ||||
-rw-r--r-- | cpu/mpc8xxx/cpu.c | 5 |
3 files changed, 7 insertions, 13 deletions
diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c index 6be98dc350c..63bdb6fde1d 100644 --- a/cpu/mpc85xx/cpu.c +++ b/cpu/mpc85xx/cpu.c @@ -69,13 +69,9 @@ int checkcpu (void) cpu = gd->cpu; - if (cpu->name) { - puts(cpu->name); - if (IS_E_PROCESSOR(svr)) - puts("E"); - } else { - puts("Unknown"); - } + puts(cpu->name); + if (IS_E_PROCESSOR(svr)) + puts("E"); printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr); diff --git a/cpu/mpc86xx/cpu.c b/cpu/mpc86xx/cpu.c index 04409cec68f..e97ab6d8a5b 100644 --- a/cpu/mpc86xx/cpu.c +++ b/cpu/mpc86xx/cpu.c @@ -65,10 +65,7 @@ checkcpu(void) cpu = gd->cpu; - if (cpu->name) - puts(cpu->name); - else - puts("Unknown"); + puts(cpu->name); printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr); puts("Core: "); diff --git a/cpu/mpc8xxx/cpu.c b/cpu/mpc8xxx/cpu.c index 339f6d97c2b..c73ac3cc6d2 100644 --- a/cpu/mpc8xxx/cpu.c +++ b/cpu/mpc8xxx/cpu.c @@ -79,6 +79,8 @@ struct cpu_type cpu_type_list [] = { #endif }; +struct cpu_type cpu_type_unknown = CPU_TYPE_ENTRY(Unknown, Unknown, 1); + struct cpu_type *identify_cpu(u32 ver) { int i; @@ -86,8 +88,7 @@ struct cpu_type *identify_cpu(u32 ver) if (cpu_type_list[i].soc_ver == ver) return &cpu_type_list[i]; } - - return NULL; + return &cpu_type_unknown; } int cpu_numcores() { |