[U-Boot] [RESEND PATCH v5 1/6] cgtqmx6eval: Add SPI NOR flash support

Jagan Teki jteki at openedev.com
Thu Nov 19 09:27:01 CET 2015


Hi Fabio,

On 19 November 2015 at 02:50, Fabio Estevam <festevam at gmail.com> wrote:
> Hi Jagan,
>
> On Tue, Nov 17, 2015 at 4:07 AM, Jagan Teki <jteki at openedev.com> wrote:
>> On 14 November 2015 at 00:19, Otavio Salvador <otavio at ossystems.com.br> wrote:
>>> Add SPI NOR support:
>>>
>>> => sf probe
>>> SF: Detected SST25VF032B with page size 256 Bytes, erase size 4 KiB, total 4 MiB
>>>
>>> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
>>
>> I have asked to move the spi_nor int stuff on #ifdef CONFIG_SPI_MXC in
>> previous patch any response on that?
>
> Is this really needed?
>
> Given that:
>
> - The boot medium of this board is SPI NOR
> - We want CONFIG_SPI_MXC to be always selected
> - We don't want to polute the code with ifdef's

Since it's u-boot, size is main constraint ie the main reason to use
ifdef and also this initialization code must be part of driver probe
instead of board file, once the driver moved to dm then will move this
as well so to indicate that this could be a driver code better to use
the driver config in #ifdef.

See this
$ grep -R CONFIG_MXC_SPI board/

And use setup_spi instead of setup_spinor

>
> I thinks the code is fine as is.

thanks!
-- 
Jagan | openedev.


More information about the U-Boot mailing list