[U-Boot] [PATCH 2/2] spi: add common spi3 controller driver

Scott Jiang scott.jiang.linux at gmail.com
Tue Nov 18 09:58:47 CET 2014


2014-11-17 3:23 GMT+08:00 Jagan Teki <jagannadh.teki at gmail.com>:
> Hi Scott,
>
> On 25 September 2014 14:55, Scott Jiang <scott.jiang.linux at gmail.com> wrote:
>> SPI3 controller is not only used on BF609 platform. So we add a common controller
>> driver and leave machine specific configuration in board drivers.
>> Remove obsolete spi6xx.h and select new board driver in configuration file.
>>
>> Signed-off-by: Scott Jiang <scott.jiang.linux at gmail.com>
>> ---
>>  drivers/spi/Makefile                               |    1 +
>>  drivers/spi/adi_spi3.c                             |  222 ++++++++++++++++
>
> I think adi_spi3.c is a copy of bfin_spi6xx.c with excluded-ed stuff of bf609
>
> And also the difference is of chipselect and slave setup handling, why can't
> we use same driver my making this difference stuff in particular macro.
>
> Please try in that sense, It's not looking good to have one driver
> file with only
> having chip selct handing and slave setup.
>

Would you mind moving spi_cs_is_valid() to arch/xx/include/asm/mach-xxx/spi.h?
Because the number of spi controllers and the cs number of each controller might
be different for different board. It use macros to do this before,
while it's more difficult
as boards become more.

Scott


More information about the U-Boot mailing list