From: Jagan Teki <jteki@openedev.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/5] spi: make mode visible to both dm and non-dm
Date: Mon, 14 Dec 2015 12:27:09 +0530 [thread overview]
Message-ID: <1450076232-31884-2-git-send-email-jteki@openedev.com> (raw)
In-Reply-To: <1450076232-31884-1-git-send-email-jteki@openedev.com>
Couldn't find the exact reason to define 'mode' for dm,
probably it is not using in non-dm drivers but it need
to visible both dm and non-dm as mode data is getting
dereferred in spi flash core ie common to both.
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
Changes for v2:
- newly added
include/spi.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/spi.h b/include/spi.h
index b4d2723..713bab9 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -99,13 +99,13 @@ struct dm_spi_slave_platdata {
*
* @dev: SPI slave device
* @max_hz: Maximum speed for this slave
- * @mode: SPI mode to use for this slave (see SPI mode flags)
* @speed: Current bus speed. This is 0 until the bus is first
* claimed.
* @bus: ID of the bus that the slave is attached to. For
* driver model this is the sequence number of the SPI
* bus (bus->seq) so does not need to be stored
* @cs: ID of the chip select connected to the slave.
+ * @mode: SPI mode to use for this slave (see SPI mode flags)
* @op_mode_rx: SPI RX operation mode.
* @op_mode_tx: SPI TX operation mode.
* @wordlen: Size of SPI word in number of bits
@@ -120,11 +120,11 @@ struct spi_slave {
struct udevice *dev; /* struct spi_slave is dev->parentdata */
uint max_hz;
uint speed;
- uint mode;
#else
unsigned int bus;
unsigned int cs;
#endif
+ u8 mode;
u8 op_mode_rx;
u8 op_mode_tx;
unsigned int wordlen;
--
1.9.1
next prev parent reply other threads:[~2015-12-14 6:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 6:57 [U-Boot] [PATCH v2 1/5] sf: Get spi locally from spi_flash Jagan Teki
2015-12-14 6:57 ` Jagan Teki [this message]
2015-12-14 6:57 ` [U-Boot] [PATCH v2 3/5] spi: Use mode instead of op_mode_tx Jagan Teki
2015-12-14 7:31 ` Bin Meng
2015-12-14 7:35 ` Jagan Teki
2015-12-14 7:34 ` Bin Meng
2015-12-14 7:39 ` Jagan Teki
2015-12-14 6:57 ` [U-Boot] [PATCH v2 4/5] spi: Rename SPI_TX_BP|QPP to SPI_TX_BYTE|QUAD Jagan Teki
2015-12-14 6:57 ` [U-Boot] [PATCH v2 5/5] sf: Move spi_read_cmds_array locally Jagan Teki
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=1450076232-31884-2-git-send-email-jteki@openedev.com \
--to=jteki@openedev.com \
--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