diff options
author | Alexander Stein <alexander.stein@ew.tq-group.com> | 2023-03-10 10:49:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 13:35:08 +0300 |
commit | 74f4471ad64214dd5046213ebdd6e0930da7bd2c (patch) | |
tree | d76c6ac3ac889763f4e310e10ddabe251e4664da /drivers/clk | |
parent | 132918e08e866622c570a93f1d8e8320ada1c238 (diff) | |
download | linux-74f4471ad64214dd5046213ebdd6e0930da7bd2c.tar.xz |
clk: rs9: Fix suspend/resume
[ Upstream commit 632e04739c8f45c2d9ca4d4c5bd18d80c2ac9296 ]
Disabling the cache in commit 2ff4ba9e3702 ("clk: rs9: Fix I2C accessors")
without removing cache synchronization in resume path results in a
kernel panic as map->cache_ops is unset, due to REGCACHE_NONE.
Enable flat cache again to support resume again. num_reg_defaults_raw
is necessary to read the cache defaults from hardware. Some registers
are strapped in hardware and cannot be provided in software.
Fixes: 2ff4ba9e3702 ("clk: rs9: Fix I2C accessors")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20230310074940.3475703-1-alexander.stein@ew.tq-group.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-renesas-pcie.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index e6247141d0c0..3e98a16eba6b 100644 --- a/drivers/clk/clk-renesas-pcie.c +++ b/drivers/clk/clk-renesas-pcie.c @@ -144,8 +144,9 @@ static int rs9_regmap_i2c_read(void *context, static const struct regmap_config rs9_regmap_config = { .reg_bits = 8, .val_bits = 8, - .cache_type = REGCACHE_NONE, + .cache_type = REGCACHE_FLAT, .max_register = RS9_REG_BCP, + .num_reg_defaults_raw = 0x8, .rd_table = &rs9_readable_table, .wr_table = &rs9_writeable_table, .reg_write = rs9_regmap_i2c_write, |