diff options
author | Nandhini Srikandan <nandhini.srikandan@intel.com> | 2022-07-13 07:22:22 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-07-13 15:32:31 +0300 |
commit | 51e41dc2f2bc7e7c8d5b8202a23eae3ee6056131 (patch) | |
tree | 7b3f34c59d6e27e314577a31a8c13b2a098d9528 /drivers/spi/spi-dw-core.c | |
parent | 0d085723c637fd6929b8926a2963de1c2307cfa1 (diff) | |
download | linux-51e41dc2f2bc7e7c8d5b8202a23eae3ee6056131.tar.xz |
spi: dw: Add support for master mode selection for DWC SSI controller
Add support to select the controller mode as master mode by setting Bit 31
of CTRLR0 register. This feature is supported for controller versions above
v1.02.
Signed-off-by: Nandhini Srikandan <nandhini.srikandan@intel.com>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/20220713042223.1458-4-nandhini.srikandan@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw-core.c')
-rw-r--r-- | drivers/spi/spi-dw-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 911ea9bddbee..f87d97ccd2d6 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -307,8 +307,9 @@ static u32 dw_spi_prepare_cr0(struct dw_spi *dws, struct spi_device *spi) if (spi->mode & SPI_LOOP) cr0 |= DW_HSSI_CTRLR0_SRL; - if (dws->caps & DW_SPI_CAP_KEEMBAY_MST) - cr0 |= DW_HSSI_CTRLR0_KEEMBAY_MST; + /* CTRLR0[31] MST */ + if (dw_spi_ver_is_ge(dws, HSSI, 102A)) + cr0 |= DW_HSSI_CTRLR0_MST; } return cr0; |