mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: 周琰杰 <zhouyanjie@wanyeetech.com>
Cc: sboyd@kernel.org, robh+dt@kernel.org, mturquette@baylibre.com,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, dongsheng.qiu@ingenic.com,
	aric.pzqi@ingenic.com, rick.tyliu@ingenic.com,
	yanfei.li@ingenic.com, sernia.zhou@foxmail.com,
	zhenwenjin@gmail.com
Subject: Re: [PATCH 1/4] clk: JZ4780: Add function for disable the second core.
Date: Wed, 02 Dec 2020 22:21:40 +0000	[thread overview]
Message-ID: <4SGQKQ.DVCN1X7ZWNK81@crapouillou.net> (raw)
In-Reply-To: <20201125172618.112707-2-zhouyanjie@wanyeetech.com>

Hi,

Le jeu. 26 nov. 2020 à 1:26, 周琰杰 (Zhou Yanjie) 
<zhouyanjie@wanyeetech.com> a écrit :
> Add "jz4780_core1_disable()" for disable the second core of JZ4780,
> prepare for later commits.
> 
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>

Reviewed-by: Paul Cercueil <paul@crapouillou.net>

Stephen: this patch can be merged independently of the others.

Cheers,
-Paul

> ---
>  drivers/clk/ingenic/jz4780-cgu.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/drivers/clk/ingenic/jz4780-cgu.c 
> b/drivers/clk/ingenic/jz4780-cgu.c
> index 0268d23..dcca74e 100644
> --- a/drivers/clk/ingenic/jz4780-cgu.c
> +++ b/drivers/clk/ingenic/jz4780-cgu.c
> @@ -252,8 +252,29 @@ static int jz4780_core1_enable(struct clk_hw *hw)
>  	return 0;
>  }
> 
> +static void jz4780_core1_disable(struct clk_hw *hw)
> +{
> +	struct ingenic_clk *ingenic_clk = to_ingenic_clk(hw);
> +	struct ingenic_cgu *cgu = ingenic_clk->cgu;
> +	unsigned long flags;
> +	u32 lcr, clkgr1;
> +
> +	spin_lock_irqsave(&cgu->lock, flags);
> +
> +	lcr = readl(cgu->base + CGU_REG_LCR);
> +	lcr |= LCR_PD_SCPU;
> +	writel(lcr, cgu->base + CGU_REG_LCR);
> +
> +	clkgr1 = readl(cgu->base + CGU_REG_CLKGR1);
> +	clkgr1 |= CLKGR1_CORE1;
> +	writel(clkgr1, cgu->base + CGU_REG_CLKGR1);
> +
> +	spin_unlock_irqrestore(&cgu->lock, flags);
> +}
> +
>  static const struct clk_ops jz4780_core1_ops = {
>  	.enable = jz4780_core1_enable,
> +	.disable = jz4780_core1_disable,
>  };
> 
>  static const s8 pll_od_encoding[16] = {
> --
> 2.7.4
> 



  reply	other threads:[~2020-12-02 22:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 17:26 [PATCH 0/4] Add new clocks for Ingenic SoCs 周琰杰 (Zhou Yanjie)
2020-11-25 17:26 ` [PATCH 1/4] clk: JZ4780: Add function for disable the second core 周琰杰 (Zhou Yanjie)
2020-12-02 22:21   ` Paul Cercueil [this message]
2020-11-25 17:26 ` [PATCH 2/4] dt-bindings: clock: Add missing clocks for Ingenic SoCs 周琰杰 (Zhou Yanjie)
2020-12-02 22:19   ` Paul Cercueil
2020-12-08 16:05   ` Rob Herring
2020-11-25 17:26 ` [PATCH 3/4] clk: Ingenic: " 周琰杰 (Zhou Yanjie)
2020-12-02 22:18   ` Paul Cercueil
2020-12-05 15:11     ` Zhou Yanjie
2020-11-25 17:26 ` [PATCH 4/4] clk: Ingenic: Fill unused bits in parents and reformat code 周琰杰 (Zhou Yanjie)
2020-12-02 22:09   ` Paul Cercueil
2020-12-05 14:53     ` Zhou Yanjie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4SGQKQ.DVCN1X7ZWNK81@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=aric.pzqi@ingenic.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dongsheng.qiu@ingenic.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rick.tyliu@ingenic.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sernia.zhou@foxmail.com \
    --cc=yanfei.li@ingenic.com \
    --cc=zhenwenjin@gmail.com \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®