Skip to content

Commit 632e047

Browse files
tq-steinabebarino
authored andcommitted
clk: rs9: Fix suspend/resume
Disabling the cache in commit 2ff4ba9 ("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: 2ff4ba9 ("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>
1 parent f420f47 commit 632e047

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/clk/clk-renesas-pcie.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ static int rs9_regmap_i2c_read(void *context,
143143
static const struct regmap_config rs9_regmap_config = {
144144
.reg_bits = 8,
145145
.val_bits = 8,
146-
.cache_type = REGCACHE_NONE,
146+
.cache_type = REGCACHE_FLAT,
147147
.max_register = RS9_REG_BCP,
148+
.num_reg_defaults_raw = 0x8,
148149
.rd_table = &rs9_readable_table,
149150
.wr_table = &rs9_writeable_table,
150151
.reg_write = rs9_regmap_i2c_write,

0 commit comments

Comments
 (0)