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


Groups > linux.kernel > #1722204 > unrolled thread

[PATCH 1/2] clk: hi6220: change watchdog clock source

Started byLeo Yan <leo.yan@linaro.org>
First post2017-08-29 10:00 +0200
Last post2017-09-01 04:20 +0200
Articles 8 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] clk: hi6220: change watchdog clock source Leo Yan <leo.yan@linaro.org> - 2017-08-29 10:00 +0200
    [PATCH 2/2] arm64: dts: hi6220: enable watchdog Leo Yan <leo.yan@linaro.org> - 2017-08-29 10:00 +0200
      Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog Stephen Boyd <sboyd@codeaurora.org> - 2017-09-01 03:40 +0200
        Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog Wei Xu <xuwei5@hisilicon.com> - 2017-09-01 12:40 +0200
          Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog Stephen Boyd <sboyd@codeaurora.org> - 2017-09-01 22:30 +0200
            Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog Wei Xu <xuwei5@hisilicon.com> - 2017-09-04 11:30 +0200
    Re: [PATCH 1/2] clk: hi6220: change watchdog clock source Stephen Boyd <sboyd@codeaurora.org> - 2017-09-01 03:40 +0200
      Re: [PATCH 1/2] clk: hi6220: change watchdog clock source Leo Yan <leo.yan@linaro.org> - 2017-09-01 04:20 +0200

#1722204 — [PATCH 1/2] clk: hi6220: change watchdog clock source

FromLeo Yan <leo.yan@linaro.org>
Date2017-08-29 10:00 +0200
Subject[PATCH 1/2] clk: hi6220: change watchdog clock source
Message-ID<ujJBg-8hK-1@gated-at.bofh.it>
The old code uses tcxo (19.2MHz) as watchdog clock but actually the
watchdog uses 32K clock, as result the watchdog timeout cannot be set
correctly and delay long time to reset SoC.

So this patch is to use 'ref32k' as clock source for watchdog.

Fixes: 72ea48610d43 ("clk: hi6220: Clock driver support for Hisilicon hi6220 SoC")
Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
 drivers/clk/hisilicon/clk-hi6220.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/clk-hi6220.c
