Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp381067yba; Wed, 15 May 2019 03:06:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRQSDBfMgQjNgAsH88cAGilyObPqLx2hd4rICSlfG+D0/6Q4Dur4IfzPHAYazpLm5+XBEk X-Received: by 2002:a63:10d:: with SMTP id 13mr17560332pgb.176.1557914815256; Wed, 15 May 2019 03:06:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557914815; cv=none; d=google.com; s=arc-20160816; b=bOWzANQ+COJwcB+LqLwnPW7x73u56Eb8gmc1ojuTEGE6jQX3EURd9/yvzFw+bV3rwD UgXYgaFPcF6BhaqbQKMCBNcKMFEKq2pcfA2BHgNDzzhTUnw2LFk18ljjmYoDqFqkSOAc GZi+TQu32sevV3b+bmzc5QImZk2QUH5uPl51h7CLMz2ufgKnzOXXgbU9wZwj8NqaN/qq R9DhJBJiIIXB/gA6AeLZMJyFBi+Czwv5f/civKGHUEHWFKRo65j0qB1879lOq9K9WEYl /SOpHFwychLVydWJC/Rinpa1o1cDptympSABegwpfRoWrUqkhhDEo1smog4ZECq1s9+2 LnlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=sm2X//WPXOIgD5UW/K/WAjv2L76gLqUFtG3NSJhdqLY=; b=e4BFQZAAiekVN7gkdWRglhogdabCCPtITv81m1Ts9BssHdbD3dqcfUbaO4BBAsq7hd 7DRkoWowFuP4nPHQ8xlUELa4Tgm3aD0rqe/QFeWxjP2x7UsqamikCQD6pUrtoO+xf56+ xnpYnz1AZ6k9JTexWnpYTiJG6ndsGtBjxQ5TuiOYvrokIugogZAEDpSZp53X/1o1zWT3 6Mh+QMRaXr5+S6/FOtZhzHpaW5w/8alcinazxA7pL40bvcdEpJ1LdtR5O+LucENTi0Ou GW+2q/p8hqP4Hn/WWRtBS0zSF8rdmsqZuSe4P+CMzD44Rkja2QRnAtnif51nbXYzof1Q xRRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Mn4zWIIo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si1416120pgh.494.2019.05.15.03.06.40; Wed, 15 May 2019 03:06:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Mn4zWIIo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726638AbfEOKEw (ORCPT + 99 others); Wed, 15 May 2019 06:04:52 -0400 Received: from mail-eopbgr80059.outbound.protection.outlook.com ([40.107.8.59]:39651 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726586AbfEOKEv (ORCPT ); Wed, 15 May 2019 06:04:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sm2X//WPXOIgD5UW/K/WAjv2L76gLqUFtG3NSJhdqLY=; b=Mn4zWIIoM4a2at+hWHmy9qriRlUKed+NYgG5SedLvMisPKBjxgCHILC/VPr3tLTLpj2zQnHozv8/uDfVru754RgLLRTR/FMtg7N4X0hSQTrSZiUGdIvdicbMYoeg4PwcSlWSH7vOoaZU0T7HKyS2iSYLMGTswTl7lYPF0WR2CNw= Received: from AM0PR04MB6434.eurprd04.prod.outlook.com (20.179.252.215) by AM0PR04MB4801.eurprd04.prod.outlook.com (20.177.41.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1878.25; Wed, 15 May 2019 10:04:46 +0000 Received: from AM0PR04MB6434.eurprd04.prod.outlook.com ([fe80::19be:75a:9fe:7cec]) by AM0PR04MB6434.eurprd04.prod.outlook.com ([fe80::19be:75a:9fe:7cec%7]) with mapi id 15.20.1900.010; Wed, 15 May 2019 10:04:46 +0000 From: Leonard Crestez To: Anson Huang CC: "catalin.marinas@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "agross@kernel.org" , "maxime.ripard@bootlin.com" , "olof@lixom.net" , "horms+renesas@verge.net.au" , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "marc.w.gonzalez@free.fr" , "dinguyen@kernel.org" , "enric.balletbo@collabora.com" , "l.stach@pengutronix.de" , Abel Vesa , "robh@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx , Aisheng Dong Subject: Re: [PATCH V2 1/2] soc: imx: Add SCU SoC info driver support Thread-Topic: [PATCH V2 1/2] soc: imx: Add SCU SoC info driver support Thread-Index: AQHVCvixb1MFrIDHlECOalYM+lyDeQ== Date: Wed, 15 May 2019 10:04:46 +0000 Message-ID: References: <1557908823-11349-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-originating-ip: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e9c69b43-db63-4003-37d1-08d6d91cc2ba x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:AM0PR04MB4801; x-ms-traffictypediagnostic: AM0PR04MB4801: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 0038DE95A2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(346002)(396003)(136003)(376002)(366004)(189003)(199004)(44832011)(486006)(66476007)(66556008)(53936002)(66066001)(5660300002)(6862004)(229853002)(73956011)(66446008)(64756008)(91956017)(76116006)(52536014)(99286004)(476003)(66946007)(478600001)(7696005)(14454004)(316002)(86362001)(76176011)(4744005)(446003)(102836004)(6116002)(8676002)(2906002)(71190400001)(186003)(14444005)(6506007)(53546011)(26005)(256004)(55016002)(9686003)(54906003)(3846002)(6636002)(4326008)(33656002)(6246003)(6436002)(305945005)(71200400001)(7736002)(81156014)(74316002)(81166006)(25786009)(8936002)(68736007)(7416002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4801;H:AM0PR04MB6434.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: y/ThbNd0wWXL7H2R4+RjpW0YsbGv8HGlcSfPA1sydRKGglH2TBBVqXpoeTvbrNw85ApwzaQu3KgLSlvsZIgCjH8k3SJNciRvyKCuFijM8wN316RjllItPd1wgnuRuZ9HaUZRjS0hqWydR+xQVP3guhdMaSseLfuFSTXCwdUP7eOzYJu/JKJqEOT2oQasUWkz0NQ6qIvhLc/E5Yy49cGihE51W01XQt6pm36DiXu6XSQCgi6iiDFJvTn1S6cYWMsBaq234YaXDLz9ddbKa7s0f1agfrQVkldkhoCJPf/rH8f/S33njOqLiDbh6vwjw7d6fucwZtFuwfrmeeWSK+lbTMAtiLaEOCajkbK29ORMN0BHCV+U8xasMzUoMB7IEmC8FHGkuLO8q0zTxf/HO7gOZXRudTWpj7lcXdonIYTBaWE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9c69b43-db63-4003-37d1-08d6d91cc2ba X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2019 10:04:46.7000 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4801 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.05.2019 11:32, Anson Huang wrote:=0A= > Add i.MX SCU SoC info driver to support i.MX8QXP SoC, introduce=0A= > driver dependency into Kconfig as CONFIG_IMX_SCU must be=0A= > selected to support i.MX SCU SoC driver, also need to use=0A= > platform driver model to make sure IMX_SCU driver is probed=0A= > before i.MX SCU SoC driver.=0A= > =0A= > With this patch, SoC info can be read from sysfs:=0A= =0A= > + id =3D of_match_node(imx_scu_soc_match, root);=0A= > + if (!id) {=0A= > + of_node_put(root);=0A= > + return -ENODEV;=0A= > + }=0A= =0A= Perhaps this check should be moved from imx_scu_soc_probe to =0A= imx_scu_soc_init? As far as I can tell this "probe" function will be =0A= attempted on all SOCs (even non-imx). Better to check if we're on a =0A= SCU-based soc early and avoid temporary allocations.=0A= =0A= > +module_init(imx_scu_soc_init);=0A= > +module_exit(imx_scu_soc_exit);=0A= =0A= Please don't make this a module=0A= =0A= --=0A= Regards,=0A= Leonard=0A=