linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Turquette <mturquette@baylibre.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	"Thomas Abraham" <thomas.ab@samsung.com>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Kukjin Kim" <kgene.kim@samsung.com>,
	"Kukjin Kim" <kgene@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Krzysztof Kozlowski" <k.kozlowski@samsung.com>
Cc: "Tomasz Figa" <tomasz.figa@gmail.com>,
	"Lukasz Majewski" <l.majewski@samsung.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Kevin Hilman" <khilman@linaro.org>,
	"Javier Martinez Canillas" <javier@dowhile0.org>,
	"Tobias Jakobi" <tjakobi@math.uni-bielefeld.de>,
	"Anand Moon" <linux.amoon@gmail.com>,
	linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com
Subject: Re: [PATCH v4 2/6] clk: samsung: exynos4x12: add cpu clock configuration data and instantiate cpu clock
Date: Tue, 25 Aug 2015 11:40:13 -0700	[thread overview]
Message-ID: <20150825184013.31346.67214@quantum> (raw)
In-Reply-To: <1438868514-8814-3-git-send-email-b.zolnierkie@samsung.com>

Quoting Bartlomiej Zolnierkiewicz (2015-08-06 06:41:50)
> With the addition of the new Samsung specific cpu-clock type, the
> arm clock can be represented as a cpu-clock type. Add the CPU clock
> configuration data and instantiate the CPU clock type for Exynos4x12.
> =

> Based on the earlier work by Thomas Abraham.
> =

> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Acked-by: Michael Turquette <mturquette@baylibre.com>

> ---
>  drivers/clk/samsung/clk-exynos4.c | 50 +++++++++++++++++++++++++++++++++=
++++++
>  1 file changed, 50 insertions(+)
> =

> diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-=
exynos4.c
> index 251f48d..7f370d3 100644
> --- a/drivers/clk/samsung/clk-exynos4.c
> +++ b/drivers/clk/samsung/clk-exynos4.c
> @@ -1398,6 +1398,45 @@ static const struct exynos_cpuclk_cfg_data e4210_a=
rmclk_d[] __initconst =3D {
>         {  0 },
>  };
>  =

> +static const struct exynos_cpuclk_cfg_data e4212_armclk_d[] __initconst =
=3D {
> +       { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6)=
, },
> +       { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6)=
, },
> +       { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5)=
, },
> +       { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5)=
, },
> +       { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4210_CPU_DIV1(2, 4)=
, },
> +       { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4210_CPU_DIV1(2, 4)=
, },
> +       {  900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3)=
, },
> +       {  800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3)=
, },
> +       {  700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3)=
, },
> +       {  600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3)=
, },
> +       {  500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3)=
, },
> +       {  400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3)=
, },
> +       {  300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4210_CPU_DIV1(2, 3)=
, },
> +       {  200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4210_CPU_DIV1(2, 3)=
, },
> +       {  0 },
> +};
> +
> +#define E4412_CPU_DIV1(cores, hpm, copy)                               \
> +               (((cores) << 8) | ((hpm) << 4) | ((copy) << 0))
> +
> +static const struct exynos_cpuclk_cfg_data e4412_armclk_d[] __initconst =
=3D {
> +       { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(7, 0,=
 6), },
> +       { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(6, 0,=
 6), },
> +       { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(6, 0,=
 5), },
> +       { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(5, 0,=
 5), },
> +       { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4412_CPU_DIV1(5, 0,=
 4), },
> +       { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4412_CPU_DIV1(4, 0,=
 4), },
> +       {  900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(4, 0,=
 3), },
> +       {  800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(3, 0,=
 3), },
> +       {  700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(3, 0,=
 3), },
> +       {  600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0,=
 3), },
> +       {  500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0,=
 3), },
> +       {  400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(1, 0,=
 3), },
> +       {  300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4412_CPU_DIV1(1, 0,=
 3), },
> +       {  200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4412_CPU_DIV1(0, 0,=
 3), },
