linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Abel Vesa <abelvesa@kernel.org>
To: Dong Aisheng <aisheng.dong@nxp.com>
Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	dongas86@gmail.com, kernel@pengutronix.de, shawnguo@kernel.org,
	linux-imx@nxp.com, abel.vesa@nxp.com, sboyd@kernel.org
Subject: Re: [PATCH 6/6] clk: imx8qm: add clock valid resource checking
Date: Thu, 13 May 2021 10:17:43 +0300	[thread overview]
Message-ID: <YJzSlz5ELBcrC54Q@ryzen.lan> (raw)
In-Reply-To: <20210423033334.3317992-6-aisheng.dong@nxp.com>

On 21-04-23 11:33:34, Dong Aisheng wrote:
> Add imx8qm clock valid resource checking mechanism
> 
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

> ---
>  drivers/clk/imx/Makefile          |   2 +-
>  drivers/clk/imx/clk-imx8qm-rsrc.c | 116 ++++++++++++++++++++++++++++++
>  drivers/clk/imx/clk-imx8qxp.c     |   1 +
>  drivers/clk/imx/clk-scu.h         |   1 +
>  4 files changed, 119 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/clk/imx/clk-imx8qm-rsrc.c
> 
> diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
> index 2fdd2fff16c7..c24a2acbfa56 100644
> --- a/drivers/clk/imx/Makefile
> +++ b/drivers/clk/imx/Makefile
> @@ -28,7 +28,7 @@ obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o
>  
>  obj-$(CONFIG_MXC_CLK_SCU) += clk-imx-scu.o clk-imx-lpcg-scu.o
>  clk-imx-scu-$(CONFIG_CLK_IMX8QXP) += clk-scu.o clk-imx8qxp.o \
> -				     clk-imx8qxp-rsrc.o
> +				     clk-imx8qxp-rsrc.o clk-imx8qm-rsrc.o
>  clk-imx-lpcg-scu-$(CONFIG_CLK_IMX8QXP) += clk-lpcg-scu.o clk-imx8qxp-lpcg.o
>  
>  obj-$(CONFIG_CLK_IMX1)   += clk-imx1.o
> diff --git a/drivers/clk/imx/clk-imx8qm-rsrc.c b/drivers/clk/imx/clk-imx8qm-rsrc.c
> new file mode 100644
> index 000000000000..183a071cbf20
> --- /dev/null
> +++ b/drivers/clk/imx/clk-imx8qm-rsrc.c
> @@ -0,0 +1,116 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2019-2021 NXP
> + *	Dong Aisheng <aisheng.dong@nxp.com>
> + */
> +
> +#include <dt-bindings/firmware/imx/rsrc.h>
> +
> +#include "clk-scu.h"
> +
> +/* Keep sorted in the ascending order */
> +static u32 imx8qm_clk_scu_rsrc_table[] = {
> +	IMX_SC_R_A53,
> +	IMX_SC_R_A72,
> +	IMX_SC_R_DC_0_VIDEO0,
> +	IMX_SC_R_DC_0_VIDEO1,
> +	IMX_SC_R_DC_0,
> +	IMX_SC_R_DC_0_PLL_0,
> +	IMX_SC_R_DC_0_PLL_1,
> +	IMX_SC_R_DC_1_VIDEO0,
> +	IMX_SC_R_DC_1_VIDEO1,
> +	IMX_SC_R_DC_1,
> +	IMX_SC_R_DC_1_PLL_0,
> +	IMX_SC_R_DC_1_PLL_1,
> +	IMX_SC_R_SPI_0,
> +	IMX_SC_R_SPI_1,
> +	IMX_SC_R_SPI_2,
> +	IMX_SC_R_SPI_3,
> +	IMX_SC_R_UART_0,
> +	IMX_SC_R_UART_1,
> +	IMX_SC_R_UART_2,
> +	IMX_SC_R_UART_3,
> +	IMX_SC_R_UART_4,
> +	IMX_SC_R_EMVSIM_0,
> +	IMX_SC_R_EMVSIM_1,
> +	IMX_SC_R_I2C_0,
> +	IMX_SC_R_I2C_1,
> +	IMX_SC_R_I2C_2,
> +	IMX_SC_R_I2C_3,
> +	IMX_SC_R_I2C_4,
> +	IMX_SC_R_ADC_0,
> +	IMX_SC_R_ADC_1,
> +	IMX_SC_R_FTM_0,
> +	IMX_SC_R_FTM_1,
> +	IMX_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SC_R_CSI_0_PWM_0,
> +	IMX_SC_R_CSI_0_I2C_0,
> +	IMX_SC_R_CSI_1,
> +	IMX_SC_R_CSI_1_PWM_0,
> +	IMX_SC_R_CSI_1_I2C_0,
> +	IMX_SC_R_HDMI,
> +	IMX_SC_R_HDMI_I2S,
> +	IMX_SC_R_HDMI_I2C_0,
> +	IMX_SC_R_HDMI_PLL_0,
> +	IMX_SC_R_HDMI_RX,
> +	IMX_SC_R_HDMI_RX_BYPASS,
> +	IMX_SC_R_HDMI_RX_I2C_0,
> +	IMX_SC_R_AUDIO_PLL_1,
> +	IMX_SC_R_AUDIO_CLK_0,
> +	IMX_SC_R_AUDIO_CLK_1,
> +	IMX_SC_R_HDMI_RX_PWM_0,
> +	IMX_SC_R_HDMI_PLL_1,
> +	IMX_SC_R_VPU,
> +};
> +
> +const struct imx_clk_scu_rsrc_table imx_clk_scu_rsrc_imx8qm = {
> +	.rsrc = imx8qm_clk_scu_rsrc_table,
> +	.num = ARRAY_SIZE(imx8qm_clk_scu_rsrc_table),
> +};
> diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
> index 9e35ae45b3a0..88cc737ee125 100644
> --- a/drivers/clk/imx/clk-imx8qxp.c
> +++ b/drivers/clk/imx/clk-imx8qxp.c
> @@ -134,6 +134,7 @@ static int imx8qxp_clk_probe(struct platform_device *pdev)
>  static const struct of_device_id imx8qxp_match[] = {
>  	{ .compatible = "fsl,scu-clk", },
>  	{ .compatible = "fsl,imx8qxp-clk", &imx_clk_scu_rsrc_imx8qxp, },
> +	{ .compatible = "fsl,imx8qm-clk", &imx_clk_scu_rsrc_imx8qm, },
>  	{ /* sentinel */ }
>  };
>  
> diff --git a/drivers/clk/imx/clk-scu.h b/drivers/clk/imx/clk-scu.h
> index bcacd8b1d1ab..22156e93b85d 100644
> --- a/drivers/clk/imx/clk-scu.h
> +++ b/drivers/clk/imx/clk-scu.h
> @@ -22,6 +22,7 @@ struct imx_clk_scu_rsrc_table {
>  extern struct list_head imx_scu_clks[];
>  extern const struct dev_pm_ops imx_clk_lpcg_scu_pm_ops;
>  extern const struct imx_clk_scu_rsrc_table imx_clk_scu_rsrc_imx8qxp;
> +extern const struct imx_clk_scu_rsrc_table imx_clk_scu_rsrc_imx8qm;
>  
>  int imx_clk_scu_init(struct device_node *np,
>  		     const struct imx_clk_scu_rsrc_table *data);
> -- 
> 2.25.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-05-13  7:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23  3:33 [PATCH 1/6] dt-bindings: arm: imx: scu: fix naming typo of clk compatible string Dong Aisheng
2021-04-23  3:33 ` [PATCH 2/6] dt-bindings: arm: imx: scu: drop deprecated legacy clock binding Dong Aisheng
2021-05-03 16:47   ` Rob Herring
2021-04-23  3:33 ` [PATCH 3/6] clk: imx: scu: remove legacy scu clock binding support Dong Aisheng
2021-05-13 20:04   ` Abel Vesa
2021-04-23  3:33 ` [PATCH 4/6] clk: imx: scu: add gpr clocks support Dong Aisheng
2021-05-13  6:58   ` Abel Vesa
2021-05-17  9:49     ` Dong Aisheng
2021-05-17  9:52       ` Abel Vesa
2021-04-23  3:33 ` [PATCH 5/6] clk: imx8qxp: add clock valid checking mechnism Dong Aisheng
2021-05-13  7:13   ` Abel Vesa
2021-05-17  9:48     ` Dong Aisheng
2021-04-23  3:33 ` [PATCH 6/6] clk: imx8qm: add clock valid resource checking Dong Aisheng
2021-05-13  7:17   ` Abel Vesa [this message]
2021-06-02  1:50   ` Stephen Boyd
2021-06-04  6:46     ` Abel Vesa
2021-06-04  7:04       ` Dong Aisheng
2021-06-04  8:20         ` Abel Vesa
2021-05-03 16:46 ` [PATCH 1/6] dt-bindings: arm: imx: scu: fix naming typo of clk compatible string Rob Herring
2021-05-13  7:18 ` Abel Vesa

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=YJzSlz5ELBcrC54Q@ryzen.lan \
    --to=abelvesa@kernel.org \
    --cc=abel.vesa@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=dongas86@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=sboyd@kernel.org \
    --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).