diff mbox series

[v1,2/2] spi: stm32_qspi: Remove SR_BUSY bit check before sending command

Message ID 20220512071738.741406-3-patrice.chotard@foss.st.com
State Accepted
Commit b6a469360a0dec01dbbf087c5184a59dda494569
Delegated to: Patrick Delaunay
Headers show
Series spi: stm32_qspi: flags management fixes | expand

Commit Message

Patrice CHOTARD May 12, 2022, 7:17 a.m. UTC
Waiting for SR_BUSY bit when receiving a new command is not needed.
SR_BUSY bit is already managed in the previous command treatment.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>

---

 drivers/spi/stm32_qspi.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Patrick Delaunay May 17, 2022, 8:24 a.m. UTC | #1
Hi Patrice

On 5/12/22 09:17, Patrice Chotard wrote:
> Waiting for SR_BUSY bit when receiving a new command is not needed.
> SR_BUSY bit is already managed in the previous command treatment.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
>
> ---
>
>   drivers/spi/stm32_qspi.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
> index 3c8faecb54..ceba413727 100644
> --- a/drivers/spi/stm32_qspi.c
> +++ b/drivers/spi/stm32_qspi.c
> @@ -255,10 +255,6 @@ static int stm32_qspi_exec_op(struct spi_slave *slave,
>   		op->dummy.buswidth, op->data.buswidth,
>   		op->addr.val, op->data.nbytes);
>   
> -	ret = _stm32_qspi_wait_for_not_busy(priv);
> -	if (ret)
> -		return ret;
> -
>   	addr_max = op->addr.val + op->data.nbytes + 1;
>   
>   	if (op->data.dir == SPI_MEM_DATA_IN && op->data.nbytes) {


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
Patrick Delaunay May 20, 2022, 7:22 a.m. UTC | #2
Hi,

On 5/17/22 10:24, Patrick DELAUNAY wrote:
> Hi Patrice
>
> On 5/12/22 09:17, Patrice Chotard wrote:
>> Waiting for SR_BUSY bit when receiving a new command is not needed.
>> SR_BUSY bit is already managed in the previous command treatment.
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
>>
>> ---
>>
>>   drivers/spi/stm32_qspi.c | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
>> index 3c8faecb54..ceba413727 100644
>> --- a/drivers/spi/stm32_qspi.c
>> +++ b/drivers/spi/stm32_qspi.c
>> @@ -255,10 +255,6 @@ static int stm32_qspi_exec_op(struct spi_slave 
>> *slave,
>>           op->dummy.buswidth, op->data.buswidth,
>>           op->addr.val, op->data.nbytes);
>>   -    ret = _stm32_qspi_wait_for_not_busy(priv);
>> -    if (ret)
>> -        return ret;
>> -
>>       addr_max = op->addr.val + op->data.nbytes + 1;
>>         if (op->data.dir == SPI_MEM_DATA_IN && op->data.nbytes) {
>
>
> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>
> Thanks
> Patrick
>
>

Applied to u-boot-stm/master, thanks!

Regards
Patrick
diff mbox series

Patch

diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index 3c8faecb54..ceba413727 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -255,10 +255,6 @@  static int stm32_qspi_exec_op(struct spi_slave *slave,
 		op->dummy.buswidth, op->data.buswidth,
 		op->addr.val, op->data.nbytes);
 
-	ret = _stm32_qspi_wait_for_not_busy(priv);
-	if (ret)
-		return ret;
-
 	addr_max = op->addr.val + op->data.nbytes + 1;
 
 	if (op->data.dir == SPI_MEM_DATA_IN && op->data.nbytes) {