* Re: early_initcall replacement
2007-02-28 2:47 ` early_initcall replacement Ralf Baechle
@ 2007-03-01 4:33 ` dejo
0 siblings, 0 replies; 2+ messages in thread
From: dejo @ 2007-03-01 4:33 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
Thank you for your reply, sir. I found out that there's already a
plat_mem_setup defined in vr41xx/common/init.c that's why I cannot rename
the function invoked by early_initcall to plat_mem_setup.
Actually, when I examined it further, I found out that using arch_initcall
works just fine except that the add_memory_region is not called before
everything else. It causes error because there's no memory region allotted.
I did this:
/*arch/mips/vr41xx/common/init.c */
void __init plat_mem_setup(void)
{
vr41xx_calculate_clock_frequency();
timer_init();
iomem_resource_init();
add_memory_region(0, 0x04000000, BOOT_MEM_RAM);
}
and it worked! But it's not good practice isn't it? I might ruin the other
vr41xx boards. Do you have any suggestions? Thank you.
ria mae
On 2/28/07, Ralf Baechle <ralf@linux-mips.org> wrote:
>
> On Wed, Feb 28, 2007 at 09:55:28AM +0800, dejo wrote:
>
> > Hello! I would like to ask what replaced early_initcall in the
> > 2.6.18.4kernel.
>
> What you need to change is
>
> o remove the early_initcall() line.
> o rename the function invoked by early_initcall to plat_mem_setup and
> change its prototype to: "void __init plat_mem_setup(void)".
>
> Ralf
>
[-- Attachment #2: Type: text/html, Size: 1763 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread