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/freescale | |
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/freescale')
-rw-r--r-- | sys/arm/freescale/vybrid/vf_spi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm/freescale/vybrid/vf_spi.c b/sys/arm/freescale/vybrid/vf_spi.c index 8fa466b..a327dea 100644 --- a/sys/arm/freescale/vybrid/vf_spi.c +++ b/sys/arm/freescale/vybrid/vf_spi.c @@ -263,6 +263,8 @@ 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; + /* Command */ spi_txrx(sc, cmd->tx_cmd, cmd->rx_cmd, cmd->tx_cmd_sz, cs); |