diff mbox

[U-Boot] ti: qspi: set flash quad bit based on quad support flag

Message ID 1439488586-15760-1-git-send-email-vishalm@ti.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

vishalm@ti.com Aug. 13, 2015, 5:56 p.m. UTC
From: Vishal Mahaveer <vishalm@ti.com>

Update op_mode_rx flag based on CONFIG_QSPI_QUAD_SUPPORT flag,
instead of platform.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
CC: Tom Rini <trini@ti.com>
---
 drivers/spi/ti_qspi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Jagan Teki Aug. 13, 2015, 6:11 p.m. UTC | #1
On 13 August 2015 at 23:26,  <vishalm@ti.com> wrote:
> From: Vishal Mahaveer <vishalm@ti.com>
>
> Update op_mode_rx flag based on CONFIG_QSPI_QUAD_SUPPORT flag,
> instead of platform.
>
> Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
> CC: Tom Rini <trini@ti.com>

Reviewed-by: Jagan Teki <jteki@openedev.com>

> ---
>  drivers/spi/ti_qspi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
> index 3356c0f..af40ec8 100644
> --- a/drivers/spi/ti_qspi.c
> +++ b/drivers/spi/ti_qspi.c
> @@ -106,7 +106,6 @@ static void ti_spi_setup_spi_register(struct ti_qspi_slave *qslave)
>         slave->memory_map = (void *)MMAP_START_ADDR_DRA;
>  #else
>         slave->memory_map = (void *)MMAP_START_ADDR_AM43x;
> -       slave->op_mode_rx = 8;
>  #endif
>
>  #ifdef CONFIG_QSPI_QUAD_SUPPORT
> @@ -114,6 +113,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;
>  #else
>         memval |= QSPI_CMD_READ | QSPI_SETUP0_NUM_A_BYTES |
>                         QSPI_SETUP0_NUM_D_BYTES_NO_BITS |
> --
> 1.7.4.1

thanks!
diff mbox

Patch

diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index 3356c0f..af40ec8 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -106,7 +106,6 @@  static void ti_spi_setup_spi_register(struct ti_qspi_slave *qslave)
 	slave->memory_map = (void *)MMAP_START_ADDR_DRA;
 #else
 	slave->memory_map = (void *)MMAP_START_ADDR_AM43x;
-	slave->op_mode_rx = 8;
 #endif
 
 #ifdef CONFIG_QSPI_QUAD_SUPPORT
@@ -114,6 +113,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;
 #else
 	memval |= QSPI_CMD_READ | QSPI_SETUP0_NUM_A_BYTES |
 			QSPI_SETUP0_NUM_D_BYTES_NO_BITS |