> +       {  0 },
> +};
> +
>  /* register exynos4 clocks */
>  static void __init exynos4_clk_init(struct device_node *np,
>                                     enum exynos4_soc soc)
> @@ -1491,6 +1530,17 @@ static void __init exynos4_clk_init(struct device_=
node *np,
>                 samsung_clk_register_fixed_factor(ctx,
>                         exynos4x12_fixed_factor_clks,
>                         ARRAY_SIZE(exynos4x12_fixed_factor_clks));
> +               if (of_machine_is_compatible("samsung,exynos4412")) {
> +                       exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armc=
lk",
> +                               mout_core_p4x12[0], mout_core_p4x12[1], 0=
x14200,
> +                               e4412_armclk_d, ARRAY_SIZE(e4412_armclk_d=
),
> +                               CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS=
_DIV1);
> +               } else {
> +                       exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armc=
lk",
> +                               mout_core_p4x12[0], mout_core_p4x12[1], 0=
x14200,
> +                               e4212_armclk_d, ARRAY_SIZE(e4212_armclk_d=
),
> +                               CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS=
_DIV1);
> +               }
>         }
>  =

>         samsung_clk_register_alias(ctx, exynos4_aliases,
> -- =

> 1.9.1
> =

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2015-08-25 18:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 13:41 [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Bartlomiej Zolnierkiewicz
2015-08-06 13:41 ` [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Bartlomiej Zolnierkiewicz
2015-08-07  3:41   ` Viresh Kumar
2015-08-07 10:34     ` Bartlomiej Zolnierkiewicz
2015-08-07 10:41       ` Viresh Kumar
2015-08-07 11:12         ` Bartlomiej Zolnierkiewicz
2015-08-07 11:37           ` Viresh Kumar
2015-08-07 22:21             ` Rafael J. Wysocki
2015-08-08  2:06               ` Viresh Kumar
2015-08-06 13:41 ` [PATCH v4 2/6] clk: samsung: exynos4x12: add cpu clock configuration data and instantiate cpu clock Bartlomiej Zolnierkiewicz
2015-08-25 18:40   ` Michael Turquette [this message]
2015-08-06 13:41 ` [PATCH v4 3/6] ARM: dts: Exynos4x12: add CPU OPP and regulator supply property Bartlomiej Zolnierkiewicz
2015-08-06 13:41 ` [PATCH v4 4/6] ARM: Exynos: switch to using generic cpufreq driver for Exynos4x12 Bartlomiej Zolnierkiewicz
2015-08-06 13:41 ` [PATCH v4 5/6] cpufreq: exynos: remove Exynos4x12 specific cpufreq driver support Bartlomiej Zolnierkiewicz
2015-08-06 13:41 ` [PATCH v4 6/6] cpufreq: remove no longer needed CPU_FREQ_BOOST_SW config option Bartlomiej Zolnierkiewicz
2015-08-07  4:31   ` Viresh Kumar
2015-08-06 23:53 ` [PATCH v4 0/6] cpufreq: use generic cpufreq drivers for Exynos4x12 platform Kukjin Kim
2015-08-07  3:50   ` Viresh Kumar
2015-08-07  3:51     ` Viresh Kumar
2015-08-07  4:13       ` Krzysztof Kozlowski
2015-08-07  4:30         ` Viresh Kumar
2015-08-07  4:52           ` Krzysztof Kozlowski
2015-08-07  5:18             ` Viresh Kumar
2015-08-07 11:31               ` Bartlomiej Zolnierkiewicz
2015-08-07 11:39                 ` Viresh Kumar
2015-08-07 11:47                   ` Bartlomiej Zolnierkiewicz
2015-08-07 11:56                     ` Viresh Kumar
2015-08-07 22:24                       ` Rafael J. Wysocki
2015-08-08  2:07                         ` Viresh Kumar
2015-08-08  7:27                           ` Krzysztof Kozlowski
2015-08-08 13:59                             ` Viresh Kumar
2015-08-10  1:27                             ` Kukjin Kim
2015-08-11  2:20                               ` Krzysztof Kozlowski
2015-08-11  7:51                                 ` Kukjin Kim

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=20150825184013.31346.67214@quantum \
    --to=mturquette@baylibre.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=heiko@sntech.de \
    --cc=javier@dowhile0.org \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=khilman@linaro.org \
    --cc=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=s.nawrocki@samsung.com \
    --cc=thomas.ab@samsung.com \
    --cc=tjakobi@math.uni-bielefeld.de \
    --cc=tomasz.figa@gmail.com \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).