Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1356472 > unrolled thread

[PATCH 0/7] Some trivial patches for rockchip clk stuff

Started byShawn Lin <shawn.lin@rock-chips.com>
First post2016-03-12 17:40 +0100
Last post2016-03-14 01:30 +0100
Articles 12 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/7] Some trivial patches for rockchip clk stuff Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-12 17:40 +0100
    [PATCH 4/7] clk: rockchip: release io resource when rk3188_common_clk_init failed Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-12 17:40 +0100
    [PATCH 5/7] clk: rockchip: release io resource when rk3368_clk_init failed Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-12 17:40 +0100
    [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-12 17:40 +0100
      Re: [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed Heiko Stübner <heiko@sntech.de> - 2016-03-12 17:50 +0100
        Re: [PATCH 3/7] clk: rockchip: release io resource when  rk3036_clk_init failed Shawn Lin <shawn.lin@kernel-upstream.org> - 2016-03-13 03:00 +0100
    [PATCH 1/7] clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-12 17:40 +0100
      Re: [PATCH 1/7] clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data Heiko Stuebner <heiko@sntech.de> - 2016-03-14 01:20 +0100
    [PATCH 7/7] clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-12 17:40 +0100
      Re: [PATCH 7/7] clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params Heiko Stübner <heiko@sntech.de> - 2016-03-12 17:50 +0100
    [PATCH 2/7] clk: rockchip: fix warning reported by kernel-doc Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-12 17:40 +0100
      Re: [PATCH 2/7] clk: rockchip: fix warning reported by kernel-doc Heiko Stuebner <heiko@sntech.de> - 2016-03-14 01:30 +0100

#1356472 — [PATCH 0/7] Some trivial patches for rockchip clk stuff

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-03-12 17:40 +0100
Subject[PATCH 0/7] Some trivial patches for rockchip clk stuff
Message-ID<rbUK6-tV-7@gated-at.bofh.it>
Hi Heiko and Xing,

After reviewing some clk patches for rk3399, I found some
trivial problems. So this is another round of patches to
slightly improve the code.

Based on v4.7-clk/next branch
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git



Shawn Lin (7):
  clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data
  clk: rockchip: fix warning reported by kernel-doc
  clk: rockchip: release io resource when rk3036_clk_init failed
  clk: rockchip: release io resource when rk3188_common_clk_init failed
  clk: rockchip: release io resource when rk3368_clk_init failed
  clk: rockchip: remove redundant checking of device_node
  clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params

 drivers/clk/rockchip/clk-pll.c    |  2 +-
 drivers/clk/rockchip/clk-rk3036.c |  1 +
 drivers/clk/rockchip/clk-rk3188.c |  1 +
 drivers/clk/rockchip/clk-rk3368.c |  1 +
 drivers/clk/rockchip/clk.c        |  8 +++-----
 drivers/clk/rockchip/clk.h        | 10 +++++-----
 6 files changed, 12 insertions(+), 11 deletions(-)

-- 
2.3.7

[toc] | [next] | [standalone]


#1356473 — [PATCH 4/7] clk: rockchip: release io resource when rk3188_common_clk_init failed

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-03-12 17:40 +0100
Subject[PATCH 4/7] clk: rockchip: release io resource when rk3188_common_clk_init failed
Message-ID<rbUK6-tV-15@gated-at.bofh.it>
In reply to#1356472
We should call iounmap to relase reg_base since it's not going
to be used any more.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/rockchip/clk-rk3188.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
index 0fcce22..d0e722a 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -773,6 +773,7 @@ static struct rockchip_clk_provider *__init rk3188_common_clk_init(struct device
 	ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
 	if (IS_ERR(ctx)) {
 		pr_err("%s: rockchip clk init failed\n", __func__);
+		iounmap(reg_base);
 		return ERR_PTR(-ENOMEM);
 	}
 
-- 
2.3.7

[toc] | [prev] | [next] | [standalone]


#1356474 — [PATCH 5/7] clk: rockchip: release io resource when rk3368_clk_init failed

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-03-12 17:40 +0100
Subject[PATCH 5/7] clk: rockchip: release io resource when rk3368_clk_init failed
Message-ID<rbUK6-tV-17@gated-at.bofh.it>
In reply to#1356472
We should call iounmap to relase reg_base since it's not going
to be used any more.w

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/rockchip/clk-rk3368.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c
index 58690f2..3437289 100644
--- a/drivers/clk/rockchip/clk-rk3368.c
+++ b/drivers/clk/rockchip/clk-rk3368.c
@@ -875,6 +875,7 @@ static void __init rk3368_clk_init(struct device_node *np)
 	ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
 	if (IS_ERR(ctx)) {
 		pr_err("%s: rockchip clk init failed\n", __func__);
+		iounmap(reg_base);
 		return;
 	}
 
-- 
2.3.7

[toc] | [prev] | [next] | [standalone]


#1356475 — [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-03-12 17:40 +0100
Subject[PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed
Message-ID<rbUK6-tV-19@gated-at.bofh.it>
In reply to#1356472
We should call iounmap to relase reg_base since it's not going
to be used any more.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/rockchip/clk-rk3036.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/rockchip/clk-rk3036.c b/drivers/clk/rockchip/clk-rk3036.c
index 8c683cc..284c36f 100644
--- a/drivers/clk/rockchip/clk-rk3036.c
+++ b/drivers/clk/rockchip/clk-rk3036.c
@@ -453,6 +453,7 @@ static void __init rk3036_clk_init(struct device_node *np)
 	ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
 	if (IS_ERR(ctx)) {
 		pr_err("%s: rockchip clk init failed\n", __func__);
+		iounmap(reg_base);
 		return;
 	}
 
-- 
2.3.7

[toc] | [prev] | [next] | [standalone]


#1356479 — Re: [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed

FromHeiko Stübner <heiko@sntech.de>
Date2016-03-12 17:50 +0100
SubjectRe: [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed
Message-ID<rbUTM-xN-15@gated-at.bofh.it>
In reply to#1356475
Hi Shawn,

Am Sonntag, 13. März 2016, 00:25:25 schrieb Shawn Lin:
> We should call iounmap to relase reg_base since it's not going
> to be used any more.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

I see that change for rk3036, rk3188(+rk3066) and rk3368.
But it looks like rk3228 and rk3288 should also get that, or am I just 
overlooking something?

Also, I think we can fold these changes into one patch, as it's the completely 
same addition for all clock-drivers.


Heiko

> ---
> 
>  drivers/clk/rockchip/clk-rk3036.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/rockchip/clk-rk3036.c
> b/drivers/clk/rockchip/clk-rk3036.c index 8c683cc..284c36f 100644
> --- a/drivers/clk/rockchip/clk-rk3036.c
> +++ b/drivers/clk/rockchip/clk-rk3036.c
> @@ -453,6 +453,7 @@ static void __init rk3036_clk_init(struct device_node
> *np) ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
>  	if (IS_ERR(ctx)) {
>  		pr_err("%s: rockchip clk init failed\n", __func__);
> +		iounmap(reg_base);
>  		return;
>  	}

[toc] | [prev] | [next] | [standalone]


#1356580 — Re: [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed

FromShawn Lin <shawn.lin@kernel-upstream.org>
Date2016-03-13 03:00 +0100
SubjectRe: [PATCH 3/7] clk: rockchip: release io resource when rk3036_clk_init failed
Message-ID<rc3u2-6T6-9@gated-at.bofh.it>
In reply to#1356479
在 2016/3/13 0:48, Heiko Stübner 写道:
> Hi Shawn,
>
> Am Sonntag, 13. März 2016, 00:25:25 schrieb Shawn Lin:
>> We should call iounmap to relase reg_base since it's not going
>> to be used any more.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>
> I see that change for rk3036, rk3188(+rk3066) and rk3368.
> But it looks like rk3228 and rk3288 should also get that, or am I just
> overlooking something?

My fault, we need to do that for 3228/3288 as well.
Sorry for my slippy finger. I assign wrong patch-numbers to my
script.

I will squash up patch[3/7],[4/7],[5/7] as well as for 3228/3288, and
resend a separate patch for it.

>
> Also, I think we can fold these changes into one patch, as it's the completely
> same addition for all clock-drivers.
>
>
> Heiko
>
>> ---
>>
>>   drivers/clk/rockchip/clk-rk3036.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/clk/rockchip/clk-rk3036.c
>> b/drivers/clk/rockchip/clk-rk3036.c index 8c683cc..284c36f 100644
>> --- a/drivers/clk/rockchip/clk-rk3036.c
>> +++ b/drivers/clk/rockchip/clk-rk3036.c
>> @@ -453,6 +453,7 @@ static void __init rk3036_clk_init(struct device_node
>> *np) ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
>>   	if (IS_ERR(ctx)) {
>>   		pr_err("%s: rockchip clk init failed\n", __func__);
>> +		iounmap(reg_base);
>>   		return;
>>   	}
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>

[toc] | [prev] | [next] | [standalone]


#1356476 — [PATCH 1/7] clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-03-12 17:40 +0100
Subject[PATCH 1/7] clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data
Message-ID<rbUK6-tV-9@gated-at.bofh.it>
In reply to#1356472
mux_core_reg isn't been used anywhere, let's remove it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

---

 drivers/clk/rockchip/clk.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 4798786..b298f99 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -245,7 +245,6 @@ struct rockchip_cpuclk_reg_data {
 	int		core_reg;
 	u8		div_core_shift;
 	u32		div_core_mask;
-	int		mux_core_reg;
 	u8		mux_core_alt;
 	u8		mux_core_main;
 	u8		mux_core_shift;
-- 
2.3.7

[toc] | [prev] | [next] | [standalone]


#1356783 — Re: [PATCH 1/7] clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data

FromHeiko Stuebner <heiko@sntech.de>
Date2016-03-14 01:20 +0100
SubjectRe: [PATCH 1/7] clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data
Message-ID<rcooN-4tB-3@gated-at.bofh.it>
In reply to#1356476
Am Sonntag, 13. März 2016, 00:25:00 schrieb Shawn Lin:
> mux_core_reg isn't been used anywhere, let's remove it.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

applied for v4.7

Thanks
Heiko

[toc] | [prev] | [next] | [standalone]


#1356477 — [PATCH 7/7] clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-03-12 17:40 +0100
Subject[PATCH 7/7] clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params
Message-ID<rbUK6-tV-13@gated-at.bofh.it>
In reply to#1356472
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/rockchip/clk-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
index f490ce4..128a6b2 100644
--- a/drivers/clk/rockchip/clk-pll.c
+++ b/drivers/clk/rockchip/clk-pll.c
@@ -733,7 +733,7 @@ static int rockchip_rk3399_pll_set_params(struct rockchip_clk_pll *pll,
 	/* wait for the pll to lock */
 	ret = rockchip_rk3399_pll_wait_lock(pll);
 	if (ret) {
-		pr_warn("%s: pll update unsucessful, trying to restore old params\n",
+		pr_warn("%s: pll update unsuccessful, trying to restore old params\n",
 			__func__);
 		rockchip_rk3399_pll_set_params(pll, &cur);
 	}
-- 
2.3.7

[toc] | [prev] | [next] | [standalone]


#1356480 — Re: [PATCH 7/7] clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params

FromHeiko Stübner <heiko@sntech.de>
Date2016-03-12 17:50 +0100
SubjectRe: [PATCH 7/7] clk: rockchip: fix a typo for rockchip_rk3399_pll_set_params
Message-ID<rbUTM-xN-19@gated-at.bofh.it>
In reply to#1356477
Hi Shawn,

Am Sonntag, 13. März 2016, 00:26:02 schrieb Shawn Lin:
> --- a/drivers/clk/rockchip/clk-pll.c
> +++ b/drivers/clk/rockchip/clk-pll.c
> @@ -733,7 +733,7 @@ static int rockchip_rk3399_pll_set_params(struct
> rockchip_clk_pll *pll, /* wait for the pll to lock */
>  	ret = rockchip_rk3399_pll_wait_lock(pll);
>  	if (ret) {
> -		pr_warn("%s: pll update unsucessful, trying to restore old params\n",
> +		pr_warn("%s: pll update unsuccessful, trying to restore old params\n",
>  			__func__);
>  		rockchip_rk3399_pll_set_params(pll, &cur);
>  	}

I've folded that fix into the original pll addition [0]

Thanks for catching that
Heiko


[0] https://git.kernel.org/cgit/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v4.7-clk/next&id=95e0c473a0ac1bdac25f55678dc602eb50dae684

[toc] | [prev] | [next] | [standalone]


#1356478 — [PATCH 2/7] clk: rockchip: fix warning reported by kernel-doc

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-03-12 17:40 +0100
Subject[PATCH 2/7] clk: rockchip: fix warning reported by kernel-doc
Message-ID<rbUK7-tV-37@gated-at.bofh.it>
In reply to#1356472
./scripts/kernel-doc -man -v drivers/clk/rockchip/clk.h > /dev/null

drivers/clk/rockchip/clk.h:133: warning: missing initial short
description on line:
 * struct rockchip_clk_provider: information about clock provider
drivers/clk/rockchip/clk.h:133: info: Scanning doc for struct
drivers/clk/rockchip/clk.h:164: warning: missing initial short
description on line:
 * struct rockchip_pll_clock: information about pll clock
drivers/clk/rockchip/clk.h:164: info: Scanning doc for struct
drivers/clk/rockchip/clk.h:194: warning: No description found for
parameter 'parent_names'
drivers/clk/rockchip/clk.h:194: warning: No description found for
parameter 'num_parents'
drivers/clk/rockchip/clk.h:194: warning: Excess struct/union/enum/typedef
member 'parent_name' description in 'rockchip_pll_clock'
drivers/clk/rockchip/clk.h:235: warning: missing initial short
description on line:
 * struct rockchip_cpuclk_reg_data: describes register offsets and
masks of the cpuclock

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/rockchip/clk.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index b298f99..e0f103b 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -130,7 +130,7 @@ enum rockchip_pll_type {
 }
 
 /**
- * struct rockchip_clk_provider: information about clock provider
+ * struct rockchip_clk_provider - information about clock provider
  * @reg_base: virtual address for the register base.
  * @clk_data: holds clock related data like clk* and number of clocks.
  * @cru_node: device-node of the clock-provider
@@ -161,10 +161,11 @@ struct rockchip_pll_rate_table {
 };
 
 /**
- * struct rockchip_pll_clock: information about pll clock
+ * struct rockchip_pll_clock - information about pll clock
  * @id: platform specific id of the clock.
  * @name: name of this pll clock.
- * @parent_name: name of the parent clock.
+ * @parent_names: name of the parent clock.
+ * @num_parents: number of parents
  * @flags: optional flags for basic clock.
  * @con_offset: offset of the register for configuring the PLL.
  * @mode_offset: offset of the register for configuring the PLL-mode.
@@ -232,7 +233,7 @@ struct rockchip_cpuclk_rate_table {
 };
 
 /**
- * struct rockchip_cpuclk_reg_data: describes register offsets and masks of the cpuclock
+ * struct rockchip_cpuclk_reg_data - describes register offsets and masks of the cpuclock
  * @core_reg:		register offset of the core settings register
  * @div_core_shift:	core divider offset used to divide the pll value
  * @div_core_mask:	core divider mask
-- 
2.3.7

[toc] | [prev] | [next] | [standalone]


#1356786 — Re: [PATCH 2/7] clk: rockchip: fix warning reported by kernel-doc

FromHeiko Stuebner <heiko@sntech.de>
Date2016-03-14 01:30 +0100
SubjectRe: [PATCH 2/7] clk: rockchip: fix warning reported by kernel-doc
Message-ID<rcoyu-4xb-11@gated-at.bofh.it>
In reply to#1356478
Am Sonntag, 13. März 2016, 00:25:14 schrieb Shawn Lin:
> ./scripts/kernel-doc -man -v drivers/clk/rockchip/clk.h > /dev/null
> 
> drivers/clk/rockchip/clk.h:133: warning: missing initial short
> description on line:
>  * struct rockchip_clk_provider: information about clock provider
> drivers/clk/rockchip/clk.h:133: info: Scanning doc for struct
> drivers/clk/rockchip/clk.h:164: warning: missing initial short
> description on line:
>  * struct rockchip_pll_clock: information about pll clock
> drivers/clk/rockchip/clk.h:164: info: Scanning doc for struct
> drivers/clk/rockchip/clk.h:194: warning: No description found for
> parameter 'parent_names'
> drivers/clk/rockchip/clk.h:194: warning: No description found for
> parameter 'num_parents'
> drivers/clk/rockchip/clk.h:194: warning: Excess struct/union/enum/typedef
> member 'parent_name' description in 'rockchip_pll_clock'
> drivers/clk/rockchip/clk.h:235: warning: missing initial short
> description on line:
>  * struct rockchip_cpuclk_reg_data: describes register offsets and
> masks of the cpuclock
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

applied for v4.7

Thanks
Heiko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web