[patch 01/14] mtd: Flex-OneNAND support
amul.saha at samsung.com
Fri Jun 12 09:16:41 EDT 2009
>> >> +#ifdef MODULE
>> >> + flexonenand_setup(flex_bdry_info);
>> >> +#endif
>> > Why do you need this ifdef? What is the fundamental difference between
>> > onenand.ko as a module and onenand compiled-in?
>> flexonenand_setup( ) need not be called, when OneNAND is built-in.
>> This function-call will cause overhead unwantedly on every boot, during OneNAND scan.
>> flexonenand_setup( ) call is needed only when it has been built as a module.
When Flex-OneNAND is built-in, the SLC boundary can be set by kernel command line.
During the boot up time, flexonenand_setup() gets invoked by kernel, on parsing the kernel
But when Flex-OneNAND is built as a module, SLC boundary information is passed as module
So in this case flexonenand_setup() has to be called explicitly during insomd time
(module_init), to set the desired boundary.
So without a compilation macro (#ifdef MODULE) flexonenand_setup() is invoked in onenand_scan,
even when it is built-in which is not needed.
I am not getting your point, could you please clarify?
Amul Kumar Saha
More information about the linux-mtd