summaryrefslogtreecommitdiff
path: root/chip/mec1322/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/mec1322/spi.c')
-rw-r--r--chip/mec1322/spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/mec1322/spi.c b/chip/mec1322/spi.c
index 705a95c44e..f7211f7289 100644
--- a/chip/mec1322/spi.c
+++ b/chip/mec1322/spi.c
@@ -83,14 +83,14 @@ int spi_transaction_async(const struct spi_device_t *spi_device,
gpio_set_level(spi_device->gpio_cs, 0);
/* Disable auto read */
- MEC1322_SPI_CR(port) &= ~(1 << 5);
+ MEC1322_SPI_CR(port) &= ~BIT(5);
ret = spi_tx(port, txdata, txlen);
if (ret != EC_SUCCESS)
return ret;
/* Enable auto read */
- MEC1322_SPI_CR(port) |= 1 << 5;
+ MEC1322_SPI_CR(port) |= BIT(5);
if (rxlen != 0) {
dma_start_rx(&spi_rx_option[port], rxlen, rxdata);
@@ -108,7 +108,7 @@ int spi_transaction_flush(const struct spi_device_t *spi_device)
timestamp_t deadline;
/* Disable auto read */
- MEC1322_SPI_CR(port) &= ~(1 << 5);
+ MEC1322_SPI_CR(port) &= ~BIT(5);
deadline.val = get_time().val + SPI_BYTE_TRANSFER_TIMEOUT_US;
/* Wait for FIFO empty SPISR_TXBE */