Re: early_initcall replacement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx> 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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux