From a2df8f3a9c9c54c62d6ff37d3baff1d30ee6d355 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 22 Oct 2013 05:58:24 -0700 Subject: [PATCH] Tegra124: SPI: Set and unset CS in spi_claim_bus and spi_release_bus. These functions are intended to start and end a transaction on the bus and so need to manage the CS line. BUG=None TEST=Used a Logic16 to watch the SPI bus as coreboot attempted to use it to talk to the EC. With this change, CS was set (low) during the transaction when before it wasn't. BRANCH=None Change-Id: I37992dc2e51dec878d565ebea1da586bdcac6400 Signed-off-by: Gabe Black Reviewed-on: https://chromium-review.googlesource.com/173953 Reviewed-by: Gabe Black Commit-Queue: Gabe Black Tested-by: Gabe Black --- src/soc/nvidia/tegra124/spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/soc/nvidia/tegra124/spi.c b/src/soc/nvidia/tegra124/spi.c index 15e9695955..05a852b3cd 100644 --- a/src/soc/nvidia/tegra124/spi.c +++ b/src/soc/nvidia/tegra124/spi.c @@ -806,9 +806,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, int spi_claim_bus(struct spi_slave *slave) { tegra_spi_init(slave->bus); + spi_cs_activate(slave); return 0; } void spi_release_bus(struct spi_slave *slave) { + spi_cs_deactivate(slave); }