[U-Boot] [PATCH] FSL espi: Return all data read from device unmodified.

Jagan Teki jagannadh.teki at gmail.com
Thu Jun 13 04:39:04 CEST 2013


Hi,

Thanks for sending this.

Few comments.
1. Please use subject prefix with version number this case it should
be "PATH v3"
2. Commit header should be stand' one as all follows.
    " spi: fsl_espi:   "

On Thu, Jun 13, 2013 at 3:24 AM, Dale P. Smith
<dsmith at vtiinstruments.com> wrote:
>
> Signed-off-by: Dale P. Smith <dsmith at vtiinstruments.com>
> ---
>  drivers/spi/fsl_espi.c |   10 ++--------
>  1 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
> index 28609ee..bd9dc64 100644
> --- a/drivers/spi/fsl_espi.c
> +++ b/drivers/spi/fsl_espi.c
> @@ -287,17 +287,11 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *data_out,
>                                 debug("***spi_xfer:...%08x readed\n", tmpdin);
>                         }
>                 }
> -               if (data_in) {
> -                       memcpy(data_in, buffer + 2 * cmd_len, tran_len);
> -                       if (*buffer == 0x0b) {
> -                               data_in += tran_len;
> -                               data_len -= tran_len;
> -                               *(int *)buffer += tran_len;
> -                       }
> -               }
>                 spi_cs_deactivate(slave);
>         }
>
> +       if (data_in)
> +               memcpy(data_in, buffer + rx_offset, len);
>         free(buffer);
>         return 0;

Have tested this recently?

Thanks,
Jagan.


More information about the U-Boot mailing list