LKML Archive on
help / color / mirror / Atom feed
From: David Brownell <>
To: "Hans-Peter Nilsson" <>
Subject: Re: [PATCH] 3/5: Updates to SPI and mmc_spi: tx_default, kernel 2.6.19
Date: Thu, 25 Jan 2007 05:02:56 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wednesday 24 January 2007 8:52 pm, Hans-Peter Nilsson wrote:
> (Please CC me on replies, I'm not subscribed to LKML or the SPI list.  Thanks.)
> The SD/MMC SPI-based protocol isn't really duplex.  In the
> normal case there's either information transmitted or received,
> not both simultaneously.  The unused data is always 0xff; ones.
> Unfortunately, the SPI framework leaves outgoing data for a
> left-out tx_buf just as "undefined"

In current kernels that's actually changed.  The value to be shifted
out is now specified ... as all-zeroes, which is what various chips
need to receive, and various (half-duplex/Microwire) controllers seem
to be doing in any case.

If that's an issue -- and MMC-over-SPI needs to specify some other
value -- then please re-issue this patch against 2.6.20, including
the update to the bitbang driver ("reference implementation").

I think a better way to package this would be to define a new
flag for spi->mode, since controller drivers are already supposed
to be checking that to make sure they handle all the options which
have been specified.  That flag could work in conjunction with
a byte provided in the spi_device, that would be used instead of
zero.  (Some folk have noted that when debugging, it's easier if
the pattern there is neither all-ones nor all-zeroes ... something
that a digital scope will show is easier to work with.)

- Dave

  reply	other threads:[~2007-01-25 13:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  4:52 Hans-Peter Nilsson
2007-01-25 13:02 ` David Brownell [this message]
2007-01-26 10:46   ` [PATCH 1/2] take 2: (was-kind-of: 3/5 SPI tx_default) 2.6.20-rc6 Hans-Peter Nilsson
2007-01-26 23:21     ` David Brownell
2007-01-27  4:21       ` David Brownell
2007-01-27 20:19         ` Hans-Peter Nilsson
2007-01-27 20:26           ` Hans-Peter Nilsson
2007-01-27 20:59           ` [PATCH] take 3: mmc_spi with SPI_TX_1 2.6.20-rc6 Hans-Peter Nilsson
2007-01-28 17:46             ` [PATCH] take 4: " Hans-Peter Nilsson
2007-01-27 10:11       ` [PATCH 1/2] take 2: (was-kind-of: 3/5 SPI tx_default) 2.6.20-rc6 Hans-Peter Nilsson
2007-01-27 19:25         ` David Brownell
2007-01-26 10:48   ` [PATCH 2/2] " Hans-Peter Nilsson

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:

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

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] 3/5: Updates to SPI and mmc_spi: tx_default, kernel 2.6.19' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).