Re: [PATCH v2 2/8] spi: rockchip: Wait for STB status in slave mode tx_xfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux