From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V9 1/4] ARM: clk: imx: update pllv3 to support imx7
Date: Mon, 18 May 2015 19:58:42 +0800 [thread overview]
Message-ID: <20150518115842.GF1071@dragon> (raw)
In-Reply-To: <1431376208-474-2-git-send-email-Frank.Li@freescale.com>
On Tue, May 12, 2015 at 04:30:05AM +0800, Frank.Li at freescale.com wrote:
> From: Frank Li <Frank.Li@freescale.com>
>
> Add type IMX_PLLV3_ENET_MX7
IMX7 instead of MX7.
>
> Signed-off-by: Frank Li <Frank.Li@freescale.com>
> ---
> drivers/clk/imx/clk-pllv3.c | 9 ++++++++-
> drivers/clk/imx/clk.h | 1 +
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
> index 641ebc5..95e99dc 100644
> --- a/drivers/clk/imx/clk-pllv3.c
> +++ b/drivers/clk/imx/clk-pllv3.c
> @@ -24,12 +24,14 @@
>
> #define BM_PLL_POWER (0x1 << 12)
> #define BM_PLL_LOCK (0x1 << 31)
> +#define ENET_PLL_POWER (0x1 << 5)
IMX7_ENET_PLL_POWER for better?
Shawn
>
> /**
> * struct clk_pllv3 - IMX PLL clock version 3
> * @clk_hw: clock source
> * @base: base address of PLL registers
> * @powerup_set: set POWER bit to power up the PLL
> + * @powerdown: pll powerdown offset bit
> * @div_mask: mask of divider bits
> * @div_shift: shift of divider bits
> *
> @@ -40,6 +42,7 @@ struct clk_pllv3 {
> struct clk_hw hw;
> void __iomem *base;
> bool powerup_set;
> + u32 powerdown;
> u32 div_mask;
> u32 div_shift;
> };
> @@ -49,7 +52,7 @@ struct clk_pllv3 {
> static int clk_pllv3_wait_lock(struct clk_pllv3 *pll)
> {
> unsigned long timeout = jiffies + msecs_to_jiffies(10);
> - u32 val = readl_relaxed(pll->base) & BM_PLL_POWER;
> + u32 val = readl_relaxed(pll->base) & pll->powerdown;
>
> /* No need to wait for lock when pll is not powered up */
> if ((pll->powerup_set && !val) || (!pll->powerup_set && val))
> @@ -293,6 +296,8 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
> if (!pll)
> return ERR_PTR(-ENOMEM);
>
> + pll->powerdown = BM_PLL_POWER;
> +
> switch (type) {
> case IMX_PLLV3_SYS:
> ops = &clk_pllv3_sys_ops;
> @@ -306,6 +311,8 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
> case IMX_PLLV3_AV:
> ops = &clk_pllv3_av_ops;
> break;
> + case IMX_PLLV3_ENET_MX7:
> + pll->powerdown = ENET_PLL_POWER;
> case IMX_PLLV3_ENET:
> ops = &clk_pllv3_enet_ops;
> break;
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> index 6bae537..bc06c8e 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -39,6 +39,7 @@ enum imx_pllv3_type {
> IMX_PLLV3_USB_VF610,
> IMX_PLLV3_AV,
> IMX_PLLV3_ENET,
> + IMX_PLLV3_ENET_MX7,
> };
>
> struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2015-05-18 11:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 20:30 [PATCH V9 0/4] Add Freescale i.mx7d support Frank.Li at freescale.com
2015-05-11 20:30 ` [PATCH V9 1/4] ARM: clk: imx: update pllv3 to support imx7 Frank.Li at freescale.com
2015-05-18 11:58 ` Shawn Guo [this message]
2015-05-11 20:30 ` [PATCH V9 2/4] ARM: imx: add imx7d clk tree support Frank.Li at freescale.com
2015-05-18 12:13 ` Shawn Guo
2015-05-11 20:30 ` [PATCH V9 3/4] ARM: dts: add imx7d soc dtsi file Frank.Li at freescale.com
2015-05-11 20:30 ` [PATCH V9 4/4] ARM: dts: add imx7d-sdb support Frank.Li at freescale.com
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=20150518115842.GF1071@dragon \
--to=shawnguo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.