clk: meson: treewide: define maximum register in regmap config
cover clk: meson: treewide: define maximum register in regmap config
The 'max_register' field in the regmap_config is an optional value that specifies the maximum valid register address. If this value is not determined, the regmap debugfs API will not show the full regmap dump, but only show the first register value.
Compare 'registers' debugfs file data on the A113L SoC-based board before the patch:
``` ~ # cat /sys/kernel/debug/regmap/fe007c80.pll-clock-controller/registers 00: 14f10440 ```
and after the patch:
``` ~ # cat /sys/kernel/debug/regmap/fe007c80.pll-clock-controller/registers 00: 14f10440 04: 01800000 08: 00001100 0c: 100a2300 10: 00300000 14: c000002b 18: 00000000 1c: 00000000 20: 00000000 24: 00000000 28: 00000000 2c: 00000000 30: 00000000 34: 00000000 38: 00000000 3c: 00000000 40: 00000000 44: 00000000 48: 00000000 4c: 00000000 50: 00000000 54: 00000000 58: 00000000 5c: 00000000 60: 00000000 64: 00000000 68: 00000000 6c: 00000000 70: 00000000 74: 00000000 78: 00000000 7c: 00000000 80: 15f18432 84: 01800000 88: 00001100 8c: 10022300 90: 00300000 94: c000001d 98: 00000000 9c: 00000000 a0: 00000000 a4: 00000000 a8: 00000000 ac: 00000000 b0: 00000000 b4: 00000000 b8: 00000000 bc: 00000000 c0: 01f19480 c4: 01800000 c8: 00001100 cc: 100a1100 d0: 00302000 d4: 00000020 ```
Dmitry Rokosov (4):
clk: meson: a1: peripherals: determine maximum register in regmap
config
clk: meson: a1: pll: determine maximum register in regmap config
clk: meson: s4: peripherals: determine maximum register in regmap
config
clk: meson: s4: pll: determine maximum register in regmap config
drivers/clk/meson/a1-peripherals.c | 1 + drivers/clk/meson/a1-pll.c | 1 + drivers/clk/meson/s4-peripherals.c | 1 + drivers/clk/meson/s4-pll.c | 1 + 4 files changed, 4 insertions(+)
Signature · 1 line
2.43.0
PATCH 1/4 clk: meson: a1: peripherals: determine maximum register in regmap config
When the max_register value is not set, the regmap debugfs 'registers' file does not display the entire range of the regmap.
--- drivers/clk/meson/a1-peripherals.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/meson/a1-peripherals.c +1 -0
@@ -2187,6 +2187,7 @@ static struct regmap_config a1_periphs_regmap_cfg = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, + .max_register = DMC_CLK_CTRL, };static struct meson_clk_hw_data a1_periphs_clks = {
Signature · 1 line
2.43.0
PATCH 2/4 clk: meson: a1: pll: determine maximum register in regmap config
In reply to Dmitry RokosovWhen the max_register value is not set, the regmap debugfs 'registers' file does not display the entire range of the regmap.
--- drivers/clk/meson/a1-pll.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/meson/a1-pll.c +1 -0
@@ -299,6 +299,7 @@ static struct regmap_config a1_pll_regmap_cfg = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, + .max_register = ANACTRL_HIFIPLL_STS, };static struct meson_clk_hw_data a1_pll_clks = {
Signature · 1 line
2.43.0
PATCH 3/4 clk: meson: s4: peripherals: determine maximum register in regmap config
In reply to Dmitry RokosovWhen the max_register value is not set, the regmap debugfs 'registers' file does not display the entire range of the regmap.
--- drivers/clk/meson/s4-peripherals.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/meson/s4-peripherals.c +1 -0
@@ -3751,6 +3751,7 @@ static struct regmap_config clkc_regmap_config = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, + .max_register = CLKCTRL_DEMOD_CLK_CTRL, };static struct meson_clk_hw_data s4_periphs_clks = {
Signature · 1 line
2.43.0
PATCH 4/4 clk: meson: s4: pll: determine maximum register in regmap config
In reply to Dmitry RokosovWhen the max_register value is not set, the regmap debugfs 'registers' file does not display the entire range of the regmap.
--- drivers/clk/meson/s4-pll.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/meson/s4-pll.c +1 -0
@@ -798,6 +798,7 @@ static struct regmap_config clkc_regmap_config = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, + .max_register = ANACTRL_HDMIPLL_CTRL0, };static struct meson_clk_hw_data s4_pll_clks = {
Signature · 1 line
2.43.0
Applied to clk-meson (v6.10/drivers), thanks!
[1/4] clk: meson: a1: peripherals: determine maximum register in regmap config
https://github.com/BayLibre/clk-meson/commit/b6e2c6548074 [2/4] clk: meson: a1: pll: determine maximum register in regmap config https://github.com/BayLibre/clk-meson/commit/acc628adc363 [3/4] clk: meson: s4: peripherals: determine maximum register in regmap config https://github.com/BayLibre/clk-meson/commit/32fba1c16576 [4/4] clk: meson: s4: pll: determine maximum register in regmap config https://github.com/BayLibre/clk-meson/commit/5995a2f26f83
Best regards,
--
Jerome