Re: MTD OF parser problem
From: Scott Wood <hidden>
Date: 2009-07-07 17:32:09
On Tue, Jul 07, 2009 at 03:45:29PM +0200, Roman Fietze wrote:
Hallo, I tried to define my MTD partitions in a device tree as documented. The function of_flash_probe() inside teh file physmap_of.c never compiled the code below #ifdef CONFIG_MTD_OF_PARTS because when the MTD subsystem is compiled as a module I can only find CONFIG_MTD_OF_PARTS_MODULE beeing defined somewhere below my build directory. If I change the above define to #if defined(CONFIG_MTD_OF_PARTS) || defined(CONFIG_MTD_OF_PARTS_MODULE) everything is fine and MTD partition work as expected. My fault? Other solution?
That would break if MTD_PHYSMAP_OF (or any other user) is built-in but MTD_OF_PARTS is a module. Perhaps there's some way we could hook OF partitions into the normal partition probing, so we don't have to refer to it by symbol? The main obstacle would be communicating the device node. Or we could just disallow MTD_OF_PARTS from being modularized -- like MTD_PARTITIONS. -Scott