mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-05 22:31:36 +00:00
rockchip: spi: Correct chip-enable code
At present there is an incorrect call to rkspi_enable_chip(). It should be disabling the chip, not enabling it. Correct this and ensure that the chip is disabled when releasing the bus. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
183a3a0f67
commit
e15af8e2cd
1 changed files with 6 additions and 1 deletions
|
@ -286,6 +286,11 @@ static int rockchip_spi_claim_bus(struct udevice *dev)
|
|||
|
||||
static int rockchip_spi_release_bus(struct udevice *dev)
|
||||
{
|
||||
struct udevice *bus = dev->parent;
|
||||
struct rockchip_spi_priv *priv = dev_get_priv(bus);
|
||||
|
||||
rkspi_enable_chip(priv->regs, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -314,7 +319,7 @@ static int rockchip_spi_xfer(struct udevice *dev, unsigned int bitlen,
|
|||
while (len > 0) {
|
||||
int todo = min(len, 0xffff);
|
||||
|
||||
rkspi_enable_chip(regs, true);
|
||||
rkspi_enable_chip(regs, false);
|
||||
writel(todo - 1, ®s->ctrlr1);
|
||||
rkspi_enable_chip(regs, true);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue