spi: cadence_qspi: Add quad write support
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
Use quad write if SPI_TX_QUAD flag is set.
Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)
---
v1 -> v2:
- Update commit message
- Restore file permission
--- drivers/spi/cadence_qspi.c | 2 +- drivers/spi/cadence_qspi.h | 2 +- drivers/spi/cadence_qspi_apb.c | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-)
drivers/spi/cadence_qspi.c +1 -1
@@ -256,7 +256,7 @@ static int cadence_spi_xfer(struct udevice *dev, unsigned int bitlen,break ;case CQSPI_INDIRECT_WRITE : err =cadence_qspi_apb_indirect_write_setup - (plat, priv->cmd_len, cmd_buf); + (plat, priv->cmd_len, dm_plat->mode, cmd_buf);if (!err) { err =cadence_qspi_apb_indirect_write_execute (plat, data_bytes, dout);
drivers/spi/cadence_qspi.h +1 -1
@@ -60,7 +60,7 @@ int cadence_qspi_apb_indirect_read_setup(struct cadence_spi_platdata *plat,int cadence_qspi_apb_indirect_read_execute (struct cadence_spi_platdata *plat,unsigned int rxlen,u8 *rxbuf);int cadence_qspi_apb_indirect_write_setup (struct cadence_spi_platdata *plat, -unsigned int cmdlen,const u8 *cmdbuf); +unsigned int cmdlen,unsigned int tx_width,const u8 *cmdbuf);int cadence_qspi_apb_indirect_write_execute (struct cadence_spi_platdata *plat,unsigned int txlen,const u8 *txbuf);
drivers/spi/cadence_qspi_apb.c +6 -1
@@ -77,6 +77,7 @@#define CQSPI_REG_WR_INSTR 0x08#define CQSPI_REG_WR_INSTR_OPCODE_LSB 0 +#define CQSPI_REG_WR_INSTR_TYPE_DATA_LSB 16#define CQSPI_REG_DELAY 0x0C#define CQSPI_REG_DELAY_TSLCH_LSB 0
@@ -686,7 +687,7 @@ failrd:/* Opcode + Address (3/4 bytes) */ int cadence_qspi_apb_indirect_write_setup (struct cadence_spi_platdata *plat, -unsigned int cmdlen,const u8 *cmdbuf) +unsigned int cmdlen,unsigned int tx_width,const u8 *cmdbuf) {unsigned int reg;unsigned int addr_bytes = cmdlen >4 ?4 :3 ;
@@ -702,6 +703,10 @@ int cadence_qspi_apb_indirect_write_setup(struct cadence_spi_platdata *plat,/* Configure the opcode */ reg = cmdbuf[0 ] <<CQSPI_REG_WR_INSTR_OPCODE_LSB ; + +if (tx_width &SPI_TX_QUAD ) + reg |=CQSPI_INST_TYPE_QUAD <<CQSPI_REG_WR_INSTR_TYPE_DATA_LSB ; +writel (reg, plat->regbase +CQSPI_REG_WR_INSTR );/* Setup write address. */
Signature · 1 line
2.19.0
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
Quoted 6 lines · Ley Foon Tan
Use quad write if
SPI_TX_QUADflag is set.Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)
Quoted 7 lines
Signed-off-by Ley Foon Tan <[email protected]>---
v1 -> v2:
- Update commit message
- Restore file permission
---
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
Quoted 10 lines · Jagan Teki
Quoted 8 lines · Ley Foon Tan
Use quad write if
SPI_TX_QUADflag is set.Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)Signed-off-by Ley Foon Tan <[email protected]>
Quoted 7 lines
Quoted 5 lines
---
v1 -> v2:
- Update commit message
- Restore file permission
---Reviewed-by Jagan Teki <[email protected]>
Hi Jagan
Will you merge this patch to next Uboot version?
Regards
Ley Foon
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
Quoted 17 lines · Ley Foon Tan
Quoted 16 lines · Jagan Teki
Quoted 13 lines · Ley Foon Tan
Use quad write if
SPI_TX_QUADflag is set.Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)Signed-off-by Ley Foon Tan <[email protected]>---
v1 -> v2:
- Update commit message
- Restore file permission
---
Quoted 4 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Hi Jagan
Will you merge this patch to next Uboot version?
At this point, that's for 2019.07 indeed.
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
Quoted 19 lines · Marek Vasut
Quoted 17 lines · Ley Foon Tan
Quoted 16 lines · Jagan Teki
Quoted 13 lines · Ley Foon Tan
Use quad write if
SPI_TX_QUADflag is set.Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)Signed-off-by Ley Foon Tan <[email protected]>---
v1 -> v2:
- Update commit message
- Restore file permission
---
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Hi Jagan
Will you merge this patch to next Uboot version?
At this point, that's for 2019.07 indeed.
Okay.
Thanks.
Regards
Ley Foon
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
In reply to Ley Foon TanQuoted 9 lines · Ley Foon Tan
Use quad write if
SPI_TX_QUADflag is set.Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)Signed-off-by Ley Foon Tan <[email protected]>---
Applied to u-boot-spi/master
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
Quoted 4 lines · Jagan Teki
Quoted 3 lines · Ley Foon Tan
Use quad write if
SPI_TX_QUADflag is set.
Quoted 8 lines
Quoted 6 lines
Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)Signed-off-by Ley Foon Tan <[email protected]>---
Applied to u-boot-spi/master
That means it goes into THIS release ? If so, NAK.
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 1/1 spi: cadence_qspi: Add quad write support
Quoted 9 lines · Marek Vasut
Quoted 7 lines · Jagan Teki
Quoted 6 lines · Ley Foon Tan
Use quad write if
SPI_TX_QUADflag is set.Tested quad write on Stratix 10 SoC board (Micron
serial NOR flash, mt25qu02g)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Ley Foon Tan <[email protected]>---
Applied to u-boot-spi/master
That means it goes into THIS release ? If so, NAK.
for next release.