devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Daniel Baluta <daniel.baluta@oss.nxp.com>,
	broonie@kernel.org, pierre-louis.bossart@linux.intel.com,
	lgirdwood@gmail.com, robh+dt@kernel.org,
	devicetree@vger.kernel.org
Cc: Daniel Baluta <daniel.baluta@nxp.com>,
	alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com,
	shawnguo@kernel.org, ranjani.sridharan@linux.intel.com,
	linux-kernel@vger.kernel.org, linux-imx@nxp.com,
	kernel@pengutronix.de, s-anna@ti.com, festevam@gmail.com
Subject: Re: [PATCH 1/2] ASoC: SOF: imx: Add code to manage DSP related clocks
Date: Thu, 2 Sep 2021 16:35:56 +0300	[thread overview]
Message-ID: <896baddd-5bd7-8f85-91c3-0a4498694d77@linux.intel.com> (raw)
In-Reply-To: <20210902123216.787025-2-daniel.baluta@oss.nxp.com>

Hi Daniel,

On 02/09/2021 15:32, Daniel Baluta wrote:
> From: Daniel Baluta <daniel.baluta@nxp.com>
> 
> There are two types of clocks:
> 	* DSP IP clocks
> 	* DAI clocks
> 
> This clocks are necessary in order to power up DSP and DAIs.
> 
> We choose to enable DAI clocks here because of the way i.MX8/i.MX8X
> design handles resources (including clocks).
> 
> All clocks are managed by a separate core (named SCU) which communicates
> with Linux managed ARM core via a well known API.
> 
> We parse and enable the clocks in probe function and disable them in
> remove function.
> 
> Future patches will introduce Power Management support so that we
> disable clocks while DSP is not used or system enters power save.

Unfortunately this patch does not apply to next.

I might be a bit too cautius, but I would also add "&& COMMON_CLK" for 
the COMPILE_TEST in Kconfig or select it from where it is appropriate?

> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
>   sound/soc/sof/imx/imx-common.c | 77 ++++++++++++++++++++++++++++++++++
>   sound/soc/sof/imx/imx-common.h | 16 +++++++
>   sound/soc/sof/imx/imx8.c       | 32 ++++++++++++++
>   sound/soc/sof/imx/imx8m.c      | 33 +++++++++++++++
>   4 files changed, 158 insertions(+)
> 
> diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
> index 30624fafc632..482c25ab15ce 100644
> --- a/sound/soc/sof/imx/imx8m.c
> +++ b/sound/soc/sof/imx/imx8m.c
> @@ -23,6 +23,20 @@
>   #define MBOX_OFFSET	0x800000
>   #define MBOX_SIZE	0x1000
>   
> +#define IMX8M_DSP_CLK_NUM	3
> +static const char *imx8m_dsp_clks_names[IMX8M_DSP_CLK_NUM] = {

static const char *imx8m_dsp_clks_names[]

+ ARRAY_SIZE(imx8m_dsp_clks_names) instead IMX8M_DSP_CLK_NUM ?


-- 
Péter

  reply	other threads:[~2021-09-02 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 12:32 [PATCH 0/2] Add code to manage DSP related clocks Daniel Baluta
2021-09-02 12:32 ` [PATCH 1/2] ASoC: SOF: imx: " Daniel Baluta
2021-09-02 13:35   ` Péter Ujfalusi [this message]
2021-09-03 15:00     ` Daniel Baluta
2021-09-02 14:49   ` Mark Brown
2021-09-03 14:49     ` Daniel Baluta
2021-09-02 12:32 ` [PATCH 2/2] dt-bindings: dsp: fsl: Add DSP optional clocks documentation Daniel Baluta

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=896baddd-5bd7-8f85-91c3-0a4498694d77@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=daniel.baluta@oss.nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=s-anna@ti.com \
    --cc=shawnguo@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 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).