mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 14:41:26 +01:00
rockchip: spi: Honour the deactivation delay
This is not currently implemented. Add support for this so that the Chrome OS EC can be used on jerry. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6e019c4f28
commit
b42524744d
@ -110,6 +110,14 @@ static void spi_cs_activate(struct udevice *dev, uint cs)
|
|||||||
struct rockchip_spi_priv *priv = dev_get_priv(bus);
|
struct rockchip_spi_priv *priv = dev_get_priv(bus);
|
||||||
struct rockchip_spi *regs = priv->regs;
|
struct rockchip_spi *regs = priv->regs;
|
||||||
|
|
||||||
|
/* If it's too soon to do another transaction, wait */
|
||||||
|
if (plat->deactivate_delay_us && priv->last_transaction_us) {
|
||||||
|
ulong delay_us; /* The delay completed so far */
|
||||||
|
delay_us = timer_get_us() - priv->last_transaction_us;
|
||||||
|
if (delay_us < plat->deactivate_delay_us)
|
||||||
|
udelay(plat->deactivate_delay_us - delay_us);
|
||||||
|
}
|
||||||
|
|
||||||
debug("activate cs%u\n", cs);
|
debug("activate cs%u\n", cs);
|
||||||
writel(1 << cs, ®s->ser);
|
writel(1 << cs, ®s->ser);
|
||||||
if (plat->activate_delay_us)
|
if (plat->activate_delay_us)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user