From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 23 May 2007 14:57:35 -0700 From: "Mark A. Greer" To: linuxppc-dev Subject: Re: powerpc_flash_init(), wtf!? Message-ID: <20070523215735.GA16140@mag.az.mvista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sorry, I've lost the thread in my inbox so I can't reply to it directly. Is something like this what everyone agreed upon? Mark -- diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c index d9db135..44c3144 100644 --- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c +++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c @@ -20,6 +20,7 @@ #include #include #include +#include #include @@ -134,6 +135,18 @@ void prpmc2800_show_cpuinfo(struct seq_file *m) } /* + * Register a platform device for MTD. + */ +static int __init prpmc2800_register_mtd(void) +{ + struct device_node *np; + + np = of_find_compatible_node(NULL, "rom", "direct-mapped"); + of_platform_device_create(np, np->name, NULL); +} +arch_initcall(prpmc2800_register_mtd); + +/* * Called very early, device-tree isn't unflattened */ static int __init prpmc2800_probe(void)