Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

reset: amlogic: use reset number instead of register count

The reset driver from audio clock controller may register less
reset than a register can hold. To avoid making any change while
switching to auxiliary support, use the number of reset instead of the
register count to define the bounds of the reset controller.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20240910-meson-rst-aux-v5-5-60be62635d3e@baylibre.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Jerome Brunet and committed by
Philipp Zabel
83dde3e5 6b2d2e5c

+6 -7
+6 -7
drivers/reset/reset-meson.c
··· 17 17 #include <linux/types.h> 18 18 19 19 struct meson_reset_param { 20 - unsigned int reg_count; 20 + unsigned int reset_num; 21 21 unsigned int reset_offset; 22 22 unsigned int level_offset; 23 23 bool level_low_reset; ··· 87 87 }; 88 88 89 89 static const struct meson_reset_param meson8b_param = { 90 - .reg_count = 8, 90 + .reset_num = 256, 91 91 .reset_offset = 0x0, 92 92 .level_offset = 0x7c, 93 93 .level_low_reset = true, 94 94 }; 95 95 96 96 static const struct meson_reset_param meson_a1_param = { 97 - .reg_count = 3, 97 + .reset_num = 96, 98 98 .reset_offset = 0x0, 99 99 .level_offset = 0x40, 100 100 .level_low_reset = true, 101 101 }; 102 102 103 103 static const struct meson_reset_param meson_s4_param = { 104 - .reg_count = 6, 104 + .reset_num = 192, 105 105 .reset_offset = 0x0, 106 106 .level_offset = 0x40, 107 107 .level_low_reset = true, 108 108 }; 109 109 110 110 static const struct meson_reset_param t7_param = { 111 - .reg_count = 7, 111 + .reset_num = 224, 112 112 .reset_offset = 0x0, 113 113 .level_offset = 0x40, 114 114 .level_low_reset = true, ··· 156 156 "can't init regmap mmio region\n"); 157 157 158 158 data->rcdev.owner = THIS_MODULE; 159 - data->rcdev.nr_resets = data->param->reg_count * BITS_PER_BYTE 160 - * regmap_config.reg_stride; 159 + data->rcdev.nr_resets = data->param->reset_num; 161 160 data->rcdev.ops = &meson_reset_ops; 162 161 data->rcdev.of_node = dev->of_node; 163 162