[Top] [All Lists]

Re: early_initcall replacement

To: "Ralf Baechle" <>
Subject: Re: early_initcall replacement
From: dejo <>
Date: Thu, 1 Mar 2007 12:33:29 +0800
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=hlns2RpgDa6MTh5+CfG44TH4djbtFn8B0ECJEal2xlb1+KeMtxTcOFaQEssIkBEulQc5hV8lz7ZB0rexBAgke0BkXC9NwxZMbbFjx1xhBDrygJDkL7bwUrruMjZizh91Bkdy/9TXYOMqqcFHvMxw3VA8GGwSyXKVw89BKfEUGIk=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=hJIjKRI5hafqVUSt+648nFqeNBh8LJS8yTdzZnRjPI9pgQ9wvkRlubQ5K8MAGJk6wCfcPWgztczx9i+YQblpuQVMFwZ0SVZr1obIxoOvC0RMWcNF5uI66P0F+3iS8k/sZpBvWZx6zPPcHFnTO8l1loYY0pcRyieTIUkyE/Ywmwc=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
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:
.c */
void __init plat_mem_setup(void)

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

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)".


<Prev in Thread] Current Thread [Next in Thread>
  • Re: early_initcall replacement, dejo <=