diff options
author | manu <manu@FreeBSD.org> | 2016-12-18 14:54:20 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-10-17 20:17:35 -0500 |
commit | f5562aa9f85e400ab2f90aa64d735ad01d7bc9ae (patch) | |
tree | 4bb3e73d23968dfed5b17187f41e9923c620a238 /sys/arm/at91 | |
parent | 1d1327eef601aba35e784b04d6e1fc93c0b507ac (diff) | |
download | FreeBSD-src-f5562aa9f85e400ab2f90aa64d735ad01d7bc9ae.zip FreeBSD-src-f5562aa9f85e400ab2f90aa64d735ad01d7bc9ae.tar.gz |
ofw_spi: Parse property for the SPI mode and CS polarity.
As cs is stored in a uint32_t, use the last bit to store the
active high flag as it's unlikely that we will have that much CS.
Reviewed by: loos
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8614
(cherry picked from commit f5f9058ccaec11fccc18817f45fff8859798a317)
Diffstat (limited to 'sys/arm/at91')
-rw-r--r-- | sys/arm/at91/at91_spi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm/at91/at91_spi.c b/sys/arm/at91/at91_spi.c index f96114a..e9b4b13 100644 --- a/sys/arm/at91/at91_spi.c +++ b/sys/arm/at91/at91_spi.c @@ -302,6 +302,8 @@ at91_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) /* get the proper chip select */ spibus_get_cs(child, &cs); + cs &= ~SPIBUS_CS_HIGH; + sc = device_get_softc(dev); i = 0; |