From: Tomasz Figa <tomasz.figa@gmail.com>
To: Yadwinder Singh Brar <yadi.brar@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com,
mturquette@linaro.org, thomas.abraham@linaro.org,
dianders@chromium.org, t.figa@samsung.com,
vikas.sajjan@linaro.org, abrestic@chromium.org
Subject: Re: [PATCH v6 1/7] clk: samsung: Introduce a common samsung_clk_pll struct
Date: Wed, 19 Jun 2013 19:03:14 +0200 [thread overview]
Message-ID: <1908178.4JyHYaLBHM@flatron> (raw)
In-Reply-To: <1370870659-10929-2-git-send-email-yadi.brar@samsung.com>
On Monday 10 of June 2013 18:54:13 Yadwinder Singh Brar wrote:
> This patch unifies clk strutures used for PLL35xx & PLL36xx and
> adding an extra member lock_reg, so that common code can be factored
> out.
>
> Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
> ---
> drivers/clk/samsung/clk-pll.c | 30 ++++++++++++------------------
> 1 files changed, 12 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-pll.c
> b/drivers/clk/samsung/clk-pll.c index 89135f6..8224bde 100644
> --- a/drivers/clk/samsung/clk-pll.c
> +++ b/drivers/clk/samsung/clk-pll.c
> @@ -13,6 +13,14 @@
> #include "clk.h"
> #include "clk-pll.h"
>
> +struct samsung_clk_pll {
> + struct clk_hw hw;
> + void __iomem *lock_reg;
> + void __iomem *con_reg;
> +};
> +
> +#define to_clk_pll(_hw) container_of(_hw, struct samsung_clk_pll, hw)
> +
> /*
> * PLL35xx Clock Type
> */
> @@ -24,17 +32,10 @@
> #define PLL35XX_PDIV_SHIFT (8)
> #define PLL35XX_SDIV_SHIFT (0)
>
> -struct samsung_clk_pll35xx {
> - struct clk_hw hw;
> - const void __iomem *con_reg;
> -};
> -
> -#define to_clk_pll35xx(_hw) container_of(_hw, struct
> samsung_clk_pll35xx, hw) -
> static unsigned long samsung_pll35xx_recalc_rate(struct clk_hw *hw,
> unsigned long parent_rate)
> {
> - struct samsung_clk_pll35xx *pll = to_clk_pll35xx(hw);
> + struct samsung_clk_pll *pll = to_clk_pll(hw);
> u32 mdiv, pdiv, sdiv, pll_con;
> u64 fvco = parent_rate;
>
> @@ -56,7 +57,7 @@ static const struct clk_ops samsung_pll35xx_clk_ops =
> { struct clk * __init samsung_clk_register_pll35xx(const char *name,
> const char *pname, const void __iomem *con_reg)
> {
> - struct samsung_clk_pll35xx *pll;
> + struct samsung_clk_pll *pll;
> struct clk *clk;
> struct clk_init_data init;
>
> @@ -100,17 +101,10 @@ struct clk * __init
> samsung_clk_register_pll35xx(const char *name, #define
> PLL36XX_PDIV_SHIFT (8)
> #define PLL36XX_SDIV_SHIFT (0)
>
> -struct samsung_clk_pll36xx {
> - struct clk_hw hw;
> - const void __iomem *con_reg;
> -};
> -
> -#define to_clk_pll36xx(_hw) container_of(_hw, struct
> samsung_clk_pll36xx, hw) -
> static unsigned long samsung_pll36xx_recalc_rate(struct clk_hw *hw,
> unsigned long parent_rate)
> {
> - struct samsung_clk_pll36xx *pll = to_clk_pll36xx(hw);
> + struct samsung_clk_pll *pll = to_clk_pll(hw);
> u32 mdiv, pdiv, sdiv, kdiv, pll_con0, pll_con1;
> u64 fvco = parent_rate;
>
> @@ -135,7 +129,7 @@ static const struct clk_ops samsung_pll36xx_clk_ops
> = { struct clk * __init samsung_clk_register_pll36xx(const char *name,
> const char *pname, const void __iomem *con_reg)
> {
> - struct samsung_clk_pll36xx *pll;
> + struct samsung_clk_pll *pll;
> struct clk *clk;
> struct clk_init_data init;
Looks good to me.
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Best regards,
Tomasz
WARNING: multiple messages have this Message-ID (diff)
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/7] clk: samsung: Introduce a common samsung_clk_pll struct
Date: Wed, 19 Jun 2013 19:03:14 +0200 [thread overview]
Message-ID: <1908178.4JyHYaLBHM@flatron> (raw)
In-Reply-To: <1370870659-10929-2-git-send-email-yadi.brar@samsung.com>
On Monday 10 of June 2013 18:54:13 Yadwinder Singh Brar wrote:
> This patch unifies clk strutures used for PLL35xx & PLL36xx and
> adding an extra member lock_reg, so that common code can be factored
> out.
>
> Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
> ---
> drivers/clk/samsung/clk-pll.c | 30 ++++++++++++------------------
> 1 files changed, 12 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-pll.c
> b/drivers/clk/samsung/clk-pll.c index 89135f6..8224bde 100644
> --- a/drivers/clk/samsung/clk-pll.c
> +++ b/drivers/clk/samsung/clk-pll.c
> @@ -13,6 +13,14 @@
> #include "clk.h"
> #include "clk-pll.h"
>
> +struct samsung_clk_pll {
> + struct clk_hw hw;
> + void __iomem *lock_reg;
> + void __iomem *con_reg;
> +};
> +
> +#define to_clk_pll(_hw) container_of(_hw, struct samsung_clk_pll, hw)
> +
> /*
> * PLL35xx Clock Type
> */
> @@ -24,17 +32,10 @@
> #define PLL35XX_PDIV_SHIFT (8)
> #define PLL35XX_SDIV_SHIFT (0)
>
> -struct samsung_clk_pll35xx {
> - struct clk_hw hw;
> - const void __iomem *con_reg;
> -};
> -
> -#define to_clk_pll35xx(_hw) container_of(_hw, struct
> samsung_clk_pll35xx, hw) -
> static unsigned long samsung_pll35xx_recalc_rate(struct clk_hw *hw,
> unsigned long parent_rate)
> {
> - struct samsung_clk_pll35xx *pll = to_clk_pll35xx(hw);
> + struct samsung_clk_pll *pll = to_clk_pll(hw);
> u32 mdiv, pdiv, sdiv, pll_con;
> u64 fvco = parent_rate;
>
> @@ -56,7 +57,7 @@ static const struct clk_ops samsung_pll35xx_clk_ops =
> { struct clk * __init samsung_clk_register_pll35xx(const char *name,
> const char *pname, const void __iomem *con_reg)
> {
> - struct samsung_clk_pll35xx *pll;
> + struct samsung_clk_pll *pll;
> struct clk *clk;
> struct clk_init_data init;
>
> @@ -100,17 +101,10 @@ struct clk * __init
> samsung_clk_register_pll35xx(const char *name, #define
> PLL36XX_PDIV_SHIFT (8)
> #define PLL36XX_SDIV_SHIFT (0)
>
> -struct samsung_clk_pll36xx {
> - struct clk_hw hw;
> - const void __iomem *con_reg;
> -};
> -
> -#define to_clk_pll36xx(_hw) container_of(_hw, struct
> samsung_clk_pll36xx, hw) -
> static unsigned long samsung_pll36xx_recalc_rate(struct clk_hw *hw,
> unsigned long parent_rate)
> {
> - struct samsung_clk_pll36xx *pll = to_clk_pll36xx(hw);
> + struct samsung_clk_pll *pll = to_clk_pll(hw);
> u32 mdiv, pdiv, sdiv, kdiv, pll_con0, pll_con1;
> u64 fvco = parent_rate;
>
> @@ -135,7 +129,7 @@ static const struct clk_ops samsung_pll36xx_clk_ops
> = { struct clk * __init samsung_clk_register_pll36xx(const char *name,
> const char *pname, const void __iomem *con_reg)
> {
> - struct samsung_clk_pll36xx *pll;
> + struct samsung_clk_pll *pll;
> struct clk *clk;
> struct clk_init_data init;
Looks good to me.
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Best regards,
Tomasz
next prev parent reply other threads:[~2013-06-19 17:03 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 13:24 [PATCH v6 0/7] Add generic set_rate clk_ops for PLL35xx and PLL36xx for samsung SoCs Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-10 13:24 ` [PATCH v6 1/7] clk: samsung: Introduce a common samsung_clk_pll struct Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-19 17:03 ` Tomasz Figa [this message]
2013-06-19 17:03 ` Tomasz Figa
2013-06-10 13:24 ` [PATCH v6 2/7] clk: samsung: Define a common samsung_clk_register_pll() Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-19 16:54 ` Tomasz Figa
2013-06-19 16:54 ` Tomasz Figa
2013-06-19 18:14 ` Yadwinder Singh Brar
2013-06-19 18:14 ` Yadwinder Singh Brar
2013-06-19 18:21 ` Tomasz Figa
2013-06-19 18:21 ` Tomasz Figa
2013-06-10 13:24 ` [PATCH v6 3/7] clk: samsung: Add support to register rate_table for samsung plls Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-19 17:00 ` Tomasz Figa
2013-06-19 17:00 ` Tomasz Figa
2013-06-10 13:24 ` [PATCH v6 4/7] clk: samsung: Add set_rate() clk_ops for PLL35xx Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-19 17:02 ` Tomasz Figa
2013-06-19 17:02 ` Tomasz Figa
2013-06-10 13:24 ` [PATCH v6 5/7] clk: samsung: Add set_rate() clk_ops for PLL36xx Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-19 17:05 ` Tomasz Figa
2013-06-19 17:05 ` Tomasz Figa
2013-06-10 13:24 ` [PATCH v6 6/7] clk: samsung: Reorder MUX registration for mout_vpllsrc Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-19 17:05 ` Tomasz Figa
2013-06-19 17:05 ` Tomasz Figa
2013-06-10 13:24 ` [PATCH v6 7/7] clk: samsung: Add EPLL and VPLL freq table for exynos5250 SoC Yadwinder Singh Brar
2013-06-10 13:24 ` Yadwinder Singh Brar
2013-06-19 17:13 ` Tomasz Figa
2013-06-19 17:13 ` Tomasz Figa
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=1908178.4JyHYaLBHM@flatron \
--to=tomasz.figa@gmail.com \
--cc=abrestic@chromium.org \
--cc=dianders@chromium.org \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=t.figa@samsung.com \
--cc=thomas.abraham@linaro.org \
--cc=vikas.sajjan@linaro.org \
--cc=yadi.brar@samsung.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 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.