lkml.org 
[lkml]   [2024]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 08/21] spi: s3c64xx: move error check up to avoid rechecking
From
Date
Hi Tudor,

On Tue, 2024-01-23 at 15:34 +0000, Tudor Ambarus wrote:
> @@ -538,13 +538,8 @@ static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd,
>   cpu_relax();
>   status = readl(regs + S3C64XX_SPI_STATUS);
>   }
> -
>   }
>  
> - /* If timed out while checking rx/tx status return error */
> - if (!val)
> - return -EIO;
> -

This change behaviour of this function. The loop just above adjusts val and it is used to
determine if there was a timeout or not:

if (val && !xfer->rx_buf) {
val = msecs_to_loops(10);
status = readl(regs + S3C64XX_SPI_STATUS);
while ((TX_FIFO_LVL(status, sdd)
|| !S3C64XX_SPI_ST_TX_DONE(status, sdd))
&& --val) {
cpu_relax();
status = readl(regs + S3C64XX_SPI_STATUS);
}


That doesn't work anymore now.

Cheers,
Andre'


\
 
 \ /
  Last update: 2024-05-27 14:32    [W:0.267 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site