powerpc_flash_init(), wtf!?
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
--
arch/powerpc/platforms/embedded6xx/prpmc2800.c +13 -0
@@ -20,6 +20,7 @@#include <asm/system.h> #include <asm/time.h> #include <asm/kexec.h> +#include <asm/of_platform.h> #include <mm/mmu_decl.h>
@@ -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 )
Quoted 3 lines · Mark A. Greer
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?
That's the right approach if your flash device isn't on a bus that's already being scanned with of_platform_bus_probe().
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson