lkml.org 
[lkml]   [2021]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/8] spi: rockchip: Wait for STB status in slave mode tx_xfer
From
Hi Jon Lin,

On Tue, Apr 27, 2021 at 03:37:27PM +0800, Jon Lin wrote:
> +static inline void wait_for_tx_idle(struct rockchip_spi *rs, bool slave_mode)
> {
> unsigned long timeout = jiffies + msecs_to_jiffies(5);
>
> do {
> - if (!(readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY))
> - return;
> + if (slave_mode) {
> + if (!(readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_SLAVE_TX_BUSY) &&
> + !((readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY))
> + return;

This doesn't compile. There is one opening brace too much before the
readl_relaxed.

Regards,
Sascha

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

\
 
 \ /
  Last update: 2021-05-05 10:00    [W:0.153 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site