index 4181b68..e786d71 100644
--- a/drivers/clk/hisilicon/clk-hi6220.c
+++ b/drivers/clk/hisilicon/clk-hi6220.c
@@ -55,9 +55,9 @@ static struct hisi_fixed_factor_clock hi6220_fixed_factor_clks[] __initdata = {
 };
 
 static struct hisi_gate_clock hi6220_separated_gate_clks_ao[] __initdata = {
-	{ HI6220_WDT0_PCLK,   "wdt0_pclk",   "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 12, 0, },
-	{ HI6220_WDT1_PCLK,   "wdt1_pclk",   "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 13, 0, },
-	{ HI6220_WDT2_PCLK,   "wdt2_pclk",   "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 14, 0, },
+	{ HI6220_WDT0_PCLK,   "wdt0_pclk",   "ref32k",   CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 12, 0, },
+	{ HI6220_WDT1_PCLK,   "wdt1_pclk",   "ref32k",   CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 13, 0, },
+	{ HI6220_WDT2_PCLK,   "wdt2_pclk",   "ref32k",   CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 14, 0, },
 	{ HI6220_TIMER0_PCLK, "timer0_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 15, 0, },
 	{ HI6220_TIMER1_PCLK, "timer1_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 16, 0, },
 	{ HI6220_TIMER2_PCLK, "timer2_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 17, 0, },
-- 
2.7.4

[toc] | [next] | [standalone]


#1722205 — [PATCH 2/2] arm64: dts: hi6220: enable watchdog

FromLeo Yan <leo.yan@linaro.org>
Date2017-08-29 10:00 +0200
Subject[PATCH 2/2] arm64: dts: hi6220: enable watchdog
Message-ID<ujJBg-8hK-5@gated-at.bofh.it>
In reply to#1722204
From: Dmitry Shmidt <dimitrysh@google.com>

This patch is to add watchdog binding for Hi6220 on Hikey board.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index eacbe0d..77dc28f 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -809,6 +809,14 @@
 			pinctrl-1 = <&sdio_pmx_idle &sdio_clk_cfg_idle &sdio_cfg_idle>;
 		};
 
+		watchdog0: watchdog@f8005000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			reg = <0x0 0xf8005000 0x0 0x1000>;
+			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ao_ctrl HI6220_WDT0_PCLK>;
+			clock-names = "apb_pclk";
+		};
+
 		tsensor: tsensor@0,f7030700 {
 			compatible = "hisilicon,tsensor";
 			reg = <0x0 0xf7030700 0x0 0x1000>;
-- 
2.7.4

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


#1724724 — Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog

FromStephen Boyd <sboyd@codeaurora.org>
Date2017-09-01 03:40 +0200
SubjectRe: [PATCH 2/2] arm64: dts: hi6220: enable watchdog
Message-ID<ukJ6a-5dR-17@gated-at.bofh.it>
In reply to#1722205
On 08/29, Leo Yan wrote:
> From: Dmitry Shmidt <dimitrysh@google.com>
> 
> This patch is to add watchdog binding for Hi6220 on Hikey board.
> 
> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
> ---

This will go through arm-soc?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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


#1724956 — Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog

FromWei Xu <xuwei5@hisilicon.com>
Date2017-09-01 12:40 +0200
SubjectRe: [PATCH 2/2] arm64: dts: hi6220: enable watchdog
Message-ID<ukRwK-2IO-13@gated-at.bofh.it>
In reply to#1724724
Hi Stephen,

On 2017/9/1 2:32, Stephen Boyd wrote:
> On 08/29, Leo Yan wrote:
>> From: Dmitry Shmidt <dimitrysh@google.com>
>>
>> This patch is to add watchdog binding for Hi6220 on Hikey board.
>>
>> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
>> ---
> 
> This will go through arm-soc?
> 

Can you pick up it for v4.14?
Otherwise I am fine to pick up it and queue for v4.15.
Thanks!

Best Regards,
Wei

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


#1725332 — Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog

FromStephen Boyd <sboyd@codeaurora.org>
Date2017-09-01 22:30 +0200
SubjectRe: [PATCH 2/2] arm64: dts: hi6220: enable watchdog
Message-ID<ul0JH-1AL-19@gated-at.bofh.it>
In reply to#1724956
On 09/01, Wei Xu wrote:
> Hi Stephen,
> 
> On 2017/9/1 2:32, Stephen Boyd wrote:
> > On 08/29, Leo Yan wrote:
> >> From: Dmitry Shmidt <dimitrysh@google.com>
> >>
> >> This patch is to add watchdog binding for Hi6220 on Hikey board.
> >>
> >> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
> >> ---
> > 
> > This will go through arm-soc?
> > 
> 
> Can you pick up it for v4.14?
> Otherwise I am fine to pick up it and queue for v4.15.

Sounds like it will go for v4.15. Otherwise, you can send it to
arm-soc with the raw number instead of #define number and then
fix it up to use the #define later.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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


#1725964 — Re: [PATCH 2/2] arm64: dts: hi6220: enable watchdog

FromWei Xu <xuwei5@hisilicon.com>
Date2017-09-04 11:30 +0200
SubjectRe: [PATCH 2/2] arm64: dts: hi6220: enable watchdog
Message-ID<ulVRE-3IJ-5@gated-at.bofh.it>
In reply to#1725332
Hi Stephen,

On 2017/9/1 21:28, Stephen Boyd wrote:
> On 09/01, Wei Xu wrote:
>> Hi Stephen,
>>
>> On 2017/9/1 2:32, Stephen Boyd wrote:
>>> On 08/29, Leo Yan wrote:
>>>> From: Dmitry Shmidt <dimitrysh@google.com>
>>>>
>>>> This patch is to add watchdog binding for Hi6220 on Hikey board.
>>>>
>>>> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
>>>> ---
>>>
>>> This will go through arm-soc?
>>>
>>
>> Can you pick up it for v4.14?
>> Otherwise I am fine to pick up it and queue for v4.15.
> 
> Sounds like it will go for v4.15. Otherwise, you can send it to
> arm-soc with the raw number instead of #define number and then
> fix it up to use the #define later.
> 

I did not get your meaning.
Do you mean the "HI6220_WDT0/1/2_PCLK" in the patch 1 that
we need to replace with raw number?
They are already in the mainline.

Best Regards,
Wei

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


#1724719

FromStephen Boyd <sboyd@codeaurora.org>
Date2017-09-01 03:40 +0200
Message-ID<ukJ6a-5dR-9@gated-at.bofh.it>
In reply to#1722204
On 08/29, Leo Yan wrote:
> The old code uses tcxo (19.2MHz) as watchdog clock but actually the
> watchdog uses 32K clock, as result the watchdog timeout cannot be set
> correctly and delay long time to reset SoC.
> 
> So this patch is to use 'ref32k' as clock source for watchdog.
> 
> Fixes: 72ea48610d43 ("clk: hi6220: Clock driver support for Hisilicon hi6220 SoC")
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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


#1724743

FromLeo Yan <leo.yan@linaro.org>
Date2017-09-01 04:20 +0200
Message-ID<ukJIR-5QP-3@gated-at.bofh.it>
In reply to#1724719
On Thu, Aug 31, 2017 at 06:32:40PM -0700, Stephen Boyd wrote:
> On 08/29, Leo Yan wrote:
> > The old code uses tcxo (19.2MHz) as watchdog clock but actually the
> > watchdog uses 32K clock, as result the watchdog timeout cannot be set
> > correctly and delay long time to reset SoC.
> > 
> > So this patch is to use 'ref32k' as clock source for watchdog.
> > 
> > Fixes: 72ea48610d43 ("clk: hi6220: Clock driver support for Hisilicon hi6220 SoC")
> > Signed-off-by: Leo Yan <leo.yan@linaro.org>
> > ---
> 
> Applied to clk-next

Thanks, Stephen.

> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web