[U-Boot] [PATCH v4 05/10] SPI: Add Dove SPI driver

Sascha Silbe t-uboot at infra-silbe.de
Tue Jun 25 22:09:08 CEST 2013


Hello Jagan,

Jagan Teki <jagannadh.teki at gmail.com> writes:

> Looks ok to me as per coding style after a quick look.

Thanks for the review.


[...]
> Done use the below tag code instead go for spi_alloc_slave()
> see the sample code on "drivers/spi/exynos_spi.c"
>
> ----------------------- TAG+
>> +       slave = malloc(sizeof(struct spi_slave));
>> +       if (!slave)
>> +               return NULL;
>> +
>> +       slave->bus = bus;
>> +       slave->cs = cs;
>> +
> --------------------- TAG-

That's going to be fixed in the next version which builds directly on
kirkwood_spi (rather than duplicating it), which already uses
spi_alloc_slave().


>> +__attribute__((weak)) int board_spi_claim_bus(struct spi_slave *slave)
>
> Why your using __attribute__((weak)) here, may be use to pre-load the
> symbol library
> but what is the use case here?

That's coming from kirkwood_spi. The Keymile boards apparently use it to
select between NAND and SPI flash (see board/keymile/km_arm/km_arm.c).

Sascha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130625/99e856b5/attachment.pgp>


More information about the U-Boot mailing list