@@ -141,6 +141,7 @@ 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),
+ regmap_reg_range(SPI_SREX, SPI_SREX)
};
static const struct regmap_access_table dspi_volatile_table = {
@@ -148,18 +149,6 @@ static const struct regmap_access_table dspi_volatile_table = {
.n_yes_ranges = ARRAY_SIZE(dspi_volatile_ranges),
};
-static const struct regmap_range dspi_xspi_volatile_ranges[] = {
- regmap_reg_range(SPI_MCR, SPI_TCR),
- regmap_reg_range(SPI_SR, SPI_SR),
- regmap_reg_range(SPI_PUSHR, SPI_RXFR3),
- regmap_reg_range(SPI_SREX, SPI_SREX),
-};
-
-static const struct regmap_access_table dspi_xspi_volatile_table = {
- .yes_ranges = dspi_xspi_volatile_ranges,
- .n_yes_ranges = ARRAY_SIZE(dspi_xspi_volatile_ranges),
-};
-
enum {
DSPI_REGMAP,
DSPI_XSPI_REGMAP,
@@ -179,7 +168,7 @@ static const struct regmap_config dspi_regmap_config[] = {
.val_bits = 32,
.reg_stride = 4,
.max_register = 0x13c,
- .volatile_table = &dspi_xspi_volatile_table
+ .volatile_table = &dspi_volatile_table
},
[DSPI_PUSHR] = {
.name = "pushr",
max_register overrides anything in the volatile ranges, so we can get away with sharing the same one for both types. In a later commit we'll add more devices and also read/write ranges which also override volatile ranges so this avoids adding even more duplication. No functional changes. Signed-off-by: James Clark <james.clark@linaro.org> --- drivers/spi/spi-fsl-dspi.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)