spi: Cleanup set
Subsystems (2)
cover spi: Cleanup set
Cleanup set on spi_slave{}
Jagan Teki (8):
spi: Remove SPI_OPM_RX_EXTN
spi: Remove SPI_OPM_RX_DIO|QIOF
spi: Rename SPI_OPM_RX_* to SPI_RX_*
spi: Rename op_mode_rx to mode_rx
spi: Move mode, mode_rx, flags macro's to structure
spi: Fix bit assignment with flags
spi: Use BIT macro
spi: Minor cleanup
drivers/mtd/spi/spi_flash.c | 2 +- drivers/spi/ich.c | 2 +- drivers/spi/ti_qspi.c | 2 +- include/spi.h | 65 +++++++++++++++++++-------------------------- 4 files changed, 31 insertions(+), 40 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/8 spi: Remove SPI_OPM_RX_EXTN
SPI_OPM_RX_EXTN is a combination of all rx opmode's and spi driver shall use any one of the rx mode at a time not the combination and it is true in case of flash where spi_flash_table mention combination of supported read opmodes so-that the required one will pick based on the rx mode from spi driver.
--- include/spi.h | 3 --- 1 file changed, 3 deletions(-)
include/spi.h +0 -3
@@ -41,9 +41,6 @@#define SPI_OPM_RX_DIO (1 << 3)#define SPI_OPM_RX_QOF (1 << 4)#define SPI_OPM_RX_QIOF (1 << 5) -#define SPI_OPM_RX_EXTN (SPI_OPM_RX_AS | SPI_OPM_RX_AF | SPI_OPM_RX_DOUT | \ - SPI_OPM_RX_DIO | SPI_OPM_RX_QOF | \ - SPI_OPM_RX_QIOF)/* SPI bus connection options - see enum spi_dual_flash */ #define SPI_CONN_DUAL_SHARED (1 << 0)
Signature · 1 line
1.9.1
PATCH 1/8 spi: Remove SPI_OPM_RX_EXTN
Quoted 7 lines · Jagan Teki
SPI_OPM_RX_EXTNis a combination of all rx opmode's and spi driver shall use any one of the rx mode at a time not the combination and it is true in case of flash wherespi_flash_tablemention combination of supported read opmodes so-that the required one will pick based on the rx mode from spi driver.
Quoted 6 lines
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
PATCH 2/8 spi: Remove SPI_OPM_RX_DIO|QIOF
In reply to Jagan TekiSPI_OPM_RX_DIO and SPI_OPM_RX_QIOF are rx IO commands/opmodes for dual and quad. Usually IO operation's are referred to flash protocol rather with spi controller protocol, these are still present in flash side for the usage of spi-nor controllers.
--- include/spi.h | 2 -- 1 file changed, 2 deletions(-)
include/spi.h +0 -2
@@ -38,9 +38,7 @@#define SPI_OPM_RX_AS (1 << 0)#define SPI_OPM_RX_AF (1 << 1)#define SPI_OPM_RX_DOUT (1 << 2) -#define SPI_OPM_RX_DIO (1 << 3)#define SPI_OPM_RX_QOF (1 << 4) -#define SPI_OPM_RX_QIOF (1 << 5)/* SPI bus connection options - see enum spi_dual_flash */ #define SPI_CONN_DUAL_SHARED (1 << 0)
Signature · 1 line
1.9.1
PATCH 2/8 spi: Remove SPI_OPM_RX_DIO|QIOF
Quoted 6 lines · Jagan Teki
SPI_OPM_RX_DIOandSPI_OPM_RX_QIOFare rx IO commands/opmodes for dual and quad. Usually IO operation's are referred to flash protocol rather with spi controller protocol, these are still present in flash side for the usage of spi-nor controllers.
Quoted 6 lines
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
PATCH 3/8 spi: Rename SPI_OPM_RX_* to SPI_RX_*
In reply to Jagan TekiSPI_OPM_RX_AS - SPI_RX_SLOWSPI_OPM_RX_AF - SPI_RX_FASTSPI_OPM_RX_DOUT - SPI_RX_DUALSPI_OPM_RX_QOF - SPI_RX_QUAD
--- drivers/spi/ich.c | 2 +- drivers/spi/ti_qspi.c | 2 +- include/spi.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/spi/ich.c +1 -1
@@ -752,7 +752,7 @@ static int ich_spi_child_pre_probe(struct udevice *dev)* and byte program command for SST flash */ if (plat->ich_version ==7 ) { - slave->op_mode_rx =SPI_OPM_RX_AS ; + slave->op_mode_rx =SPI_RX_SLOW ; slave->mode =SPI_TX_BYTE ; }
drivers/spi/ti_qspi.c +1 -1
@@ -115,7 +115,7 @@ static void ti_spi_setup_spi_register(struct ti_qspi_slave *qslave)QSPI_SETUP0_NUM_D_BYTES_8_BITS |QSPI_SETUP0_READ_QUAD |QSPI_CMD_WRITE | QSPI_NUM_DUMMY_BITS); - slave->op_mode_rx =SPI_OPM_RX_QOF ; + slave->op_mode_rx =SPI_RX_QUAD ;#else memval |=QSPI_CMD_READ |QSPI_SETUP0_NUM_A_BYTES | QSPI_SETUP0_NUM_D_BYTES_NO_BITS |
include/spi.h +4 -4
@@ -35,10 +35,10 @@#define SPI_XFER_U_PAGE (1 << 5)/* SPI RX operation modes */ -#define SPI_OPM_RX_AS (1 << 0) -#define SPI_OPM_RX_AF (1 << 1) -#define SPI_OPM_RX_DOUT (1 << 2) -#define SPI_OPM_RX_QOF (1 << 4) +#define SPI_RX_SLOW (1 << 0) +#define SPI_RX_FAST (1 << 1) +#define SPI_RX_DUAL (1 << 2) +#define SPI_RX_QUAD (1 << 4)/* SPI bus connection options - see enum spi_dual_flash */ #define SPI_CONN_DUAL_SHARED (1 << 0)
Signature · 1 line
1.9.1
PATCH 3/8 spi: Rename SPI_OPM_RX_* to SPI_RX_*
Quoted 11 lines · Jagan Teki
SPI_OPM_RX_AS-SPI_RX_SLOWSPI_OPM_RX_AF-SPI_RX_FASTSPI_OPM_RX_DOUT-SPI_RX_DUALSPI_OPM_RX_QOF-SPI_RX_QUADCc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
PATCH 4/8 spi: Rename op_mode_rx to mode_rx
In reply to Jagan TekiSince spi rx mode macro's are renamed to simple and meaninfull in below patch, this patch will rename the respective structure member.
"spi: Rename SPI_OPM_RX_* to SPI_RX_*" (sha1: 5e9ffbc5376616449beaaf2bc100f579f12291cf)
--- drivers/mtd/spi/spi_flash.c | 2 +- drivers/spi/ich.c | 2 +- drivers/spi/ti_qspi.c | 2 +- include/spi.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
drivers/mtd/spi/spi_flash.c +1 -1
@@ -1098,7 +1098,7 @@ int spi_flash_scan(struct spi_flash *flash) flash->sector_size = flash->erase_size;/* Look for the fastest read cmd */ - cmd =fls (params->e_rd_cmd & spi->op_mode_rx); + cmd =fls (params->e_rd_cmd & spi->mode_rx);if (cmd) { cmd = spi_read_cmds_array[cmd -1 ]; flash->read_cmd = cmd;
drivers/spi/ich.c +1 -1
@@ -752,7 +752,7 @@ static int ich_spi_child_pre_probe(struct udevice *dev)* and byte program command for SST flash */ if (plat->ich_version ==7 ) { - slave->op_mode_rx =SPI_RX_SLOW ; + slave->mode_rx =SPI_RX_SLOW ; slave->mode =SPI_TX_BYTE ; }
drivers/spi/ti_qspi.c +1 -1
@@ -115,7 +115,7 @@ static void ti_spi_setup_spi_register(struct ti_qspi_slave *qslave)QSPI_SETUP0_NUM_D_BYTES_8_BITS |QSPI_SETUP0_READ_QUAD |QSPI_CMD_WRITE | QSPI_NUM_DUMMY_BITS); - slave->op_mode_rx =SPI_RX_QUAD ; + slave->mode_rx =SPI_RX_QUAD ;#else memval |=QSPI_CMD_READ |QSPI_SETUP0_NUM_A_BYTES | QSPI_SETUP0_NUM_D_BYTES_NO_BITS |
include/spi.h +2 -2
@@ -99,7 +99,7 @@ struct dm_spi_slave_platdata {* 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. +* @mode_rx: SPI RX mode to use for this slave * @wordlen: Size of SPI word in number of bits * @max_write_size: If non-zero, the maximum number of bytes which can * be written at once, excluding command bytes.
@@ -117,7 +117,7 @@ struct spi_slave {unsigned int cs;#endif uint mode; -u8 op_mode_rx; +u8 mode_rx;unsigned int wordlen;unsigned int max_write_size;void *memory_map;
Signature · 1 line
1.9.1
PATCH 4/8 spi: Rename op_mode_rx to mode_rx
Hi Jagan,
Quoted 5 lines · Jagan Teki
Since spi rx mode macro's are renamed to simple and meaninfull in below patch, this patch will rename the respective structure member.
"spi: Rename SPI_OPM_RX_* to SPI_RX_*" (sha1:5e9ffbc5376616449beaaf2bc100f579f12291cf)
I don't see this commit id in the origin/master. Can you please double check?
Quoted 7 lines
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
Other than that,
Regards,
Bin
PATCH 4/8 spi: Rename op_mode_rx to mode_rx
Hi Bin,
Quoted 10 lines · Bin Meng
Hi Jagan,
Quoted 5 lines · Jagan Teki
Since spi rx mode macro's are renamed to simple and meaninfull in below patch, this patch will rename the respective structure member.
"spi: Rename SPI_OPM_RX_* to SPI_RX_*" (sha1:5e9ffbc5376616449beaaf2bc100f579f12291cf)I don't see this commit id in the origin/master. Can you please double check?
This sha1 is from 3/4 - OK I will skip this details on commit message looks confusing.
Quoted 9 lines
Quoted 8 lines
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
Quoted 4 lines
Other than that,
Reviewed-by Bin Meng <[email protected]>Tested-by Bin Meng <[email protected]>
thanks!
Signature · 1 line
Jagan.
PATCH 4/8 spi: Rename op_mode_rx to mode_rx
Hi Jagan,
Quoted 12 lines · Jagan Teki
Hi Bin,
Quoted 9 lines · Bin Meng
Hi Jagan,
Quoted 5 lines · Jagan Teki
Since spi rx mode macro's are renamed to simple and meaninfull in below patch, this patch will rename the respective structure member.
"spi: Rename SPI_OPM_RX_* to SPI_RX_*" (sha1:5e9ffbc5376616449beaaf2bc100f579f12291cf)
Quoted 5 lines
Quoted 1 line
I don't see this commit id in the origin/master. Can you please double check?
This sha1 is from 3/4 - OK I will skip this details on commit message looks confusing.
Unless the commit id is already in u-boot/master, I doubt your local commit id will become invalid when it merges to mainstream.
Regards,
Bin
PATCH 4/8 spi: Rename op_mode_rx to mode_rx
Quoted 15 lines · Bin Meng
Hi Jagan,
Quoted 12 lines · Jagan Teki
Hi Bin,
Quoted 9 lines · Bin Meng
Hi Jagan,
Quoted 5 lines · Jagan Teki
Since spi rx mode macro's are renamed to simple and meaninfull in below patch, this patch will rename the respective structure member.
"spi: Rename SPI_OPM_RX_* to SPI_RX_*" (sha1:5e9ffbc5376616449beaaf2bc100f579f12291cf)
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
I don't see this commit id in the origin/master. Can you please double check?
This sha1 is from 3/4 - OK I will skip this details on commit message looks confusing.
Unless the commit id is already in u-boot/master, I doubt your local commit id will become invalid when it merges to mainstream.
OK, I will remove the commit id while applying.
thanks!
Signature · 1 line
Jagan.
PATCH 5/8 spi: Move mode, mode_rx, flags macro's to structure
In reply to Jagan TekiThis patch moves mode, mode_rx, flags macro's to respective member position on spi_slave{}, for better readabilty and finding the respective member macro's easily.
This patch fix's the tab space on mode macro's as well.
--- include/spi.h | 56 ++++++++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 30 deletions(-)
include/spi.h +26 -30
@@ -10,36 +10,6 @@#ifndef _SPI_H_#define _SPI_H_ -/* SPI mode flags */ -#define SPI_CPHA 0x01/* clock phase */ -#define SPI_CPOL 0x02/* clock polarity */ -#define SPI_MODE_0 (0|0)/* (original MicroWire) */ -#define SPI_MODE_1 (0|SPI_CPHA) -#define SPI_MODE_2 (SPI_CPOL|0) -#define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) -#define SPI_CS_HIGH 0x04/* CS active high */ -#define SPI_LSB_FIRST 0x08/* per-word bits-on-wire */ -#define SPI_3WIRE 0x10/* SI/SO signals shared */ -#define SPI_LOOP 0x20/* loopback mode */ -#define SPI_SLAVE 0x40/* slave mode */ -#define SPI_PREAMBLE 0x80/* Skip preamble bytes */ -#define SPI_TX_BYTE 0x100/* transmit with 1 wire byte */ -#define SPI_TX_QUAD 0x200/* transmit with 4 wires */ - -/* SPI transfer flags */ -#define SPI_XFER_BEGIN 0x01/* Assert CS before transfer */ -#define SPI_XFER_END 0x02/* Deassert CS after transfer */ -#define SPI_XFER_MMAP 0x08/* Memory Mapped start */ -#define SPI_XFER_MMAP_END 0x10/* Memory Mapped End */ -#define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END) -#define SPI_XFER_U_PAGE (1 << 5) - -/* SPI RX operation modes */ -#define SPI_RX_SLOW (1 << 0) -#define SPI_RX_FAST (1 << 1) -#define SPI_RX_DUAL (1 << 2) -#define SPI_RX_QUAD (1 << 4) -/* SPI bus connection options - see enum spi_dual_flash */ #define SPI_CONN_DUAL_SHARED (1 << 0)#define SPI_CONN_DUAL_SEPARATED (1 << 1)
@@ -117,12 +87,38 @@ struct spi_slave {unsigned int cs;#endif uint mode; +#define SPI_CPHA 0x01/* clock phase */ +#define SPI_CPOL 0x02/* clock polarity */ +#define SPI_MODE_0 (0|0)/* (original MicroWire) */ +#define SPI_MODE_1 (0|SPI_CPHA) +#define SPI_MODE_2 (SPI_CPOL|0) +#define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) +#define SPI_CS_HIGH 0x04/* CS active high */ +#define SPI_LSB_FIRST 0x08/* per-word bits-on-wire */ +#define SPI_3WIRE 0x10/* SI/SO signals shared */ +#define SPI_LOOP 0x20/* loopback mode */ +#define SPI_SLAVE 0x40/* slave mode */ +#define SPI_PREAMBLE 0x80/* Skip preamble bytes */ +#define SPI_TX_BYTE 0x100/* transmit with 1 wire byte */ +#define SPI_TX_QUAD 0x200/* transmit with 4 wires */ u8 mode_rx; +#define SPI_RX_SLOW (1 << 0) +#define SPI_RX_FAST (1 << 1) +#define SPI_RX_DUAL (1 << 2) +#define SPI_RX_QUAD (1 << 4) +unsigned int wordlen;unsigned int max_write_size;void *memory_map;u8 option; +u8 flags; +#define SPI_XFER_BEGIN 0x01/* Assert CS before transfer */ +#define SPI_XFER_END 0x02/* Deassert CS after transfer */ +#define SPI_XFER_MMAP 0x08/* Memory Mapped start */ +#define SPI_XFER_MMAP_END 0x10/* Memory Mapped End */ +#define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END) +#define SPI_XFER_U_PAGE (1 << 5) };/**
Signature · 1 line
1.9.1
PATCH 5/8 spi: Move mode, mode_rx, flags macro's to structure
Hi Jagan,
Quoted 3 lines · Jagan Teki
This patch moves mode,
mode_rx, flags macro's to respective member position on spi_slave{}, for better readabilty and finding the respective member macro's easily.
I am not in favor of mixing macros along with the structure members. This looks to me not clearer than before. Do we have some guideline anywhere?
Quoted 9 lines
This patch fix's the tab space on mode macro's as well.
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
Regards,
Bin
PATCH 5/8 spi: Move mode, mode_rx, flags macro's to structure
Hi Bin,
Quoted 10 lines · Bin Meng
Hi Jagan,
Quoted 3 lines · Jagan Teki
This patch moves mode,
mode_rx, flags macro's to respective member position on spi_slave{}, for better readabilty and finding the respective member macro's easily.I am not in favor of mixing macros along with the structure members. This looks to me not clearer than before. Do we have some guideline anywhere?
Looks better readable and easily find the respective member macro's ie the reason I have placed and I took the idea from Linux SPI core.
Quoted 10 lines
Quoted 10 lines
This patch fix's the tab space on mode macro's as well.
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
thanks!
Signature · 1 line
Jagan.
PATCH 6/8 spi: Fix bit assignment with flags
In reply to Jagan TekiFixed bit assignment with flags members on spi_slave{}
--- include/spi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/spi.h +3 -3
@@ -115,10 +115,10 @@ struct spi_slave {u8 flags;#define SPI_XFER_BEGIN 0x01/* Assert CS before transfer */ #define SPI_XFER_END 0x02/* Deassert CS after transfer */ -#define SPI_XFER_MMAP 0x08/* Memory Mapped start */ -#define SPI_XFER_MMAP_END 0x10/* Memory Mapped End */ #define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END) -#define SPI_XFER_U_PAGE (1 << 5) +#define SPI_XFER_MMAP 0x04/* Memory Mapped start */ +#define SPI_XFER_MMAP_END 0x08/* Memory Mapped End */ +#define SPI_XFER_U_PAGE 0x10 };/**
Signature · 1 line
1.9.1
PATCH 6/8 spi: Fix bit assignment with flags
Quoted 8 lines · Jagan Teki
Fixed bit assignment with flags members on spi_slave{}
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
PATCH 7/8 spi: Use BIT macro
In reply to Jagan TekiUsed BIT macro like 1 << nr as BIT(nr) where nr is 0...n
--- include/spi.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-)
include/spi.h +19 -19
@@ -87,25 +87,25 @@ struct spi_slave {unsigned int cs;#endif uint mode; -#define SPI_CPHA 0x01/* clock phase */ -#define SPI_CPOL 0x02/* clock polarity */ +#define SPI_CPHA BIT(0)/* clock phase */ +#define SPI_CPOL BIT(1)/* clock polarity */ #define SPI_MODE_0 (0|0)/* (original MicroWire) */ #define SPI_MODE_1 (0|SPI_CPHA)#define SPI_MODE_2 (SPI_CPOL|0)#define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) -#define SPI_CS_HIGH 0x04/* CS active high */ -#define SPI_LSB_FIRST 0x08/* per-word bits-on-wire */ -#define SPI_3WIRE 0x10/* SI/SO signals shared */ -#define SPI_LOOP 0x20/* loopback mode */ -#define SPI_SLAVE 0x40/* slave mode */ -#define SPI_PREAMBLE 0x80/* Skip preamble bytes */ -#define SPI_TX_BYTE 0x100/* transmit with 1 wire byte */ -#define SPI_TX_QUAD 0x200/* transmit with 4 wires */ +#define SPI_CS_HIGH BIT(2)/* CS active high */ +#define SPI_LSB_FIRST BIT(3)/* per-word bits-on-wire */ +#define SPI_3WIRE BIT(4)/* SI/SO signals shared */ +#define SPI_LOOP BIT(5)/* loopback mode */ +#define SPI_SLAVE BIT(6)/* slave mode */ +#define SPI_PREAMBLE BIT(7)/* Skip preamble bytes */ +#define SPI_TX_BYTE BIT(8)/* transmit with 1 wire byte */ +#define SPI_TX_QUAD BIT(9)/* transmit with 4 wires */ u8 mode_rx; -#define SPI_RX_SLOW (1 << 0) -#define SPI_RX_FAST (1 << 1) -#define SPI_RX_DUAL (1 << 2) -#define SPI_RX_QUAD (1 << 4) +#define SPI_RX_SLOW BIT(0) +#define SPI_RX_FAST BIT(1) +#define SPI_RX_DUAL BIT(2) +#define SPI_RX_QUAD BIT(4)unsigned int wordlen;unsigned int max_write_size;
@@ -113,12 +113,12 @@ struct spi_slave {u8 option;u8 flags; -#define SPI_XFER_BEGIN 0x01/* Assert CS before transfer */ -#define SPI_XFER_END 0x02/* Deassert CS after transfer */ +#define SPI_XFER_BEGIN BIT(0)/* Assert CS before transfer */ +#define SPI_XFER_END BIT(1)/* Deassert CS after transfer */ #define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END) -#define SPI_XFER_MMAP 0x04/* Memory Mapped start */ -#define SPI_XFER_MMAP_END 0x08/* Memory Mapped End */ -#define SPI_XFER_U_PAGE 0x10 +#define SPI_XFER_MMAP BIT(2)/* Memory Mapped start */ +#define SPI_XFER_MMAP_END BIT(3)/* Memory Mapped End */ +#define SPI_XFER_U_PAGE BIT(4) };/**
Signature · 1 line
1.9.1
PATCH 7/8 spi: Use BIT macro
Quoted 8 lines · Jagan Teki
Used BIT macro like 1 << nr as BIT(nr) where nr is 0...n
Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
PATCH 8/8 spi: Minor cleanup
In reply to Jagan Teki- Add comments on mode_rx
- Tab space's
--- include/spi.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
include/spi.h +8 -8
@@ -102,10 +102,10 @@ struct spi_slave {#define SPI_TX_BYTE BIT(8)/* transmit with 1 wire byte */ #define SPI_TX_QUAD BIT(9)/* transmit with 4 wires */ u8 mode_rx; -#define SPI_RX_SLOW BIT(0) -#define SPI_RX_FAST BIT(1) -#define SPI_RX_DUAL BIT(2) -#define SPI_RX_QUAD BIT(4) +#define SPI_RX_SLOW BIT(0)/* receive with 1 wire slow */ +#define SPI_RX_FAST BIT(1)/* receive with 1 wire fast */ +#define SPI_RX_DUAL BIT(2)/* receive with 2 wires */ +#define SPI_RX_QUAD BIT(4)/* receive with 4 wires */ unsigned int wordlen;unsigned int max_write_size;
@@ -113,11 +113,11 @@ struct spi_slave {u8 option;u8 flags; -#define SPI_XFER_BEGIN BIT(0)/* Assert CS before transfer */ -#define SPI_XFER_END BIT(1)/* Deassert CS after transfer */ +#define SPI_XFER_BEGIN BIT(0)/* Assert CS before transfer */ +#define SPI_XFER_END BIT(1)/* Deassert CS after transfer */ #define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END) -#define SPI_XFER_MMAP BIT(2)/* Memory Mapped start */ -#define SPI_XFER_MMAP_END BIT(3)/* Memory Mapped End */ +#define SPI_XFER_MMAP BIT(2)/* Memory Mapped start */ +#define SPI_XFER_MMAP_END BIT(3)/* Memory Mapped End */ #define SPI_XFER_U_PAGE BIT(4) };
Signature · 1 line
1.9.1
PATCH 8/8 spi: Minor cleanup
Quoted 9 lines · Jagan Teki
- Add comments on
mode_rx
- Tab space'sCc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Michal Simek <[email protected]>Cc Siva Durga Prasad Paladugu <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
cover spi: Cleanup set
In reply to Jagan TekiQuoted 12 lines · Jagan Teki
Cleanup set on spi_slave{}
Jagan Teki (8):
spi: RemoveSPI_OPM_RX_EXTN
spi: Remove SPI_OPM_RX_DIO|QIOF
spi: Rename SPI_OPM_RX_* to SPI_RX_*
spi: Renameop_mode_rxtomode_rx
spi: Move mode,mode_rx, flags macro's to structure
spi: Fix bit assignment with flags
spi: Use BIT macro
spi: Minor cleanup
Quoted 5 lines
drivers/mtd/spi/spi_flash.c | 2 +- drivers/spi/ich.c | 2 +- drivers/spi/ti_qspi.c | 2 +- include/spi.h | 65 +++++++++++++++++++-------------------------- 4 files changed, 31 insertions(+), 40 deletions(-)
thanks!
Signature · 1 line
Jagan.
cover spi: Cleanup set
Hi Bin,
Quoted 13 lines · Jagan Teki
Quoted 12 lines · Jagan Teki
Cleanup set on spi_slave{}
Jagan Teki (8):
spi: RemoveSPI_OPM_RX_EXTN
spi: Remove SPI_OPM_RX_DIO|QIOF
spi: Rename SPI_OPM_RX_* to SPI_RX_*
spi: Renameop_mode_rxtomode_rx
spi: Move mode,mode_rx, flags macro's to structure
spi: Fix bit assignment with flags
spi: Use BIT macro
spi: Minor cleanup
Quoted 7 lines
Quoted 5 lines
drivers/mtd/spi/spi_flash.c | 2 +- drivers/spi/ich.c | 2 +- drivers/spi/ti_qspi.c | 2 +- include/spi.h | 65 +++++++++++++++++++-------------------------- 4 files changed, 31 insertions(+), 40 deletions(-)Tested-by Jagan Teki <[email protected]>
Any chance to look at these?
thanks!
Signature · 1 line
Jagan.
cover spi: Cleanup set
Hi Jagan,
Quoted 22 lines · Jagan Teki
Hi Bin,
Quoted 19 lines · Jagan Teki
Quoted 17 lines · Jagan Teki
Cleanup set on spi_slave{}
Jagan Teki (8):
spi: RemoveSPI_OPM_RX_EXTN
spi: Remove SPI_OPM_RX_DIO|QIOF
spi: Rename SPI_OPM_RX_* to SPI_RX_*
spi: Renameop_mode_rxtomode_rx
spi: Move mode,mode_rx, flags macro's to structure
spi: Fix bit assignment with flags
spi: Use BIT macro
spi: Minor cleanupdrivers/mtd/spi/spi_flash.c | 2 +- drivers/spi/ich.c | 2 +- drivers/spi/ti_qspi.c | 2 +- include/spi.h | 65 +++++++++++++++++++-------------------------- 4 files changed, 31 insertions(+), 40 deletions(-)
Quoted 4 lines
Quoted 1 line
Tested-by Jagan Teki <[email protected]>Any chance to look at these?
Yes, I will find some time to look at this series and give a test.
Regards,
Bin
cover spi: Cleanup set
In reply to Jagan TekiQuoted 12 lines · Jagan Teki
Cleanup set on spi_slave{}
Jagan Teki (8):
spi: RemoveSPI_OPM_RX_EXTN
spi: Remove SPI_OPM_RX_DIO|QIOF
spi: Rename SPI_OPM_RX_* to SPI_RX_*
spi: Renameop_mode_rxtomode_rx
spi: Move mode,mode_rx, flags macro's to structure
spi: Fix bit assignment with flags
spi: Use BIT macro
spi: Minor cleanup
Quoted 6 lines
drivers/mtd/spi/spi_flash.c | 2 +- drivers/spi/ich.c | 2 +- drivers/spi/ti_qspi.c | 2 +- include/spi.h | 65 +++++++++++++++++++-------------------------- 4 files changed, 31 insertions(+), 40 deletions(-)
Tested the series on AM437x SK and DRA74 EVM.
Regards
Mugunthan V N