mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
spi: synquacer: wait until slave is deselected
synquacer_cs_set() function does not wait the chip select is deasserted when the driver sets the DMSTOP to deselect the slave. This commit checks the Slave Select Released(SRS) bit to wait until the slave is deselected. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com> Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
29d382b94e
commit
88d50ed8a1
1 changed files with 7 additions and 0 deletions
|
@ -46,7 +46,9 @@
|
|||
#define RXE 0x24
|
||||
#define RXC 0x28
|
||||
#define TFLETE 4
|
||||
#define TSSRS 6
|
||||
#define RFMTE 5
|
||||
#define RSSRS 6
|
||||
|
||||
#define FAULTF 0x2c
|
||||
#define FAULTC 0x30
|
||||
|
@ -170,6 +172,11 @@ static void synquacer_cs_set(struct synquacer_spi_priv *priv, bool active)
|
|||
priv->rx_words = 16;
|
||||
read_fifo(priv);
|
||||
}
|
||||
|
||||
/* wait until slave is deselected */
|
||||
while (!(readl(priv->base + TXF) & BIT(TSSRS)) ||
|
||||
!(readl(priv->base + RXF) & BIT(RSSRS)))
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue