[U-Boot] [PATCH] SPI: added support for MX51 to mxc_spi

Stefano Babic sbabic at denx.de
Mon Mar 22 11:25:44 CET 2010


Tom wrote:
>> +#define MXC_CSPIRXDATA        0x00
>> +#define MXC_CSPITXDATA        0x04
>> +#define MXC_CSPICTRL        0x08
>> +#define MXC_CSPIPERIOD_32KHZ    (1 << 15)
>> +
> 
> Pulling these out and making them common may not be the best thing to do.
> Located here, it hides the
> 
> #ifdef CONFIG_MX27
> #elif defined (CONFIG_MX31)
> #elif defined (CONFIG_MX51)
> #else
> #endif
> 
> I would prefer if you just kept the copies in the mx31, mx51 locations

You are right - I will move them.

> 
> In 'Add SPI support to mx51evk board'
> The MAX_SPI_BYTES was defined in the config file.
> Here it is defined for mx31 generally.
> You should be consistent.
> These would be a better place for the mx51 values as you only have to do
> it once.

That is correct. And the value is not related to a particular board,
setting this define in config file is definetely wrong. I will move it.

> Be constistent with mx31
> Move the #includes to the first lines after the #elif
> The other #defines to follow.

Ok, thanks.

Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list