From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A16BBC31E51 for ; Tue, 18 Jun 2019 13:17:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7609C2070B for ; Tue, 18 Jun 2019 13:17:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a4RO//zf"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TAtwl7Y9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7609C2070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ngkU/5rPnCTjDZtUK4D4SHvXpUMscFbs0loP1WdWWOk=; b=a4RO//zftoQO0/ Tv1cRXvbLK5c0nprw+ZX4oMpkGkO9F1he1sga8LfMT64bFjMU8VqTc3q/nrCmpIC3bMiSfyLXxZ4q ciTiYCpjcnzC+8bqzHdpCGkDL1+kWYa3gF1DTr9c7BakUDa/DQM+K61nGDHTd7h6z0P7LagbmtCHi oFK57URSatlWSCt4UkFi9YBV1dcw/GoUKs0arwBdG51O4oHd3SnWsYAYCRs+Nk+4ARfJ2ONUgT743 ZulcRV5q2FB4/vSLxNH72VRrxw/ABOFUNRfpfUcdFp9yIXi1/9Q5JzF3Dx77SNgLsfcVX9V5y16NA 9Uryie4Tz0QaeB5qZeWg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdDzQ-0002Ud-Nn; Tue, 18 Jun 2019 13:17:33 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdDiT-0003oZ-VS for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2019 13:00:05 +0000 Received: from dragon (li1322-146.members.linode.com [45.79.223.146]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F1BB20665; Tue, 18 Jun 2019 12:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560862800; bh=DH5P8RwITKpz+5OhRwTGjbtFNcshKGlhFZA5nFAj+Vk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TAtwl7Y9Crn3H8eqFQgpO4Eq5xocFt2+9mo8ybrrJC4ZXOmFfJe+DMHRNMgEpGMZC h1wFukzt45WpJPXhKlf8S4rGt1yM1Z/9g0E60cm0+JyLY/FMLrU5QLW8wWCuzwwgT+ Fvf95vBbtGzs1imPvLn/aG6GTU6QHzoKwhRxlds0= Date: Tue, 18 Jun 2019 20:59:09 +0800 From: Shawn Guo To: Anson Huang Subject: Re: [PATCH] soc: imx: Add i.MX8MN SoC driver support Message-ID: <20190618125902.GN29881@dragon> References: <20190611013125.3434-1-Anson.Huang@nxp.com> <20190618070334.GD29881@dragon> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190618_060003_084906_33B01BF5 X-CRM114-Status: GOOD ( 21.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Abel Vesa , "viresh.kumar@linaro.org" , "s.hauer@pengutronix.de" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , Leonard Crestez , "festevam@gmail.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 18, 2019 at 08:24:59AM +0000, Anson Huang wrote: > Hi, Shawn > > > -----Original Message----- > > From: Shawn Guo > > Sent: Tuesday, June 18, 2019 3:04 PM > > To: Anson Huang > > Cc: s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com; > > Leonard Crestez ; viresh.kumar@linaro.org; > > Abel Vesa ; linux-arm-kernel@lists.infradead.org; > > linux-kernel@vger.kernel.org; dl-linux-imx > > Subject: Re: [PATCH] soc: imx: Add i.MX8MN SoC driver support > > > > On Tue, Jun 11, 2019 at 09:31:25AM +0800, Anson.Huang@nxp.com wrote: > > > From: Anson Huang > > > > > > This patch adds i.MX8MN SoC driver support: > > > > > > root@imx8mnevk:~# cat /sys/devices/soc0/family Freescale i.MX > > > > > > root@imx8mnevk:~# cat /sys/devices/soc0/machine NXP i.MX8MNano > > DDR4 > > > EVK board > > > > > > root@imx8mnevk:~# cat /sys/devices/soc0/soc_id i.MX8MN > > > > > > root@imx8mnevk:~# cat /sys/devices/soc0/revision > > > 1.0 > > > > > > Signed-off-by: Anson Huang > > > --- > > > 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()? > > Do you mean adding a variable like " const char *anatop_compat " in imx8_soc_date structure, > then initialize it according to SoC type, and in imx8mm_soc_revision(), get to soc_data's anatio_compat to > find the anatop node? If yes, we have to add some code to get the soc_data in this function, or maybe > we can pass anatop compatible name as .soc_revision's parameter? > > static const struct imx8_soc_data imx8mn_soc_data = { > .name = "i.MX8MN", > .soc_revision = imx8mm_soc_revision, > .anatop_compat = "fsl,imx8mn-anatop", > }; Okay, just realized that we only want to handle imx8mn with imx8mm function. It makes less sense to add anatop compatible into imx8_soc_data just for that. So it looks like that imx8mn is highly compatible with imx8mm, including anatop block? If that's the case, maybe we can have compatible of imx8mn anatop like below, so that we can save above changes? compatible = "fsl,imx8mn-anatop", "fsl,imx8mm-anatop"; Shawn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel