linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Valentine Barshak" <vbarshak@ru.mvista.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] PowerPC 44x: use machine_device_initcall() instead of device_initcall() for warp_nand
Date: Fri, 4 Apr 2008 12:49:31 -0600	[thread overview]
Message-ID: <fa686aa40804041149n7f9ebabdwd7ce33d5f4de3747@mail.gmail.com> (raw)
In-Reply-To: <20080404182437.GA18185@ru.mvista.com>

On Fri, Apr 4, 2008 at 12:24 PM, Valentine Barshak
<vbarshak@ru.mvista.com> wrote:
> With a multiplatform kernel, once built we always have warp_setup_nand_flash() called
>  and NDFC probed, no matter what machine we actually run on. This potentially can cause
>  problems (such as kernel crash), since NDFC is probed at a warp-predefined address.
>  Using machine_device_initcall() NAND devices are registered if we run on a warp only.
>
>  Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>

>  ---
>   arch/powerpc/platforms/44x/warp-nand.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletion(-)
>
>  --- linux-2.6.orig/arch/powerpc/platforms/44x/warp-nand.c       2008-03-06 14:39:46.000000000 +0300
>  +++ linux-2.6.bld/arch/powerpc/platforms/44x/warp-nand.c        2008-04-04 22:03:36.000000000 +0400
>  @@ -11,6 +11,7 @@
>   #include <linux/mtd/partitions.h>
>   #include <linux/mtd/nand.h>
>   #include <linux/mtd/ndfc.h>
>  +#include <asm/machdep.h>
>
>   #ifdef CONFIG_MTD_NAND_NDFC
>
>  @@ -100,6 +101,6 @@ static int warp_setup_nand_flash(void)
>
>         return 0;
>   }
>  -device_initcall(warp_setup_nand_flash);
>  +machine_device_initcall(warp, warp_setup_nand_flash);
>
>   #endif
>  _______________________________________________
>  Linuxppc-dev mailing list
>  Linuxppc-dev@ozlabs.org
>  https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2008-04-04 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 18:24 [PATCH] PowerPC 44x: use machine_device_initcall() instead of device_initcall() for warp_nand Valentine Barshak
2008-04-04 18:49 ` Grant Likely [this message]
2008-04-08  4:21 ` [PATCH] PowerPC 44x: use machine_device_initcall() instead ofdevice_initcall() " Sean MacLennan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa686aa40804041149n7f9ebabdwd7ce33d5f4de3747@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=vbarshak@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).