From: Mike Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Tushar Behera <tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
dianders-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
trblinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Shaik Ameer Basha
<shaik.ameer-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH 1/3] clk: exynos-audss: Keep the parent of mout_audss always enabled
Date: Wed, 11 Jun 2014 09:50:27 -0700 [thread overview]
Message-ID: <20140611165027.6562.64928@quantum> (raw)
In-Reply-To: <1402464739-19044-2-git-send-email-tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Quoting Tushar Behera (2014-06-10 22:32:17)
> When the output clock of AUDSS mux is disabled, we are getting kernel
> oops while doing a clk_get() on other clocks provided by AUDSS. Though
> user manual doesn't specify this dependency, we came across this issue
> while disabling the parent of AUDSS mux clocks.
Hi Tushar,
Can you help me understand better what the actual problem is? What is
the root cause of the kernel oops?
You mention calling clk_get on child clocks of the AUDSS mux fails, but
I cannot imagine why. How can the enable/disable state of a clock affect
the ability to clk_get other clocks?
Regards,
Mike
>
> Keeping the parents of AUDSS mux always enabled fixes this issue.
>
> Signed-off-by: Tushar Behera <tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Shaik Ameer Basha <shaik.ameer-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
> drivers/clk/samsung/clk-exynos-audss.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
> index 13eae14c..1542f30 100644
> --- a/drivers/clk/samsung/clk-exynos-audss.c
> +++ b/drivers/clk/samsung/clk-exynos-audss.c
> @@ -30,6 +30,8 @@ static struct clk **clk_table;
> static void __iomem *reg_base;
> static struct clk_onecell_data clk_data;
>
> +static struct clk *pll_ref, *pll_in;
> +
> #define ASS_CLK_SRC 0x0
> #define ASS_CLK_DIV 0x4
> #define ASS_CLK_GATE 0x8
> @@ -83,7 +85,7 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
> const char *mout_audss_p[] = {"fin_pll", "fout_epll"};
> const char *mout_i2s_p[] = {"mout_audss", "cdclk0", "sclk_audio0"};
> const char *sclk_pcm_p = "sclk_pcm0";
> - struct clk *pll_ref, *pll_in, *cdclk, *sclk_audio, *sclk_pcm_in;
> + struct clk *cdclk, *sclk_audio, *sclk_pcm_in;
> const struct of_device_id *match;
> enum exynos_audss_clk_type variant;
>
> @@ -113,10 +115,14 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
>
> pll_ref = devm_clk_get(&pdev->dev, "pll_ref");
> pll_in = devm_clk_get(&pdev->dev, "pll_in");
> - if (!IS_ERR(pll_ref))
> + if (!IS_ERR(pll_ref)) {
> mout_audss_p[0] = __clk_get_name(pll_ref);
> - if (!IS_ERR(pll_in))
> + clk_prepare_enable(pll_ref);
> + }
> + if (!IS_ERR(pll_in)) {
> mout_audss_p[1] = __clk_get_name(pll_in);
> + clk_prepare_enable(pll_in);
> + }
> clk_table[EXYNOS_MOUT_AUDSS] = clk_register_mux(NULL, "mout_audss",
> mout_audss_p, ARRAY_SIZE(mout_audss_p),
> CLK_SET_RATE_NO_REPARENT,
> @@ -217,6 +223,11 @@ static int exynos_audss_clk_remove(struct platform_device *pdev)
> clk_unregister(clk_table[i]);
> }
>
> + if (!IS_ERR(pll_in))
> + clk_disable_unprepare(pll_in);
> + if (!IS_ERR(pll_ref))
> + clk_disable_unprepare(pll_ref);
> +
> return 0;
> }
>
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-06-11 16:50 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 5:32 [PATCH 0/3] Fix boot-hang on Peach-pit and Enable audio Tushar Behera
2014-06-11 5:32 ` [PATCH 1/3] clk: exynos-audss: Keep the parent of mout_audss always enabled Tushar Behera
2014-06-11 15:58 ` Javier Martinez Canillas
[not found] ` <1402464739-19044-2-git-send-email-tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-06-11 16:50 ` Mike Turquette [this message]
2014-06-12 7:29 ` Tushar Behera
2014-06-12 21:09 ` Mike Turquette
2014-07-11 6:18 ` Tushar Behera
2014-07-29 6:58 ` Mike Turquette
2014-06-11 16:50 ` Kevin Hilman
2014-06-12 7:40 ` Tushar Behera
2014-06-24 22:59 ` Doug Anderson
2014-06-25 3:09 ` Tushar Behera
2014-06-25 4:02 ` Doug Anderson
2014-06-11 17:28 ` Tomasz Figa
2014-06-12 7:30 ` Tushar Behera
2014-06-11 5:32 ` [PATCH 2/3] ARM: dts: Update the parent for Audss clocks in Exynos5420 Tushar Behera
2014-06-11 15:58 ` Javier Martinez Canillas
2014-06-16 11:26 ` Tushar Behera
2014-06-22 15:53 ` Tushar Behera
2014-06-24 23:00 ` Doug Anderson
2014-06-25 23:21 ` Kevin Hilman
2014-06-26 3:20 ` Tushar Behera
2014-06-26 16:08 ` Kevin Hilman
2014-06-27 3:38 ` Tushar Behera
2014-06-27 14:18 ` Kevin Hilman
2014-06-27 14:48 ` Kevin Hilman
2014-07-01 11:59 ` Tushar Behera
2014-07-07 23:34 ` Kukjin Kim
2014-07-08 3:00 ` Tushar Behera
2014-07-09 10:14 ` Javier Martinez Canillas
2014-07-09 12:11 ` Tushar Behera
[not found] ` <53BD3157.7030804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-09 13:03 ` Javier Martinez Canillas
2014-07-09 16:01 ` Doug Anderson
2014-07-09 17:46 ` Javier Martinez Canillas
[not found] ` <CABxcv==v9whax3oraJQnTiDwfAUznjQP6WHK-auPv3q-LOmdnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-09 17:52 ` Doug Anderson
[not found] ` <1402464739-19044-1-git-send-email-tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-06-11 5:32 ` [PATCH 3/3] ARM: dts: Enable audio support for Peach-pi board Tushar Behera
2014-06-13 17:03 ` Doug Anderson
2014-06-13 17:05 ` Mark Brown
2014-06-13 17:13 ` Doug Anderson
[not found] ` <CAD=FV=VvkvH1TPiKttm9VXbBRnBo7kmTVK8bZZvexK=bAvaO4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-13 21:58 ` Doug Anderson
2014-06-13 22:04 ` Mark Brown
[not found] ` <20140613220421.GD5099-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-06-13 22:50 ` Doug Anderson
2014-06-16 11:19 ` Tushar Behera
[not found] ` <539ED2C0.8030405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-16 16:49 ` Doug Anderson
2014-06-16 16:51 ` Mark Brown
2014-06-16 17:02 ` Doug Anderson
2014-06-17 3:39 ` Tushar Behera
2014-06-17 3:36 ` Tushar Behera
2014-06-17 4:07 ` Doug Anderson
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=20140611165027.6562.64928@quantum \
--to=mturquette-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dianders-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=shaik.ameer-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=trblinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tushar.b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.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).