Message ID | 20230731090449.2845997-5-peng.fan@oss.nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1904358vqg; Mon, 31 Jul 2023 02:54:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlH/yWp8+M78hNd9WA7HWgNNzS6OAjefDU6+vuV0yWEGyx5otZbtS72zxggjU08/kjglWI+B X-Received: by 2002:a05:6a20:8f13:b0:13e:7d3:61d1 with SMTP id b19-20020a056a208f1300b0013e07d361d1mr1427652pzk.12.1690797245817; Mon, 31 Jul 2023 02:54:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690797245; cv=pass; d=google.com; s=arc-20160816; b=zn6O6W374GvQCbenXx1vo5iQYSkoxUEYCBb9HtBIIfwYCTKkq6kFoUJq8UcGjRoRuI t4NnooQ5JATfWcY6E1CDstAcfL3K+7GzXl/OBVLankuq5Zs6RCCkqfQz/GJqVWzIQZTe JHm9EQFLCTKrTDeh1ByE6m63mSki1EXt+N+cXe2sZAKHYui4yf0nd/V34s3Dxv/Z+PAT /M8A+P9tNyA7oqDOwCCpf32zxT8qUQ4VG/g+FooPThBktYH+kR/WimaEqWSqcHFdOdHL X1NQ9Vw17MUSI0jskoTKW03ftWq5cRwI2sXMNS+kVdqZlO7pYYxnKHP5vueJnaggufOJ pKoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oI4tLjdGvrvpQt5r0xaIf/zZnKlkwUrXvNkzmXrngp8=; fh=lMFpnJZCjkSvetl9tpFZk4oM1K582D2CBXvvYFGhgSk=; b=tK9TpbXJcd8zCnfbdsks5wiqRKkRUm/VAQ09t+oEBnmN1Wl386Ukl4mpsQT8InuO42 PbZXcDGuYgNo1Oq3tS+Omjf96C8XaQR0hWZmWNwZG/zNXNwxAR/CmuMe39c646BLOenj pxSQ0JHmi5OaZAcRG1jsm1OVmEqNCrJLyEPHMoNgaA/IIYuVeuuV3mpHdpVsyT7t9217 JwT3C3RMGelYZwt9hou0+5Ip9yEse4CCmWEQmg8q5hUQFpHZXJP+Kt3N6Rr+q7fo0KEa Br2P1oWU0mIYYR4mIHFf5mGEYN8M6JmVAUTz2XcS/SvpjZkxzb2/qihw1JMqGO6FuDko TcJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=PxHSbupy; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a633e05000000b005348af160c2si5578730pga.216.2023.07.31.02.53.53; Mon, 31 Jul 2023 02:54:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=PxHSbupy; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231290AbjGaJBG (ORCPT <rfc822;dengxinlin2429@gmail.com> + 99 others); Mon, 31 Jul 2023 05:01:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231754AbjGaJAs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 31 Jul 2023 05:00:48 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2051.outbound.protection.outlook.com [40.107.7.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25639E41 for <linux-kernel@vger.kernel.org>; Mon, 31 Jul 2023 02:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mgbVb/k+4srGDlepwgQqaacRJviSa7Qvw7zA+bPNAGFbDPBymKWaDkv+6/qNmzBnfHQDytybt5OZu+avY+ryiQZs8HhcJoGe53n9rxp5QHrQmTSXKcUf97cUvRiTW9IGMhquI8Wk9nnFz77ASWJaOnTiduOG6HW0NCiHvh7SJumc8S4zLcZCNWgsTtCa63MRnnveHMeS3nt66LAqr5b2ZXQsIbdvJ0OkdXyFEMF3VjFcfdU+/T7YWk26VpeR+nZbcdd27rGglab1do+bltZtfla8bEdbCcykZdr81xJQ5E60o5ZQlGq3E29yMeAGHmlUyZdCNyGe/y0WrJfwdjJ5ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oI4tLjdGvrvpQt5r0xaIf/zZnKlkwUrXvNkzmXrngp8=; b=kGUCqVgVEjukKk1MwpemnGtpWEJT+ldVRO14fCqK7hm8LlrsdPpLhiifAa6vunWTqOF+gr4/1tCHOB+VZ/WoJYY1P9Q3alAW8K+rnLQZ/sxGDmQ6ROb/4GdfEIg29TEC+snrJ6rnuAZ5FCWBHQFAvCjPPvrApFbqUJD8LNTfa3MjBIfcWmgADCVmMDskY23yfyOqSP2JDRhw4Oo7wFPXPtN6c2zV8CdOkvvi4VE8gyiCbapfIWhqBv93muLuGPrbFr94WDk7A+9l3nHnPmtRFeiHI/Q20Hd8GotsLboPim0/u//xZkeuU1aDYSxKhITKte+EyMt4z9NVJCavDRTY4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oI4tLjdGvrvpQt5r0xaIf/zZnKlkwUrXvNkzmXrngp8=; b=PxHSbupy/v1RP6LRw54c8FzIoX3l+jHEs9vwjl9FrpyiyBag/o0xmits8ZayVN08I2N8Kbfdnm17AVMSoMRuo6FwqukZzIYR+WnI6y4lBroFKIL1w3j7VG969Pe/zHxX8cYv5UBCN9Ty6mOhlT+I3Zo8vpDL0FLn4z3E1WPrGog= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AS8PR04MB8229.eurprd04.prod.outlook.com (2603:10a6:20b:3b3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.43; Mon, 31 Jul 2023 09:00:18 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::5d6a:ec53:f2a8:5b97]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::5d6a:ec53:f2a8:5b97%6]) with mapi id 15.20.6631.042; Mon, 31 Jul 2023 09:00:18 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> To: shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com, alexander.stein@ew.tq-group.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V5 4/9] firmware: imx: scu: use soc name for soc_id Date: Mon, 31 Jul 2023 17:04:44 +0800 Message-Id: <20230731090449.2845997-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731090449.2845997-1-peng.fan@oss.nxp.com> References: <20230731090449.2845997-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0128.apcprd02.prod.outlook.com (2603:1096:4:188::20) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AS8PR04MB8229:EE_ X-MS-Office365-Filtering-Correlation-Id: df9e018c-7410-47d2-1d43-08db91a48fcd X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P3PxSxpsfvCpwV+mSWVhP+vmykq/7O6Yw8zpkKkbnvZ+wdX251AM/W2O9tnDI+VCeaddM6ZeAxZ4Pkv78fKmtou15GUCpebHiO8EEiQSUqHp/oFJmgnsF7SNFxnCwfvu1adkG3aB6wsnYJzPxISeH2UC/dZLoDyan72iK1C6/r4W5NXqDweTKWjpcE+hpB5xdG0niSaIFxry+v3F9UAOjIKIoOjTeQuHB7VXIVuMkE14983XrFQvrP1cfyIJ2TtwRBaDfu06JTquKt3iD7C3h+HYS14Xg3zKpCeLvLMhQXSXBunSYD44PQ+ucZtv0bJDgtCws3AWkNIzrck3VruopXQaD5RJMIRKFuBn7xeXbRPqhPzuK23kh/jh+hMCqSM3Ta6u9BLFgIDNRzhhhL822ZIyaxCxt/gwIzVd+3zJI6ElnjWQ3yF5HGIask52usRAmgIlqlEwNaVw2ysFotTMV23Y3iMuZnG8W8BW+MIrJalnD9yZ6K/sFcDmKn9GW8QlzobHO1thE7WVwqmv84odGtclH4ScIRcKUUt4tvw+O6oSTbtGZRff9PAlg6/5xSMh+PBWy2UzXvd+HbBRHLKxgPoAddOAykm4KC7lTLHr7hZjQY3CTp9uaG8qk9x6p5uF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(346002)(39860400002)(396003)(136003)(376002)(451199021)(6512007)(6486002)(52116002)(2616005)(6506007)(1076003)(26005)(83380400001)(186003)(66946007)(66556008)(38350700002)(41300700001)(86362001)(66476007)(316002)(4326008)(5660300002)(8676002)(8936002)(38100700002)(2906002)(6666004)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /ksrDrjXXGFqw8upRTyQ7TjGsGR2EepdNxSQGFd/g2EJN8wfkDVxzklaX+NQTjvztG00HD8MWsgBetK3Z7LCmvvFnhoaXhvGNhAXvPVG2iYK70B1yC8/vFBTpaMRssuTuDrfXVWyIRjU/YjazYvDhL4Ftv9z+ssdPpSWYnSlrs/kTt7a1aCDJARWx0n0B9EXyZxVST40Y7VXAo9AN7UkvxTgIianN6pi8ftRwBP6wilsxB+cLw+Q+5tdgNnKciy+MknkhANcPBwkJKPxzQWzlGsTRBl+5XbZOvoAPULx+t6jszWYiw9iPuNNxfKnDW7rAQHFmV+U+IgeQ4vcVmi8fvwg39A/DR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wrtknEn/b3HfXJ0XI6Pl/Ld5YzupL5+3D5+Rx2NJofPUXYradDbA+x0eoTgY32QRSPMMfRpzVEYVAL1405WZCpmGqTL8p3MTj4O+62CGRygP4R8LYg/cgseV8ZBzMEyi+OK6KQYoaH6L/sWJiZoxSawNGrSfwwL8v7nUKSoYnexMBkmIrM1lTidekEAxBGiaca X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: df9e018c-7410-47d2-1d43-08db91a48fcd X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 09:00:17.9812 (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-CrossTenant-UserPrincipalName: lYM9H2jNjRZFDQ/ekZklokRxeCy+6ERx/ecp7CeA6RBipI/9LIJf6aVy2XYbTgfU6k/63FK3XeExlOQF96EbIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8229 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772929412445967364 X-GMAIL-MSGID: 1772929412445967364 |
Series |
firmware: imx: scu/scu-irq: misc update
|
|
Commit Message
Peng Fan (OSS)
July 31, 2023, 9:04 a.m. UTC
From: Peng Fan <peng.fan@nxp.com> Same as soc-imx8m and soc-imx driver, use soc name for soc_id Signed-off-by: Peng Fan <peng.fan@nxp.com> --- drivers/firmware/imx/imx-scu-soc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Comments
On Mon, Jul 31, 2023 at 05:04:44PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan <peng.fan@nxp.com> > > Same as soc-imx8m and soc-imx driver, use soc name for soc_id > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > drivers/firmware/imx/imx-scu-soc.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/firmware/imx/imx-scu-soc.c b/drivers/firmware/imx/imx-scu-soc.c > index ef9103987e76..cb8377670a7d 100644 > --- a/drivers/firmware/imx/imx-scu-soc.c > +++ b/drivers/firmware/imx/imx-scu-soc.c > @@ -107,10 +107,12 @@ int imx_scu_soc_init(struct device *dev) > return -EINVAL; > > /* format soc_id value passed from SCU firmware */ > - val = id & 0x1f; > - soc_dev_attr->soc_id = devm_kasprintf(dev, GFP_KERNEL, "0x%x", val); > - if (!soc_dev_attr->soc_id) > - return -ENOMEM; > + if (of_machine_is_compatible("fsl,imx8qm")) > + soc_dev_attr->soc_id = "i.MX8QM"; > + else if (of_machine_is_compatible("fsl,imx8qxp")) > + soc_dev_attr->soc_id = "i.MX8QXP"; > + else if (of_machine_is_compatible("fsl,imx8dxl")) > + soc_dev_attr->soc_id = "i.MX8DXL"; Is it possible to deduce SoC name from the id retrieved from SCU firmware? IMO, device tree should be the last resort when there is no other sources for the such information. Shawn > > /* format revision value passed from SCU firmware */ > val = (id >> 5) & 0xf; > -- > 2.37.1 >
diff --git a/drivers/firmware/imx/imx-scu-soc.c b/drivers/firmware/imx/imx-scu-soc.c index ef9103987e76..cb8377670a7d 100644 --- a/drivers/firmware/imx/imx-scu-soc.c +++ b/drivers/firmware/imx/imx-scu-soc.c @@ -107,10 +107,12 @@ int imx_scu_soc_init(struct device *dev) return -EINVAL; /* format soc_id value passed from SCU firmware */ - val = id & 0x1f; - soc_dev_attr->soc_id = devm_kasprintf(dev, GFP_KERNEL, "0x%x", val); - if (!soc_dev_attr->soc_id) - return -ENOMEM; + if (of_machine_is_compatible("fsl,imx8qm")) + soc_dev_attr->soc_id = "i.MX8QM"; + else if (of_machine_is_compatible("fsl,imx8qxp")) + soc_dev_attr->soc_id = "i.MX8QXP"; + else if (of_machine_is_compatible("fsl,imx8dxl")) + soc_dev_attr->soc_id = "i.MX8DXL"; /* format revision value passed from SCU firmware */ val = (id >> 5) & 0xf;