All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-clk@vger.kernel.org,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	"Sylwester Nawrocki" <snawrocki@kernel.org>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Bartłomiej Żołnierkiewicz" <b.zolnierkie@samsung.com>
Subject: Re: [PATCH 2/2] clk: samsung: exynos5433: Add suspend state for TOP, CPIF & PERIC CMUs
Date: Fri, 31 Aug 2018 08:38:22 +0200	[thread overview]
Message-ID: <CAJKOXPdw=WzHauLFjnrLrCRT==wRxe=r4Kg7EMaMKnVsCCXN7w@mail.gmail.com> (raw)
In-Reply-To: <20180829160013.9447-3-m.szyprowski@samsung.com>

On Wed, 29 Aug 2018 at 18:00, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> Before entering system suspend, one has to ensure that all TOP ACLK clocks
> are enabled, so do this by storing 0x67ECFFED value to ENABLE_ACLK_TOP
> register. In case of PERIC CMU, keep all UART PCLK and SCLK clocks as well
> as all GPIO PCLK clocks enabled.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos5433.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
> index 426980514e67..d34e645aba49 100644
> --- a/drivers/clk/samsung/clk-exynos5433.c
> +++ b/drivers/clk/samsung/clk-exynos5433.c
> @@ -177,6 +177,12 @@ static const unsigned long top_clk_regs[] __initconst = {
>         ENABLE_CMU_TOP_DIV_STAT,
>  };
>
> +static const struct samsung_clk_reg_dump top_suspend_regs[] = {
> +       { ENABLE_ACLK_TOP, 0x67ECFFED }, /* all clocks enabled */
> +       { ISP_PLL_CON0, 0x85CC0502 },   /* reset value + ENABLE bit */
> +       { AUD_PLL_CON0, 0x84830202 },   /* reset value + ENABLE bit */
> +};
> +
>  /* list of all parent clock list */
>  PNAME(mout_aud_pll_p)          = { "oscclk", "fout_aud_pll", };
>  PNAME(mout_isp_pll_p)          = { "oscclk", "fout_isp_pll", };
> @@ -792,6 +798,8 @@ static const struct samsung_cmu_info top_cmu_info __initconst = {
>         .nr_clk_ids             = TOP_NR_CLK,
>         .clk_regs               = top_clk_regs,
>         .nr_clk_regs            = ARRAY_SIZE(top_clk_regs),
> +       .suspend_regs           = top_suspend_regs,
> +       .nr_suspend_regs        = ARRAY_SIZE(top_suspend_regs),
>  };
>
>  static void __init exynos5433_cmu_top_init(struct device_node *np)
> @@ -822,6 +830,11 @@ static const unsigned long cpif_clk_regs[] __initconst = {
>         ENABLE_SCLK_CPIF,
>  };
>
> +static const struct samsung_clk_reg_dump cpif_suspend_regs[] = {
> +       { ENABLE_SCLK_CPIF, 0x3FF },    /* all clocks enabled */
> +       { MPHY_PLL_CON0, 0x81C70601 },  /* reset value + ENABLE bit */
> +};
> +
>  /* list of all parent clock list */
>  PNAME(mout_mphy_pll_p)         = { "oscclk", "fout_mphy_pll", };
>
> @@ -862,6 +875,8 @@ static const struct samsung_cmu_info cpif_cmu_info __initconst = {
>         .nr_clk_ids             = CPIF_NR_CLK,
>         .clk_regs               = cpif_clk_regs,
>         .nr_clk_regs            = ARRAY_SIZE(cpif_clk_regs),
> +       .suspend_regs           = cpif_suspend_regs,
> +       .nr_suspend_regs        = ARRAY_SIZE(cpif_suspend_regs),
>  };
>
>  static void __init exynos5433_cmu_cpif_init(struct device_node *np)
> @@ -1547,6 +1562,11 @@ static const unsigned long peric_clk_regs[] __initconst = {
>         ENABLE_IP_PERIC2,
>  };
>
> +static const struct samsung_clk_reg_dump peric_suspend_regs[] = {
> +       { ENABLE_PCLK_PERIC0, 0xE00FF000 },
> +       { ENABLE_SCLK_PERIC, 0x7 },

It would be nice to see comment about values here as well.

With that change:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

      parent reply	other threads:[~2018-08-31 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180829160021eucas1p10f21691116ac17ed9d226afe72b7de0b@eucas1p1.samsung.com>
2018-08-29 16:00 ` [PATCH 0/2] Prepare Exynos5433 clocks driver for system suspend/resume Marek Szyprowski
     [not found]   ` <CGME20180829160024eucas1p1049ff966800cdc44e876d546978df399@eucas1p1.samsung.com>
2018-08-29 16:00     ` [PATCH 1/2] clk: samsung: Use NOIRQ stage for Exynos5433 clocks suspend/resume Marek Szyprowski
2018-08-29 23:21       ` Chanwoo Choi
2018-08-30  6:29       ` Krzysztof Kozlowski
2018-08-30  9:59         ` Marek Szyprowski
2018-08-30 10:25           ` Krzysztof Kozlowski
2018-08-30 10:34             ` Marek Szyprowski
2018-08-30 10:45               ` Krzysztof Kozlowski
2018-08-30 11:12                 ` Marek Szyprowski
2018-08-30 13:01                   ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829160024eucas1p19b9912baece05c529f6bcf64b986bba9@eucas1p1.samsung.com>
2018-08-29 16:00     ` [PATCH 2/2] clk: samsung: exynos5433: Add suspend state for TOP, CPIF & PERIC CMUs Marek Szyprowski
2018-08-29 23:30       ` Chanwoo Choi
2018-08-31  6:38       ` Krzysztof Kozlowski [this message]

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='CAJKOXPdw=WzHauLFjnrLrCRT==wRxe=r4Kg7EMaMKnVsCCXN7w@mail.gmail.com' \
    --to=krzk@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=snawrocki@kernel.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.