[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190618070334.GD29881@dragon>
Date: Tue, 18 Jun 2019 15:03:35 +0800
From: Shawn Guo <shawnguo@...nel.org>
To: Anson.Huang@....com
Cc: s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
leonard.crestez@....com, viresh.kumar@...aro.org,
abel.vesa@....com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, Linux-imx@....com
Subject: Re: [PATCH] soc: imx: Add i.MX8MN SoC driver support
On Tue, Jun 11, 2019 at 09:31:25AM +0800, Anson.Huang@....com wrote:
> From: Anson Huang <Anson.Huang@....com>
>
> This patch adds i.MX8MN SoC driver support:
>
> root@...8mnevk:~# cat /sys/devices/soc0/family
> Freescale i.MX
>
> root@...8mnevk:~# cat /sys/devices/soc0/machine
> NXP i.MX8MNano DDR4 EVK board
>
> root@...8mnevk:~# cat /sys/devices/soc0/soc_id
> i.MX8MN
>
> root@...8mnevk:~# cat /sys/devices/soc0/revision
> 1.0
>
> Signed-off-by: Anson Huang <Anson.Huang@....com>
> ---
> drivers/soc/imx/soc-imx8.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/imx/soc-imx8.c b/drivers/soc/imx/soc-imx8.c
> index 3842d09..02309a2 100644
> --- a/drivers/soc/imx/soc-imx8.c
> +++ b/drivers/soc/imx/soc-imx8.c
> @@ -55,7 +55,12 @@ static u32 __init imx8mm_soc_revision(void)
> void __iomem *anatop_base;
> u32 rev;
>
> - np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-anatop");
> + if (of_machine_is_compatible("fsl,imx8mm"))
> + np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-anatop");
> + else if (of_machine_is_compatible("fsl,imx8mn"))
> + np = of_find_compatible_node(NULL, NULL, "fsl,imx8mn-anatop");
Can we have this anatop compatible in imx8_soc_data, so that we may save
the call to of_machine_is_compatible()?
Shawn
> + else
> + np = NULL;
> if (!np)
> return 0;
>
> @@ -79,9 +84,15 @@ static const struct imx8_soc_data imx8mm_soc_data = {
> .soc_revision = imx8mm_soc_revision,
> };
>
> +static const struct imx8_soc_data imx8mn_soc_data = {
> + .name = "i.MX8MN",
> + .soc_revision = imx8mm_soc_revision,
> +};
> +
> static const struct of_device_id imx8_soc_match[] = {
> { .compatible = "fsl,imx8mq", .data = &imx8mq_soc_data, },
> { .compatible = "fsl,imx8mm", .data = &imx8mm_soc_data, },
> + { .compatible = "fsl,imx8mn", .data = &imx8mn_soc_data, },
> { }
> };
>
> --
> 2.7.4
>
Powered by blists - more mailing lists