summaryrefslogtreecommitdiff
path: root/src/soc/samsung
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2014-03-27 21:26:46 -0700
committerMarc Jones <marc.jones@se-eng.com>2014-12-09 20:32:18 +0100
commitec9293fb5af2c0f798a8ee6e5fead819487f1587 (patch)
treeda81aa1adae4efa68f62a2a7796c5473f671c7d0 /src/soc/samsung
parent87f3b4ea01ca90eb242dbf1a8b829d1fb3aaaa7d (diff)
spi: Eliminate the spi_cs_activate and spi_cs_deactivate functions.
They were only used internal to the SPI drivers and, according to the comment next to their prototypes, were for when the SPI controller doesn't control the chip select line directly and needs some help. BUG=None TEST=Built for link, falco, and rambi. Built and booted on peach_pit and nyan. BRANCH=None Original-Change-Id: If4622819a4437490797d305786e2436e2e70c42b Original-Signed-off-by: Gabe Black <gabeblack@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/192048 Original-Reviewed-by: Gabe Black <gabeblack@chromium.org> Original-Tested-by: Gabe Black <gabeblack@chromium.org> Original-Commit-Queue: Gabe Black <gabeblack@chromium.org> (cherry picked from commit 1e2deecd9d8c6fd690c54f24e902cc7d2bab0521) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: Ida08cbc2be5ad09b929ca16e483c36c49ac12627 Reviewed-on: http://review.coreboot.org/7708 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/samsung')
-rw-r--r--src/soc/samsung/exynos5420/spi.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/soc/samsung/exynos5420/spi.c b/src/soc/samsung/exynos5420/spi.c
index 31611e3ed6..36742a7279 100644
--- a/src/soc/samsung/exynos5420/spi.c
+++ b/src/soc/samsung/exynos5420/spi.c
@@ -133,22 +133,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs)
return &eslave->slave;
}
-void spi_cs_activate(struct spi_slave *slave)
+int spi_claim_bus(struct spi_slave *slave)
{
struct exynos_spi *regs = to_exynos_spi(slave)->regs;
// TODO(hungte) Add some delay if too many transactions happen at once.
clrbits_le32(&regs->cs_reg, SPI_SLAVE_SIG_INACT);
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
- struct exynos_spi *regs = to_exynos_spi(slave)->regs;
- setbits_le32(&regs->cs_reg, SPI_SLAVE_SIG_INACT);
-}
-
-int spi_claim_bus(struct spi_slave *slave)
-{
- spi_cs_activate(slave);
return 0;
}
@@ -231,7 +220,8 @@ int spi_xfer(struct spi_slave *slave, const void *dout, unsigned int bytes_out,
void spi_release_bus(struct spi_slave *slave)
{
- spi_cs_deactivate(slave);
+ struct exynos_spi *regs = to_exynos_spi(slave)->regs;
+ setbits_le32(&regs->cs_reg, SPI_SLAVE_SIG_INACT);
}
static int exynos_spi_read(struct spi_slave *slave, void *dest, uint32_t len,