Re: [PATCH 27/36] m68k: add code to setup a ColdFire 54xx platform when MMU enabled

Greg Ungerer
2011-10-31T04:58:34Z

Hi Geert,

On 30/10/11 23:39, Geert Uytterhoeven wrote:
> On Tue, Oct 25, 2011 at 09:19,<gerg@snapgear.com> wrote:
>> From: Greg Ungerer<gerg@uclinux.org>
>>
>> We use the same setup code for ColdFire MMU enabled platforms as
>> standard m68k. So add support for it to setup our 54xx ColdFire
>> platforms. They do not support the same bootinfo parsing as other
>> m68k platforms.
>>
>> Signed-off-by: Greg Ungerer<gerg@uclinux.org>
>> ---
>> arch/m68k/kernel/setup_mm.c 8 +++++++-
>> 1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
>> index 52e17d1..b3938ad 100644
>> --- a/arch/m68k/kernel/setup_mm.c
>> +++ b/arch/m68k/kernel/setup_mm.c
>> @@ -221,7 +221,8 @@ void __init setup_arch(char **cmdline_p)
>> #endif
>>
>> /* The bootinfo is located right after the kernel bss */
>> - m68k_parse_bootinfo((const struct bi_record *)_end);
>> + if (!CPU_IS_COLDFIRE)
>> + m68k_parse_bootinfo((const struct bi_record *)_end);
>>
>> if (CPU_IS_040)
>> m68k_is040or060 = 4;
>> @@ -327,6 +328,11 @@ void __init setup_arch(char **cmdline_p)
>> config_sun3x();
>> break;
>> #endif
>> +#ifdef CONFIG_COLDFIRE
>> + case MACH_M54XX:
>> + config_BSP(NULL, 0);
>
> config_M54xx?

config_BSP is the name of the existing function as it used for non-MMU,
so I just left it unchanged. The non-mmu code is built for a specific
processor type (no multi-cpu image support), and all those functions
for each CPU type are just called config_BSP.

So I was trying to minimize the changed needed here. Although the name
is not too descriptive. In the furture I want to merge all the separate
config_BSP() functions into a single one for ColdFire. They are almost
all the same. I plan on renaming it then.

Regards
Greg

------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com