linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB"
@ 2019-01-19 20:51 Martin Blumenstingl
  2019-01-19 20:51 ` [PATCH v2 1/2] dt-bindings: clock: meson8b: add APB clock definition Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-01-19 20:51 UTC (permalink / raw)
  To: linux-amlogic, narmstrong, jbrunet
  Cc: sboyd, Martin Blumenstingl, mturquette, linux-clk, linux-arm-kernel

It turns out that I'm not good at spelling "APB". Unfortunately an ABP
(instead of APB) typo snug into two clocks in v5.0.

Currently there are no users of that clock yet, so fix it now
before it's too late (meaning before it's used by <something>).

I decided to go the "normal" route where we can have separate
branches for the dt-bindings and the drivers in the clk-meson
repo. This means:
- new (typo-free) clock #define
- change the clock controller to use the new #define
- (next development cycle) drop the old #define


Changes since v1 at [0]:
- split into a dt-bindings and clock controller driver patch


[0] https://patchwork.kernel.org/cover/10742001/


Martin Blumenstingl (2):
  dt-bindings: clock: meson8b: add APB clock definition
  clk: meson: meson8b: fix the naming of the APB clocks

 drivers/clk/meson/meson8b.c              | 26 ++++++++++++------------
 drivers/clk/meson/meson8b.h              |  2 +-
 include/dt-bindings/clock/meson8b-clkc.h |  1 +
 3 files changed, 15 insertions(+), 14 deletions(-)

-- 
2.20.1


_______________________________________________
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 v2 1/2] dt-bindings: clock: meson8b: add APB clock definition
  2019-01-19 20:51 [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Martin Blumenstingl
@ 2019-01-19 20:51 ` Martin Blumenstingl
  2019-01-19 20:51 ` [PATCH v2 2/2] clk: meson: meson8b: fix the naming of the APB clocks Martin Blumenstingl
  2019-01-21 10:40 ` [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Neil Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-01-19 20:51 UTC (permalink / raw)
  To: linux-amlogic, narmstrong, jbrunet
  Cc: sboyd, Martin Blumenstingl, mturquette, linux-clk, linux-arm-kernel

Commit 8e1dd17c8b0e3f ("dt-bindings: clock: meson8b: export the CPU
post dividers") added a clock with the name "ABP". The actual name of
this clock is "APB".

Add a new #define with the same ID but the correct name. The old #define
will be dropped in a follow-up patch because each commit in the tree
must compile on it's own (the old #define is still used by the clock
controller driver).

Fixes: 8e1dd17c8b0e3f ("dt-bindings: clock: meson8b: export the CPU post dividers")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 include/dt-bindings/clock/meson8b-clkc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/clock/meson8b-clkc.h b/include/dt-bindings/clock/meson8b-clkc.h
index 5fe2923382d0..8067077a62ca 100644
--- a/include/dt-bindings/clock/meson8b-clkc.h
+++ b/include/dt-bindings/clock/meson8b-clkc.h
@@ -104,6 +104,7 @@
 #define CLKID_MPLL2		95
 #define CLKID_NAND_CLK		112
 #define CLKID_ABP		124
+#define CLKID_APB		124
 #define CLKID_PERIPH		126
 #define CLKID_AXI		128
 #define CLKID_L2_DRAM		130
-- 
2.20.1


_______________________________________________
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 v2 2/2] clk: meson: meson8b: fix the naming of the APB clocks
  2019-01-19 20:51 [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Martin Blumenstingl
  2019-01-19 20:51 ` [PATCH v2 1/2] dt-bindings: clock: meson8b: add APB clock definition Martin Blumenstingl
@ 2019-01-19 20:51 ` Martin Blumenstingl
  2019-01-21 10:40 ` [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Neil Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-01-19 20:51 UTC (permalink / raw)
  To: linux-amlogic, narmstrong, jbrunet
  Cc: sboyd, Martin Blumenstingl, mturquette, linux-clk, linux-arm-kernel

Fix a typo in the APB clock names by renaming them from "abp" to "apb".
No functional changes.

Fixes: a7d19b05ce817d ("clk: meson: meson8b: add the CPU clock post divider clocks")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/clk/meson/meson8b.c | 26 +++++++++++++-------------
 drivers/clk/meson/meson8b.h |  2 +-
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 748552c5f6c8..5136300c7915 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -803,16 +803,16 @@ static struct clk_fixed_factor meson8b_cpu_clk_div8 = {
 	},
 };
 
-static u32 mux_table_abp[] = { 1, 2, 3, 4, 5, 6, 7 };
-static struct clk_regmap meson8b_abp_clk_sel = {
+static u32 mux_table_apb[] = { 1, 2, 3, 4, 5, 6, 7 };
+static struct clk_regmap meson8b_apb_clk_sel = {
 	.data = &(struct clk_regmap_mux_data){
 		.offset = HHI_SYS_CPU_CLK_CNTL1,
 		.mask = 0x7,
 		.shift = 3,
-		.table = mux_table_abp,
+		.table = mux_table_apb,
 	},
 	.hw.init = &(struct clk_init_data){
-		.name = "abp_clk_sel",
+		.name = "apb_clk_sel",
 		.ops = &clk_regmap_mux_ops,
 		.parent_names = (const char *[]){ "cpu_clk_div2",
 						  "cpu_clk_div3",
@@ -825,16 +825,16 @@ static struct clk_regmap meson8b_abp_clk_sel = {
 	},
 };
 
-static struct clk_regmap meson8b_abp_clk_gate = {
+static struct clk_regmap meson8b_apb_clk_gate = {
 	.data = &(struct clk_regmap_gate_data){
 		.offset = HHI_SYS_CPU_CLK_CNTL1,
 		.bit_idx = 16,
 		.flags = CLK_GATE_SET_TO_DISABLE,
 	},
 	.hw.init = &(struct clk_init_data){
-		.name = "abp_clk_dis",
+		.name = "apb_clk_dis",
 		.ops = &clk_regmap_gate_ro_ops,
-		.parent_names = (const char *[]){ "abp_clk_sel" },
+		.parent_names = (const char *[]){ "apb_clk_sel" },
 		.num_parents = 1,
 		.flags = CLK_SET_RATE_PARENT,
 	},
@@ -1910,8 +1910,8 @@ static struct clk_hw_onecell_data meson8_hw_onecell_data = {
 		[CLKID_CPU_CLK_DIV6]	    = &meson8b_cpu_clk_div6.hw,
 		[CLKID_CPU_CLK_DIV7]	    = &meson8b_cpu_clk_div7.hw,
 		[CLKID_CPU_CLK_DIV8]	    = &meson8b_cpu_clk_div8.hw,
-		[CLKID_ABP_SEL]		    = &meson8b_abp_clk_sel.hw,
-		[CLKID_ABP]		    = &meson8b_abp_clk_gate.hw,
+		[CLKID_APB_SEL]		    = &meson8b_apb_clk_sel.hw,
+		[CLKID_APB]		    = &meson8b_apb_clk_gate.hw,
 		[CLKID_PERIPH_SEL]	    = &meson8b_periph_clk_sel.hw,
 		[CLKID_PERIPH]		    = &meson8b_periph_clk_gate.hw,
 		[CLKID_AXI_SEL]		    = &meson8b_axi_clk_sel.hw,
@@ -2092,8 +2092,8 @@ static struct clk_hw_onecell_data meson8b_hw_onecell_data = {
 		[CLKID_CPU_CLK_DIV6]	    = &meson8b_cpu_clk_div6.hw,
 		[CLKID_CPU_CLK_DIV7]	    = &meson8b_cpu_clk_div7.hw,
 		[CLKID_CPU_CLK_DIV8]	    = &meson8b_cpu_clk_div8.hw,
-		[CLKID_ABP_SEL]		    = &meson8b_abp_clk_sel.hw,
-		[CLKID_ABP]		    = &meson8b_abp_clk_gate.hw,
+		[CLKID_APB_SEL]		    = &meson8b_apb_clk_sel.hw,
+		[CLKID_APB]		    = &meson8b_apb_clk_gate.hw,
 		[CLKID_PERIPH_SEL]	    = &meson8b_periph_clk_sel.hw,
 		[CLKID_PERIPH]		    = &meson8b_periph_clk_gate.hw,
 		[CLKID_AXI_SEL]		    = &meson8b_axi_clk_sel.hw,
@@ -2261,8 +2261,8 @@ static struct clk_regmap *const meson8b_clk_regmaps[] = {
 	&meson8b_fixed_pll_dco,
 	&meson8b_hdmi_pll_dco,
 	&meson8b_sys_pll_dco,
-	&meson8b_abp_clk_sel,
-	&meson8b_abp_clk_gate,
+	&meson8b_apb_clk_sel,
+	&meson8b_apb_clk_gate,
 	&meson8b_periph_clk_sel,
 	&meson8b_periph_clk_gate,
 	&meson8b_axi_clk_sel,
diff --git a/drivers/clk/meson/meson8b.h b/drivers/clk/meson/meson8b.h
index f212e2304ff5..b8c58faeae52 100644
--- a/drivers/clk/meson/meson8b.h
+++ b/drivers/clk/meson/meson8b.h
@@ -92,7 +92,7 @@
 #define CLKID_CPU_CLK_DIV6	120
 #define CLKID_CPU_CLK_DIV7	121
 #define CLKID_CPU_CLK_DIV8	122
-#define CLKID_ABP_SEL		123
+#define CLKID_APB_SEL		123
 #define CLKID_PERIPH_SEL	125
 #define CLKID_AXI_SEL		127
 #define CLKID_L2_DRAM_SEL	129
-- 
2.20.1


_______________________________________________
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 v2 0/2] clk: meson8b: fix typo "ABP" -> "APB"
  2019-01-19 20:51 [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Martin Blumenstingl
  2019-01-19 20:51 ` [PATCH v2 1/2] dt-bindings: clock: meson8b: add APB clock definition Martin Blumenstingl
  2019-01-19 20:51 ` [PATCH v2 2/2] clk: meson: meson8b: fix the naming of the APB clocks Martin Blumenstingl
@ 2019-01-21 10:40 ` Neil Armstrong
  2019-02-09  0:24   ` Martin Blumenstingl
  2 siblings, 1 reply; 6+ messages in thread
From: Neil Armstrong @ 2019-01-21 10:40 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic, jbrunet
  Cc: sboyd, mturquette, linux-clk, linux-arm-kernel

On 19/01/2019 21:51, Martin Blumenstingl wrote:
> It turns out that I'm not good at spelling "APB". Unfortunately an ABP
> (instead of APB) typo snug into two clocks in v5.0.
> 
> Currently there are no users of that clock yet, so fix it now
> before it's too late (meaning before it's used by <something>).
> 
> I decided to go the "normal" route where we can have separate
> branches for the dt-bindings and the drivers in the clk-meson
> repo. This means:
> - new (typo-free) clock #define
> - change the clock controller to use the new #define
> - (next development cycle) drop the old #define
> 
> 
> Changes since v1 at [0]:
> - split into a dt-bindings and clock controller driver patch
> 
> 
> [0] https://patchwork.kernel.org/cover/10742001/
> 
> 
> Martin Blumenstingl (2):
>   dt-bindings: clock: meson8b: add APB clock definition
>   clk: meson: meson8b: fix the naming of the APB clocks
> 
>  drivers/clk/meson/meson8b.c              | 26 ++++++++++++------------
>  drivers/clk/meson/meson8b.h              |  2 +-
>  include/dt-bindings/clock/meson8b-clkc.h |  1 +
>  3 files changed, 15 insertions(+), 14 deletions(-)
> 

Once rob acks it, I'll apply both to next/drivers since it's not used (yet ?)
and not a critical fix.

Neil

_______________________________________________
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

* Re: [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB"
  2019-01-21 10:40 ` [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Neil Armstrong
@ 2019-02-09  0:24   ` Martin Blumenstingl
  2019-02-10 10:58     ` Neil Armstrong
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Blumenstingl @ 2019-02-09  0:24 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Rob Herring, devicetree, sboyd, mturquette, linux-amlogic,
	linux-clk, linux-arm-kernel, jbrunet

Hi Neil,

On Mon, Jan 21, 2019 at 11:40 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> On 19/01/2019 21:51, Martin Blumenstingl wrote:
> > It turns out that I'm not good at spelling "APB". Unfortunately an ABP
> > (instead of APB) typo snug into two clocks in v5.0.
> >
> > Currently there are no users of that clock yet, so fix it now
> > before it's too late (meaning before it's used by <something>).
> >
> > I decided to go the "normal" route where we can have separate
> > branches for the dt-bindings and the drivers in the clk-meson
> > repo. This means:
> > - new (typo-free) clock #define
> > - change the clock controller to use the new #define
> > - (next development cycle) drop the old #define
> >
> >
> > Changes since v1 at [0]:
> > - split into a dt-bindings and clock controller driver patch
> >
> >
> > [0] https://patchwork.kernel.org/cover/10742001/
> >
> >
> > Martin Blumenstingl (2):
> >   dt-bindings: clock: meson8b: add APB clock definition
> >   clk: meson: meson8b: fix the naming of the APB clocks
> >
> >  drivers/clk/meson/meson8b.c              | 26 ++++++++++++------------
> >  drivers/clk/meson/meson8b.h              |  2 +-
> >  include/dt-bindings/clock/meson8b-clkc.h |  1 +
> >  3 files changed, 15 insertions(+), 14 deletions(-)
> >
>
> Once rob acks it, I'll apply both to next/drivers since it's not used (yet ?)
> and not a critical fix.
I have just noticed that I forgot to CC Rob and devicetree@vger.kernel.org.
do you want me to re-send this series?

as you already noticed this is not critical, so taking this through
next/drivers is fine for me.


Regards
Martin

_______________________________________________
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

* Re: [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB"
  2019-02-09  0:24   ` Martin Blumenstingl
@ 2019-02-10 10:58     ` Neil Armstrong
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2019-02-10 10:58 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Rob Herring, devicetree, sboyd, mturquette, linux-amlogic,
	linux-clk, linux-arm-kernel, jbrunet

Hi Martin,

Le 09/02/2019 01:24, Martin Blumenstingl a écrit :
> Hi Neil,
> 
> On Mon, Jan 21, 2019 at 11:40 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> On 19/01/2019 21:51, Martin Blumenstingl wrote:
>>> It turns out that I'm not good at spelling "APB". Unfortunately an ABP
>>> (instead of APB) typo snug into two clocks in v5.0.
>>>
>>> Currently there are no users of that clock yet, so fix it now
>>> before it's too late (meaning before it's used by <something>).
>>>
>>> I decided to go the "normal" route where we can have separate
>>> branches for the dt-bindings and the drivers in the clk-meson
>>> repo. This means:
>>> - new (typo-free) clock #define
>>> - change the clock controller to use the new #define
>>> - (next development cycle) drop the old #define
>>>
>>>
>>> Changes since v1 at [0]:
>>> - split into a dt-bindings and clock controller driver patch
>>>
>>>
>>> [0] https://patchwork.kernel.org/cover/10742001/
>>>
>>>
>>> Martin Blumenstingl (2):
>>>   dt-bindings: clock: meson8b: add APB clock definition
>>>   clk: meson: meson8b: fix the naming of the APB clocks
>>>
>>>  drivers/clk/meson/meson8b.c              | 26 ++++++++++++------------
>>>  drivers/clk/meson/meson8b.h              |  2 +-
>>>  include/dt-bindings/clock/meson8b-clkc.h |  1 +
>>>  3 files changed, 15 insertions(+), 14 deletions(-)
>>>
>>
>> Once rob acks it, I'll apply both to next/drivers since it's not used (yet ?)
>> and not a critical fix.
> I have just noticed that I forgot to CC Rob and devicetree@vger.kernel.org.
> do you want me to re-send this series?

Yes please re-send !

Neil

> 
> as you already noticed this is not critical, so taking this through
> next/drivers is fine for me.
> 
> 
> Regards
> Martin
> 

_______________________________________________
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:[~2019-02-10 10:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-19 20:51 [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Martin Blumenstingl
2019-01-19 20:51 ` [PATCH v2 1/2] dt-bindings: clock: meson8b: add APB clock definition Martin Blumenstingl
2019-01-19 20:51 ` [PATCH v2 2/2] clk: meson: meson8b: fix the naming of the APB clocks Martin Blumenstingl
2019-01-21 10:40 ` [PATCH v2 0/2] clk: meson8b: fix typo "ABP" -> "APB" Neil Armstrong
2019-02-09  0:24   ` Martin Blumenstingl
2019-02-10 10:58     ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).