[PATCH v2 2/5] davinci: DA830/OMAP-L137 EVM: do not configure NAND on UI card when MMC/SD is selected

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH v2 2/5] davinci: DA830/OMAP-L137 EVM: do not configure NAND on UI card when MMC/SD is selected

Kevin Hilman
Sergei Shtylyov <[hidden email]> writes:

> Hello.
>
> Nori, Sekhar wrote:
>
>>>Hello.
>
>>>Sekhar Nori wrote:
>
>>>>On the DA830, AEMIF and MMC/SD pins are shared. On the EVM, when
>>>>the mux_mode signal is low MMC/SD works and when mux_mode signal
>>>>is high, NAND works.
>
>>>>When MMC/SD driver is configured in the kernel, do not let NAND
>>>>get registered and drive mux_mode high. Instead, print a warning
>>>>for user to understand why the platform device for NAND did not
>>>>get registered.
>
>>>>Signed-off-by: Sekhar Nori <[hidden email]>
>
>>>[...]
>
>>>>diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
>>>>index 6de058f..4fb0447 100644
>>>>--- a/arch/arm/mach-davinci/board-da830-evm.c
>>>>+++ b/arch/arm/mach-davinci/board-da830-evm.c
>>>>@@ -253,6 +253,12 @@ static const short da830_evm_emif25_pins[] = {
>>>>    -1
>>>> };
>>>>
>>>>+#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
>>>>+#define HAS_MMC    1
>>>>+#else
>>>>+#define HAS_MMC    0
>>>>+#endif
>
>>>    This is not needed. Why not just use #ifdef's directly?
>
>> May be it's a personal preference, but I like this better than
>> seeing #ifdefs embedded in function body. Besides, that would be
>> a direct violation of Documentation/SubmittingPatches section 2.2
>
>    What you're doing is also against the community's practices as Mark
> has already pointed IIRC.

Yes, this #idferry is ugly, but it's due to a weakness in our ability
to dynamically mux, so I'm OK with this limited use.

Kevin


Loading...