diff options
author | Tom Rini <trini@konsulko.com> | 2016-09-22 11:36:45 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-09-22 11:36:45 -0400 |
commit | 19d051a2b78b626ea3f8103a9a08e73508ba9fa6 (patch) | |
tree | bef8b4aa02b9a2375a611778aa8460ac2235750b /drivers/spi/spi-uclass.c | |
parent | 58c8c0963b1c720802c46ac4288c897e5f9cd296 (diff) | |
parent | fe4753cbc6c51f712024121aad0d21293d6a85fc (diff) | |
download | u-boot-19d051a2b78b626ea3f8103a9a08e73508ba9fa6.tar.gz |
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'drivers/spi/spi-uclass.c')
-rw-r--r-- | drivers/spi/spi-uclass.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index 247abfa72b..d9c49e4e8c 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -164,7 +164,6 @@ static int spi_child_pre_probe(struct udevice *dev) slave->max_hz = plat->max_hz; slave->mode = plat->mode; - slave->mode_rx = plat->mode_rx; slave->wordlen = SPI_DEFAULT_WORDLEN; return 0; @@ -381,7 +380,7 @@ void spi_free_slave(struct spi_slave *slave) int spi_slave_ofdata_to_platdata(const void *blob, int node, struct dm_spi_slave_platdata *plat) { - int mode = 0, mode_rx = 0; + int mode = 0; int value; plat->cs = fdtdec_get_int(blob, node, "reg", -1); @@ -413,24 +412,22 @@ int spi_slave_ofdata_to_platdata(const void *blob, int node, break; } - plat->mode = mode; - value = fdtdec_get_uint(blob, node, "spi-rx-bus-width", 1); switch (value) { case 1: break; case 2: - mode_rx |= SPI_RX_DUAL; + mode |= SPI_RX_DUAL; break; case 4: - mode_rx |= SPI_RX_QUAD; + mode |= SPI_RX_QUAD; break; default: error("spi-rx-bus-width %d not supported\n", value); break; } - plat->mode_rx = mode_rx; + plat->mode = mode; return 0; } |