summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorEsben Haabendal <eha@deif.com>2018-06-20 09:34:36 +0200
committerMark Brown <broonie@kernel.org>2018-06-20 14:46:55 +0100
commit8570043e2cc659f375336fb8141917ca1b050234 (patch)
treea42da081c9d3c33aa133ca422ebb608c22051faf /drivers/spi
parentfb9acf5f1f21f1de193523ff780bda375b4c2e21 (diff)
spi: spi-fsl-dspi: Fixup regmap configuration
Mark volatile registers to avoid caching bugs. Note: SPI_MCR is marked volatile because of CLR_TXF and CLR_RXF bits. Signed-off-by: Esben Haabendal <eha@deif.com> Acked-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-fsl-dspi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 0630962ce442..1c1070114246 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -943,11 +943,23 @@ static int dspi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
+static const struct regmap_range dspi_volatile_ranges[] = {
+ regmap_reg_range(SPI_MCR, SPI_TCR),
+ regmap_reg_range(SPI_SR, SPI_SR),
+ regmap_reg_range(SPI_PUSHR, SPI_RXFR3),
+};
+
+static const struct regmap_access_table dspi_volatile_table = {
+ .yes_ranges = dspi_volatile_ranges,
+ .n_yes_ranges = ARRAY_SIZE(dspi_volatile_ranges),
+};
+
static const struct regmap_config dspi_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
.max_register = 0x88,
+ .volatile_table = &dspi_volatile_table,
};
static void dspi_init(struct fsl_dspi *dspi)