mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
spi: make mode visible to both dm and non-dm
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: Simon Glass <sjg@chromium.org> Tested-by: Jagan Teki <jteki@openedev.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
This commit is contained in:
@@ -99,13 +99,13 @@ struct dm_spi_slave_platdata {
|
|||||||
*
|
*
|
||||||
* @dev: SPI slave device
|
* @dev: SPI slave device
|
||||||
* @max_hz: Maximum speed for this slave
|
* @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
|
* @speed: Current bus speed. This is 0 until the bus is first
|
||||||
* claimed.
|
* claimed.
|
||||||
* @bus: ID of the bus that the slave is attached to. For
|
* @bus: ID of the bus that the slave is attached to. For
|
||||||
* driver model this is the sequence number of the SPI
|
* driver model this is the sequence number of the SPI
|
||||||
* bus (bus->seq) so does not need to be stored
|
* bus (bus->seq) so does not need to be stored
|
||||||
* @cs: ID of the chip select connected to the slave.
|
* @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_rx: SPI RX operation mode.
|
||||||
* @op_mode_tx: SPI TX operation mode.
|
* @op_mode_tx: SPI TX operation mode.
|
||||||
* @wordlen: Size of SPI word in number of bits
|
* @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 */
|
struct udevice *dev; /* struct spi_slave is dev->parentdata */
|
||||||
uint max_hz;
|
uint max_hz;
|
||||||
uint speed;
|
uint speed;
|
||||||
uint mode;
|
|
||||||
#else
|
#else
|
||||||
unsigned int bus;
|
unsigned int bus;
|
||||||
unsigned int cs;
|
unsigned int cs;
|
||||||
#endif
|
#endif
|
||||||
|
uint mode;
|
||||||
u8 op_mode_rx;
|
u8 op_mode_rx;
|
||||||
u8 op_mode_tx;
|
u8 op_mode_tx;
|
||||||
unsigned int wordlen;
|
unsigned int wordlen;
|
||||||
|
Reference in New Issue
Block a user