[U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

Simon Schwarz simonschwarzcor at googlemail.com
Thu Jul 28 16:34:50 CEST 2011


Hi Aneesh,

On 07/28/2011 04:24 PM, Aneesh V wrote:
> On Thursday 28 July 2011 06:14 PM, Simon Schwarz wrote:
> [snip ..]
>
>>>> +#endif /* CONFIG_SPL_MMC_SUPPORT */
>>>
>>> and here..
>>>
>>> You start the same the #ifdef again immediately after the #endif. Why
>>> don't you club them together into just one #ifdef block.
>> IMHO #ifdef each function makes it more readable but...
>
> Ok. I don't have any strong views on that.
>
>>
>>>
>>> Actually, since we have garbage collection of un-used functions, I
>>> think doing the calls under #ifdef should be enough, which you have
>>> taken care in board_init_r(). That may help to avoid some #ifdef
>>> clutter.
>> ...I take this way :)
>>
>> I had to define some MMC specific stuff in the board config (copied it
>
> Does your board have MMC support? Then it definitely makes sense to
> keep MMC support enabled.

Yes it has MMC. If NAND works and is stable enough I will go for MMC.
>
>> from OMAP4 - not tested) and added __attribute__((unused)) to
>> mmc_load_image to prevent the warning if the Library is not used.
>
> Did GCC give warning without this change? I think it doesn't due to
> -ffunction-sections?

It does issue warnings:
spl.c:178:13: warning: 'mmc_load_image' defined but not used

>
> best regards,
> Aneesh

Regards
Simon


More information about the U-Boot mailing list