Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config
@ 2024-03-20 15:54 Dmitry Rokosov
  2024-03-20 15:54 ` [PATCH v1 1/4] clk: meson: a1: peripherals: determine " Dmitry Rokosov
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dmitry Rokosov @ 2024-03-20 15:54 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman, martin.blumenstingl,
	sboyd
  Cc: kernel, rockosov, linux-amlogic, linux-clk, linux-kernel,
	linux-arm-kernel, Dmitry Rokosov

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(+)

-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v1 1/4] clk: meson: a1: peripherals: determine maximum register in regmap config
  2024-03-20 15:54 [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config Dmitry Rokosov
@ 2024-03-20 15:54 ` Dmitry Rokosov
  2024-03-20 15:54 ` [PATCH v1 2/4] clk: meson: a1: pll: " Dmitry Rokosov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Rokosov @ 2024-03-20 15:54 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman, martin.blumenstingl,
	sboyd
  Cc: kernel, rockosov, linux-amlogic, linux-clk, linux-kernel,
	linux-arm-kernel, Dmitry Rokosov

When the max_register value is not set, the regmap debugfs 'registers'
file does not display the entire range of the regmap.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 drivers/clk/meson/a1-peripherals.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/meson/a1-peripherals.c b/drivers/clk/meson/a1-peripherals.c
index e2a1f12f9175..621af1e6e4b2 100644
--- a/drivers/clk/meson/a1-peripherals.c
+++ b/drivers/clk/meson/a1-peripherals.c
@@ -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 = {
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 2/4] clk: meson: a1: pll: determine maximum register in regmap config
  2024-03-20 15:54 [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config Dmitry Rokosov
  2024-03-20 15:54 ` [PATCH v1 1/4] clk: meson: a1: peripherals: determine " Dmitry Rokosov
@ 2024-03-20 15:54 ` Dmitry Rokosov
  2024-03-20 15:54 ` [PATCH v1 3/4] clk: meson: s4: peripherals: " Dmitry Rokosov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Rokosov @ 2024-03-20 15:54 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman, martin.blumenstingl,
	sboyd
  Cc: kernel, rockosov, linux-amlogic, linux-clk, linux-kernel,
	linux-arm-kernel, Dmitry Rokosov

When the max_register value is not set, the regmap debugfs 'registers'
file does not display the entire range of the regmap.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 drivers/clk/meson/a1-pll.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/meson/a1-pll.c b/drivers/clk/meson/a1-pll.c
index 00e06d03445b..60b2e53e7e51 100644
--- a/drivers/clk/meson/a1-pll.c
+++ b/drivers/clk/meson/a1-pll.c
@@ -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 = {
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 3/4] clk: meson: s4: peripherals: determine maximum register in regmap config
  2024-03-20 15:54 [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config Dmitry Rokosov
  2024-03-20 15:54 ` [PATCH v1 1/4] clk: meson: a1: peripherals: determine " Dmitry Rokosov
  2024-03-20 15:54 ` [PATCH v1 2/4] clk: meson: a1: pll: " Dmitry Rokosov
@ 2024-03-20 15:54 ` Dmitry Rokosov
  2024-03-20 15:54 ` [PATCH v1 4/4] clk: meson: s4: pll: " Dmitry Rokosov
  2024-03-29 11:15 ` [PATCH v1 0/4] clk: meson: treewide: define " Jerome Brunet
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Rokosov @ 2024-03-20 15:54 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman, martin.blumenstingl,
	sboyd
  Cc: kernel, rockosov, linux-amlogic, linux-clk, linux-kernel,
	linux-arm-kernel, Dmitry Rokosov

When the max_register value is not set, the regmap debugfs 'registers'
file does not display the entire range of the regmap.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 drivers/clk/meson/s4-peripherals.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/meson/s4-peripherals.c b/drivers/clk/meson/s4-peripherals.c
index 6c35de3d536f..1fceb93faf13 100644
--- a/drivers/clk/meson/s4-peripherals.c
+++ b/drivers/clk/meson/s4-peripherals.c
@@ -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 = {
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 4/4] clk: meson: s4: pll: determine maximum register in regmap config
  2024-03-20 15:54 [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config Dmitry Rokosov
                   ` (2 preceding siblings ...)
  2024-03-20 15:54 ` [PATCH v1 3/4] clk: meson: s4: peripherals: " Dmitry Rokosov
@ 2024-03-20 15:54 ` Dmitry Rokosov
  2024-03-29 11:15 ` [PATCH v1 0/4] clk: meson: treewide: define " Jerome Brunet
  4 siblings, 0 replies; 6+ messages in thread
From: Dmitry Rokosov @ 2024-03-20 15:54 UTC (permalink / raw)
  To: neil.armstrong, jbrunet, mturquette, khilman, martin.blumenstingl,
	sboyd
  Cc: kernel, rockosov, linux-amlogic, linux-clk, linux-kernel,
	linux-arm-kernel, Dmitry Rokosov

When the max_register value is not set, the regmap debugfs 'registers'
file does not display the entire range of the regmap.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 drivers/clk/meson/s4-pll.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/meson/s4-pll.c b/drivers/clk/meson/s4-pll.c
index 8dfaeccaadc2..c8a95842b14c 100644
--- a/drivers/clk/meson/s4-pll.c
+++ b/drivers/clk/meson/s4-pll.c
@@ -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 = {
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config
  2024-03-20 15:54 [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config Dmitry Rokosov
                   ` (3 preceding siblings ...)
  2024-03-20 15:54 ` [PATCH v1 4/4] clk: meson: s4: pll: " Dmitry Rokosov
@ 2024-03-29 11:15 ` Jerome Brunet
  4 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2024-03-29 11:15 UTC (permalink / raw)
  To: neil.armstrong, mturquette, khilman, martin.blumenstingl, sboyd,
	Dmitry Rokosov
  Cc: kernel, rockosov, linux-amlogic, linux-clk, linux-kernel,
	linux-arm-kernel

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-29 11:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20 15:54 [PATCH v1 0/4] clk: meson: treewide: define maximum register in regmap config Dmitry Rokosov
2024-03-20 15:54 ` [PATCH v1 1/4] clk: meson: a1: peripherals: determine " Dmitry Rokosov
2024-03-20 15:54 ` [PATCH v1 2/4] clk: meson: a1: pll: " Dmitry Rokosov
2024-03-20 15:54 ` [PATCH v1 3/4] clk: meson: s4: peripherals: " Dmitry Rokosov
2024-03-20 15:54 ` [PATCH v1 4/4] clk: meson: s4: pll: " Dmitry Rokosov
2024-03-29 11:15 ` [PATCH v1 0/4] clk: meson: treewide: define " Jerome Brunet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox