aboutsummaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2014-03-27 21:52:43 -0700
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-07-05 11:36:20 +0200
commit93d9f92cfbb214718e211aee71ac869c77f725ee (patch)
tree5ce61557bc84bd374744ba4ca07a8a48825ae58a /src/ec
parent1e187356e831583830a22cf051c792470d0440f5 (diff)
spi: Change spi_xfer to work in units of bytes instead of bits.
Whenever spi_xfer is called and whenver it's implemented, the natural unit for the amount of data being transfered is bytes. The API expected things to be expressed in bits, however, which led to a lot of multiplying and dividing by eight, and checkes to make sure things were multiples of eight. All of that can now be removed. BUG=None TEST=Built and booted on link, falco, peach_pit and nyan and looked for SPI errors in the firmware log. Built for rambi. BRANCH=None Change-Id: I02365bdb6960a35def7be7a0cd1aa0a2cc09392f Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://chromium-review.googlesource.com/192049 Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> [km: cherry-pick from chromium] Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6175 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/ec_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ec/google/chromeec/ec_spi.c b/src/ec/google/chromeec/ec_spi.c
index 012a4cace5..d6b7b0c4ea 100644
--- a/src/ec/google/chromeec/ec_spi.c
+++ b/src/ec/google/chromeec/ec_spi.c
@@ -31,8 +31,8 @@ static int crosec_spi_io(uint8_t *write_bytes, size_t write_size,
int rv;
spi_claim_bus(slave);
- rv = spi_xfer(slave, write_bytes, write_size * 8, read_bytes,
- read_size * 8);
+ rv = spi_xfer(slave, write_bytes, write_size, read_bytes,
+ read_size);
spi_release_bus(slave);
if (rv != 0) {