On Fri, Apr 11, 2014 at 12:27 AM, Andrew Ruder <[email protected]> wrote:
> On Fri, Apr 11, 2014 at 12:24:20AM +0530, Jagan Teki wrote:
>> At-least from zynq_spi.c case - I wouldn't find that obscure case as you 
>> pointed
>> and even with dout NULL which is status poll from (sf_ops.c).
>
> zynq_spi is correct, soft_spi is not.
>
> zynq_spi.c:
> int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
>                 void *din, unsigned long flags)
> {
>         const u8 *tx_buf = dout;
>         u8 *rx_buf = din, buf;
>                         [...]
>                         if (tx_buf)
>                                 buf = *tx_buf++;
>                         else
>                                 buf = 0;
>                         [...]
>                         if (rx_buf)
>                                 *rx_buf++ = buf;
>                         [...]
>
>> It would be great if you mentioned issue scenario for status poll case
>> drivers/mtd/spi/sf_ops.c:               ret = spi_xfer(spi, 8, NULL,
>> &status, 0);
>
> That breaks on soft_spi, hence the patch.

OK - means issue only with soft_spi.c is it?
Can you share the issue log or typical use case scenario w.r.t soft_spi.c,
I need to understand how this got resolved with your change.

I understand you assigned '0' when dout is NULL and you took the buf
only when din is !NULL.

thanks!
-- 
Jagan.
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to