aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2021-05-17 17:03:51 +0300
committerMark Brown <[email protected]>2021-05-18 14:05:37 +0100
commit70252440b2b6337d03f2b95bc475fedbea79072f (patch)
tree7c51624d45acbe21107de1641efdc7685416e973
parentf96e6c0ef63b981d295547ef624f4da7c820e097 (diff)
spi: pxa2xx: Use predefined mask when programming FIFO thresholds
The predefined mask for threshold modification can be used in case of Intel Merrifield SPI. Replace open-coded value with predefined mask when programming FIFO thresholds. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--drivers/spi/spi-pxa2xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 94b1585de203..bdf9a283efc3 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1083,12 +1083,13 @@ static int pxa2xx_spi_transfer_one(struct spi_controller *controller,
}
if (is_mrfld_ssp(drv_data)) {
+ u32 mask = SFIFOTT_RFT | SFIFOTT_TFT;
u32 thresh = 0;
thresh |= SFIFOTT_RxThresh(chip->lpss_rx_threshold);
thresh |= SFIFOTT_TxThresh(chip->lpss_tx_threshold);
- pxa2xx_spi_update(drv_data, SFIFOTT, 0xffffffff, thresh);
+ pxa2xx_spi_update(drv_data, SFIFOTT, mask, thresh);
}
if (is_quark_x1000_ssp(drv_data))