public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] SPI: Fix 32 bit transfers in mxc_spi.c
Date: Wed, 02 Dec 2009 23:32:01 +0100	[thread overview]
Message-ID: <20091202223201.157174C025@gemini.denx.de> (raw)
In-Reply-To: <1257965907-5622-1-git-send-email-lilja.magnus@gmail.com>

Dear Guennadi,

In message <1257965907-5622-1-git-send-email-lilja.magnus@gmail.com> Magnus Lilja wrote:
> Commit f9b6a1575d9f1ca192e4cb60e547aa66f08baa3f,  "i.MX31: fix SPI
> driver for shorter than 32 bit" broke 32 bit transfers. This patch
> makes single 32 bit transfer work again.
> 
> Tested on i.MX31 Litekit and i.MX31 PDK using 32 bit transfers to
> the MC13783/ATLAS chip (using the 'date' command).
> 
> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
> Cc: Guennadi Liakhovetski <lg@denx.de>
> 
> ---
> 
> I don't think transfers larger than 32 bits will work. It seems
> like they worked in the original driver, but the above commit broke that.
> This patch does not try to fix that problem.
> 
>  drivers/spi/mxc_spi.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
> index fad9840..8b5d4be 100644
> --- a/drivers/spi/mxc_spi.c
> +++ b/drivers/spi/mxc_spi.c
> @@ -142,6 +142,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
>  				*(u8 *)din = data;
>  			else if (bitlen < 17)
>  				*(u16 *)din = data;
> +			else
> +				*in_l = data;
>  		}
>  	}

Could you please comment ?

Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Many aligators will be slain, but the swamp will remain.

  reply	other threads:[~2009-12-02 22:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 18:58 [U-Boot] [PATCH] SPI: Fix 32 bit transfers in mxc_spi.c Magnus Lilja
2009-12-02 22:32 ` Wolfgang Denk [this message]
2009-12-03  0:25   ` Guennadi Liakhovetski
2009-12-03  7:13     ` Magnus Lilja
2010-01-04 19:38       ` Magnus Lilja
2010-01-04 20:04         ` Guennadi Liakhovetski
2010-01-11 18:41           ` Magnus Lilja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091202223201.157174C025@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox