From patchwork Mon Jul 31 09:04:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128544 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1909988vqg; Mon, 31 Jul 2023 03:06:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlFKYKuHUcRf762jwYZeiz0pQ+TDrvfRioI75S4fgbKz0ipESAp+ZFlEDwxpQXSOnRRRoGvC X-Received: by 2002:a05:6a00:2d0f:b0:668:8ad5:778f with SMTP id fa15-20020a056a002d0f00b006688ad5778fmr11589779pfb.17.1690798007721; Mon, 31 Jul 2023 03:06:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690798007; cv=pass; d=google.com; s=arc-20160816; b=vSbWXWFGC9IP6oQDgJcfWDyfm/ISpLa8lRI9whnV7eiLQTIDdDW/rFU8p5EKxxGCdz IJlpMkGRpIdcOGa6BbQwHSnJ1IJLxV940/Q6F7Wn1vGHaM0hPPFHOQBW4hQxE39ppo9h SrVwV0vv2v7QRBJlsKqch/0Wl1FbnocIVIX3UNsMc+PYfKwZaXuGqlrm9ewKQO4XQpeS eEHFMdNWr4w5P1hkSgfsxie8O6I6/Uz61wHoCot7YF+VRAotyOdtqRPbzKMpXYb+utNW ayDXZ/lXHrt55SH4cZiZiPrVOJ1Qv3h4N/E4T8nHZCz4gLOpNcRxuPQ07H9FzyfzVpyu OaJA== 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=9eXsJHj1jKik5zS42sb9oDfVAHK3/hCH/diRSXT4zP4=; fh=lMFpnJZCjkSvetl9tpFZk4oM1K582D2CBXvvYFGhgSk=; b=yJlz2rB3rtmAwzoekTC+iC70QJubd6CTgfRbd5gHcedpwOftN+dbecJBBqAEA0+LW2 0NIXoFJE0Jdsi5yh4i8d18ydK/H1JvKqDLcYDT1oyE19AwrYdWKvTwODeMeP32mn4J31 B6YTF8SFBYRa2U3DZyHZV0vazv1MH4TidFVIHamwrFNgxuG4XPZC3KVamANinUr6gaNg lHFBXpHa5K73fRE06HNjdaG4wCSlosczA9NUvBelNPwYm2/QrdF5B6l0khYRpZMF1wGB G9bvTAll0oyQeUd7vCa+PO/XxjBXYv06iZuwAYl3T03OwsK7xg5v1sp8jogF1b5TamDW YorQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=hJGPSNLc; 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 t4-20020a63f344000000b0055b635b788fsi6530754pgj.199.2023.07.31.03.06.34; Mon, 31 Jul 2023 03:06:47 -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=hJGPSNLc; 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 S230371AbjGaJAU (ORCPT + 99 others); Mon, 31 Jul 2023 05:00:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbjGaJAL (ORCPT ); Mon, 31 Jul 2023 05:00:11 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2088.outbound.protection.outlook.com [40.107.7.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 116CFB7 for ; Mon, 31 Jul 2023 02:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D2O21rf3mq1RhW8uQ7eVLMTzpBQN1Rce66IPRWVICzEGQ++A3ibNPOTyTn4syxPcWBbLMdreGzk9ReIoLKlrfIkOtR/LIL8SBNSWAYyuRucqkcDTS0SXPfEvzgQ7mQY8mkTknUKko8ugV3d2vbkaGFqnbOdAVdZ4awKPO4qL2ZDX3QCFl4Tnblu/4lTZhOPKCf3r+WnPkgfnBSs+Bo/MT4cH2B1kNnRnsZBl1CNC/7TsuRDEUON8mKK7a7nW3YtNnceCswy0/9F4IGaD2q9/QBIG9vAHHaytDYDnFdK9NnRPNY3Nhxh7iQxXf4a+BCqXMKs7D9ojOllINsqCIHUyFQ== 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=9eXsJHj1jKik5zS42sb9oDfVAHK3/hCH/diRSXT4zP4=; b=f5EuG5TbIG0B3TTQdv/qFRgWwZ8Z26R6jgy7YMFwq6JVnWG5ypv5zeVV0QP1pIhATdkNEbSX3h2IDWIS5zVkD5iqa0n8rUw7wGwlpTykE59qC42MIMBDCmgeQOdhP0HySHDswrmKKPa/8fCmSXgC6ZJZQLlOW84asLj6bNKBO85F8scrk4KvByLzFZWMO0gPx5ItNRnwRnNvtz5ZgA8pES1vgTI3/qaqQrtn1mopdsCZ9Xlysw9fAoQoLE+8CutSvPtxrk4MeE5Z3qqR/Go88J5dqtdHIvnTt9ipuYrmm5O8D2Jvx50PTDcEnxmp1HloZ8k3hFNien0OxAfStl9kNQ== 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=9eXsJHj1jKik5zS42sb9oDfVAHK3/hCH/diRSXT4zP4=; b=hJGPSNLcbzMcrecUPnw4XcbeBHp/7Fpx8NWP5zDo67TdD2T8QkdRvbmZHDRKqqp1MAkiMHUCHe30obB8RBMFAbxp1tTIPBqK+Re7qM6XxR+uBMHjk9niBvpUXz8TORXoK7RjwJQK3e2qGTjP5PwgmKwVGfhKpJVMIl8oj6GG2sw= 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:07 +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:07 +0000 From: "Peng Fan (OSS)" 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 Subject: [PATCH V5 1/9] firmware: imx: scu: change init level to subsys_initcall_sync Date: Mon, 31 Jul 2023 17:04:41 +0800 Message-Id: <20230731090449.2845997-2-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> 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: f431d2ea-569e-4454-b767-08db91a48943 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: 8K5uVdMBqS6487sE2Nc371n5kl7TgzxuKHkcuizZ12iCwNLkx5Yfty+6NTvm9oULtLDrDUJWO1YyLl9jC+L5dgMZvIcruhVilWaZ7SX+TBYyD67UwTz99GWCqfinRJ6ZhCUz/nCRzo45WN1yyuV2/mJjnM65Qz6fWXwvJ90caz5sZnCXVgZlIlhpt4csC1RlWEb9asuik+TacVCgJ3b983udLvNgvPGGHnU/JzfYhM01X/UBxco5SN+5k96objwOAFwGjx5oys1WY9doeIG9Kwy97GaM/cCs6TDWD2W4FSCJbVo/O6MyEVVzYJxKy45Gag+4pEFamuB5lAsEwlSwrUn7BBFbGrDiNboElJm48vYrpp8XJgek2HxEdws5YE0DMKWlSO4k6cfoNywfskTnZj+B9Ytnp492cIDFTyj88pXkZkYUhvgEz98XXKgiZ85bDB9GZPygZc0RMKeNUQc1w+PMdRSnX8qJETt3mINhkWa4HBqsc4drL1jeCvpalxMS/o7I4JSSQUbD0FCyy6tLYnh4pZX4Flfan2SVKhTmCF9t8UwQjy3N+ZpsrugJkzUI1KdHqEQYLKu0bbuM5GLWqsWf84NIHAJ9pBYY+53vkeq1+ZDvgUC/kqXXo5RycR2A 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)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jW8u3CF0c0Nl5tXFpPm4DZphYEHO/9vGxiixir3/0naUUVHZSuhrdDo8PDNTyKBIjcNc7Si1HMQJa53fY9Wli/Ro0TkCCjCdp8bm/Jy1eFrx3KFdnZIhqnHJp+bFiB0zgzZei9TUBHyIL1p6lvWGPfG4q/69t578cwi8ddjyKsBaVS9bEfF57dvJKHVAVQxtk36/DhUUGwJMQqae3Xzo/VA89YOX01OsUoeg+i7JM9860vHSX2uorypqSu8t13K4eWZ4x9vVZrQ8bDiwrnJjCUJqQ3SaLSjSwF1uwASOl3G/sfTeme8JB4Yl3SG5K7OCEfehS5uWmhTH6ILILjbIDWEk2DQBwXvYQtZJCzL9vBDEx7ofZ+vEl+rE40wTjLxwZWCvv0gqITJ9TRVArkzT/LcNonaSxXLBkUgiDLPW+EoH9yTjKsJIGuRdvR5Or0BWoFHKhCfKfRTJjW+EnArQTgqz+erRCeAhO8h+h+vEX/1ARCcAzCxAz2f3AX8pE0lzAgs/Xf4uAmz88x4NAYMzDWcADoKk5z/EdsjUG8JxlrM+qYLk//zf4Eszv4pqhpUTyvUQYmsbJsP+Pj6GIW91CdEeBXoj6zzHc4vKSBmed5AWN7aOjvKvZGrMZkeZBTJTxKAed0aVd6GprPpL1KFQ57XdDYJFLw3mMXcZ+BFJE+6xA9cATDeMO/bp1dN790LzbB/J7PPm9HvBGl0iNvJLdLpCjb4Kw/4wXt+cR4w2eX1RuiZtoITuPN6aI/sevv0kqXM8xGzwx7texbuzw0RReyEAbCHOBNwLk7X6TXwgv073nKZYKBChwAMPhqrlUahhnNO4CeFatvh5PNMJt6msyT6TTQXALvHJK3yIP2YF9H4v2woOYzQVDClZg/upQPQfambj3Tv6kPEa/xMgWyvhSfZfStrFlu9yBcs0xCjAt+liriZvwdScaV1tyl5SG/MGW7frEQ81xmTTGRlqMFa1SyAWFIo/l3UIWHunAuKiGwj03j/Tsx7BFFv2Zq0TKxbywA7lelc7dS3O4S3cESSGs+0bAP2+aioi6bcElKurjsET3iAez/lnscuyMGbQxfftmPq1uEvr9sRsa7uea6ba6sXZ/iyJRPgsUosKeFudRGPnUX9rtk2q66n1w50zdki4MjdYush7MSLyaxI6sUqe/sfmrwjulCQUtJ/twJpJ4BLLBoNNeVaYdC8n+EjnHrYJrhci3PD80sdqENTTTFU1B8Mv6nhGrQ0AoVrkvUXPG5mOWmX/qPR4WXQZtMyZmarwXWqV2EaNEKrTSQ9qOLaijkTNLI1cKpwgyICZ8csxBpjIkof8LF6JvkMsRUHXSpk+Fc/CneE5cIWdjm9gnBtRubn1yK2pAQakU4hV8xZWWHliy/3EC1EdJLVdxaYu5mXIXnB8ieWpnMDnag9217qJl8ipbsZxxtWaveZYtYdue8BXzoQqnd3VYqKcNKoVNrncmMwX0lRDBJ20/diNtOWrAdPMs2hrARXXtuW+niN+kVfIZmm5EZmqIErdHLqm/+7xpVmnXhI4qwMbZ0f28ylaAJWTr6iq1TRDZn9aQQ0v1GyknwtNMrbmcntYaygE4Lt8 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f431d2ea-569e-4454-b767-08db91a48943 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:07.0075 (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: WES/0+ICOqiUd82YunqQ5slJDeFuJDryC3zxkJuBu7GmwBe5VWBBZLfnXyW/nilYqw89aEfPK9/q5lVWn9Sobg== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772930211728669685 X-GMAIL-MSGID: 1772930211728669685 From: Dong Aisheng Change firmware init level to subsys_initcall_sync to ensure it's probed before most devices to avoid unnecessary defer probe. Signed-off-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/firmware/imx/imx-scu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c index 47db49911e7b..2d24359420d8 100644 --- a/drivers/firmware/imx/imx-scu.c +++ b/drivers/firmware/imx/imx-scu.c @@ -353,7 +353,12 @@ static struct platform_driver imx_scu_driver = { }, .probe = imx_scu_probe, }; -builtin_platform_driver(imx_scu_driver); + +static int __init imx_scu_driver_init(void) +{ + return platform_driver_register(&imx_scu_driver); +} +subsys_initcall_sync(imx_scu_driver_init); MODULE_AUTHOR("Dong Aisheng "); MODULE_DESCRIPTION("IMX SCU firmware protocol driver"); From patchwork Mon Jul 31 09:04:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128560 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1927880vqg; Mon, 31 Jul 2023 03:48:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHjzv/yew/8mBNGeVIwgzCMjHDCZNCA1CgTzQP2aPXfHLCP5KvlIAYw3CAOsLdYYaKz/H6p X-Received: by 2002:a05:6358:63a2:b0:139:c7cb:77b8 with SMTP id k34-20020a05635863a200b00139c7cb77b8mr2470254rwh.20.1690800536987; Mon, 31 Jul 2023 03:48:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690800536; cv=pass; d=google.com; s=arc-20160816; b=GiH5shIbgP2VSy5SjbzvdR391laUhWACxG8dZY9AOde2e7qMr2JqwBPqRn/WI3sMnW aDLIJZ6iHAkRtBzJspYi66tZkhT6Rvr///bGMjdGmaA/vAIDJpIxlWM9cSjuE5a9D50J qLv1eWdFk7y81DG3tiGx/U7Rxd1UAWV442petdCbyJqwigMAGoV4cSCFNCufk5LSMYLs VQdNEtpKL+Gx5fDqcpYpPNq1C5nTKhngorRRbpTlFrDV5gE3lzfJZq9vQtGgKHoUYYd/ fUFIr41ImwoiXZwooNYWpXCWLi4VKeeqKBD/HYyYor8KfrbnNPp25SKmZLLqszVuWl8j v2kg== 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=DF948BRl8NffqmzXY2ZKiRJwHdKM7ujns57fiU8YtXw=; fh=lMFpnJZCjkSvetl9tpFZk4oM1K582D2CBXvvYFGhgSk=; b=GlptejzTuZemPo2V8OaCJ2x8+QRypDmQ76iiistq7mCL3Hk0IxFxBBl+3lwnMnsIy6 jSB0a0lloDY660p04FvK22Se7F6kXDwCYmZoeB49xv4w3ahHhOQvO47Jtw7krx2As7Gf 5mxH4NjEpVTrYDLp2hQXNczM8pRGUvT888FNRgpT0pAUaYL86ZxorrtaaY9TgIMmt8Rn h5uHh1PGEcEHDHbt2uk3ShZ1EBjeqZllRDnzYz81+pVLLdObcAT1/1FGVRjBcdU/xxT3 eo3y1ox5NmcExMjiHu0AXV9MZ8S2jX0pTi9ulfMcYGhX9ZQ+XEdzCs1XF4MytKQ/NJnV Ek4w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=FyIh0j79; 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 a72-20020a63904b000000b00563fbc00007si4578052pge.262.2023.07.31.03.48.44; Mon, 31 Jul 2023 03:48:56 -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=FyIh0j79; 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 S231484AbjGaJAb (ORCPT + 99 others); Mon, 31 Jul 2023 05:00:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbjGaJAQ (ORCPT ); Mon, 31 Jul 2023 05:00:16 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2073.outbound.protection.outlook.com [40.107.7.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0775E109 for ; Mon, 31 Jul 2023 02:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ffxhLBxZOQZfq5cmAs5xFci8pjLnfhimdGwt2u/NiAFS7Uee7IDSdHGFFg7RYGUUa17B1GcLalZWqU+DPUas99+coV+h0qu7QA+QvgfJOkuAYimV99nMoEzN5K8NnuVi8nefgjRTBz+CULJNdQJSxYbepADykoSBtMlUx75b+IywbOoPuxCtrDjvAf1oUGqOMFrqeP9WsbKjNM1rH0ZjmahPNWUktzbDAcDQqh5HKQZEtJhqa0vScULOA++t4DRQWR4AHCtiUX6HVtQRmFm5Qqo2lUy6j4Gmd6CYo1HQxY7LnLyJVLgIab+NPKEnwGZQEjYKAZM4gp8tDPXpG4gRwA== 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=DF948BRl8NffqmzXY2ZKiRJwHdKM7ujns57fiU8YtXw=; b=BegYLT+De8p6Xr4QwdwlwpsPR+QnibhOUxpeMA+kk1T0c5LcJy0+McnwMYm7ubuaCtDNyAqhFwL1OLQGBIlX6nKg0bc8UtZ6tcxu1EQo54dvSxkBkpl6Tcbr4hSibfAfuzpmbPUlO3yEREY6gj5LvMaHBlFnZL+EHFufYjJgK1f1QrD9mCiqeDlq8+kZoOyBd+C0NAHsfGxdp+akGjx1oGx5S2RTsw05lzJ0YoxcK+hSSpLfY4XLUZe4+7gVynqSwTWjO+58F3XhNjFyG5sLNmGvHQ8yVMie/LoJ3s0+0SJkw4hZ2r6WnVZ/GroM7YjgwZ8S2a8JzJLiilQvC1jMBQ== 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=DF948BRl8NffqmzXY2ZKiRJwHdKM7ujns57fiU8YtXw=; b=FyIh0j79WFES/gCHV6BNAXHqDW85BTp5n/SUtDXkUfDpK2ijFze3u0mswr7iy9y+zrsUD0/EaskyKYDDJyU0MUaDsPHc1DyqIJLExL/clJBgK+dqyi/QFz4C52eYqKkxRXR9AwUmOjG9CiOxiCR0OOk02BHQvoxOCikTHNDjF5M= 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 AS8PR04MB7671.eurprd04.prod.outlook.com (2603:10a6:20b:299::6) 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:10 +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:10 +0000 From: "Peng Fan (OSS)" 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 Subject: [PATCH V5 2/9] firmware: imx: scu: increase RPC timeout Date: Mon, 31 Jul 2023 17:04:42 +0800 Message-Id: <20230731090449.2845997-3-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> 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_|AS8PR04MB7671:EE_ X-MS-Office365-Filtering-Correlation-Id: eec5102c-d0b2-4f28-bf9f-08db91a48b6c 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: nRu4ZALFJnFsOGDPttakVxKWJ7g0dF11bF4gCX2CwVzdUmUYnKH4HM1bEepz3LNnZZQfwNGoKv+TpdzdkGMO0IlcS+JiAMG7zjD+RtREH0pGdTv/ktNBpaLd/uyY/sXtPbmCAJbaiOprW0ZYjVFqhKYaFiBEgoevxU96VqIfgqkKfQfy/VuNDxyOWXp7WYUDA5K2XEjtCZC6smAJJV6le2x/DSbsT1wj+mvEuhzpF0QmmeYbG5ab7hUbFX+tFcjXrFCKH9dy7iSjMpW4MxGXNhvyCK85r5vCxxsvubbhRPBWL2JiNO+THqWs0LeFuMl1VpUnxI22lyZLYSIHd1nI9YAXBZaBv7ZOQW7nIXQGuR6YG6xlwGOD+FkVcnwqCg9d3oIMTewHwjU8nKXaQy8bg3HapwA7gLAhQy5Lw1AzxbnRGR2bMingyA6rtvSKxbXyIJ2JOvETFBPOj97wOsHCdn1H3aijRnyN4KBUg+a0vwoBDSIEFIMfTTO/GRl0LWtuot+T3+uXdyj2lFpkPU56hKkKdpbSUReahmnicq5OT69coqtP/FNzhmnRUSRY3rUowP3Fjrbh9hrMuy0TE5XL2sbSOhUmo2pCJ9eIBglkK8eLOB3HBASbrWPoqgdKc2Ay 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)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9lT7ZgZSbFlBHjqBXtUdMB+39M0BNjb/6k3T/7m5AqLuemGJVFn3dlDTw3jJ4wsHIB2e+j5a6pLzHql6p3c6IIw+ILReW9tU9BpUkxUQl7N1HdpiS6Lrutas/gjGO+s1JnV1RcTnICJITmaQP3uHIfEcO2o5mhNiA1LIoFrUp4NAA1lJm+fbiyVHZuyk65SynR0xMzF8L4+BfCS+/nDc51hNyxbUaqw3CA34rwfeT7pBfg7As07uZfrqYodH0qahC4R9WIe/S2esHWBDgjXkUo4Ds0GoUjJ+IT347fph5GQjwbePnwDaSea7aQ4YiN0yV+DPyoJu/kV0I83JGHFlFkuWZka7MDwBKwuBZXI7wicUumM8jUj6NjzLdbQuMiTYnEOdUXHKY4KFwBd3ebsKKt3NaG3jV5ApWQ4+erqoYliZCRGsFPV9a4lSpzfaTPxYJSiVSEq/zmDk5uH5FAvEU4q9MKdC+c/CjrkPKaLRjauOI2Bkg7Fr2J7AqVC5b2HnLi0p+FPG2HJUMKAcUYIrLUwf2j2XHy9tqGxfGsEOU1N6pAUQnK3sJUQPRcCzZHQ+7GqmqQktSam2hW8Wwrci6JwsMKgb7cz5R/ckkhU4Mu1Yk4mwTTF8uAPtLWyuYcoO6GqHMUXPpP7Ce2HettaAjlgn6P4hcUcJILC1dJZbmTy1w/WcLYEUlYneCA83xqcYwX+GxH6gIMI9plPXa0mC2u4fsxh4ZafgaL8dhcg9ThjAxisbtyBJbvlgCWNnIAz9j2kWuyua6v5xFFLpMlJuR7BFGPpRm6ohA2j4HiK7B3pYBeTQb5Q9JShl5i5RnVc3NhqIJayhdCKO+wvQRqGYN/6HUU7MZuCXrgqKDqJ6VOl2niVs5tZSsUKK+ZuIic43H8DVs+WJceOMuL8wk2NSvkL6IhaTm9/qeZZvx+hrBoZhFCskQtGyKdqp2rCGI1ZOsHBNLGtz0cuuzxlImuMMPV9tIYsxKVQQ4HFZpg1FHw7aDNmHr5RC65F54M27OS6C7fqKuD/r9EJ+nOC8rTGG+Gt6c0bvjJ6MmgfydDaOzXxiOJy2vENv4kRI6RXfVPF29frKnZrGWJJBMCD75u7M8BUvW6EFBETuMokN/+vyK135WU2RI4WH/mAUe3/2+u/NNhMhCT5RuzN6+YToLlDFMUwWshDkhV99mdAZbR8nlcciHF99gDot9Az8CYYbwK1v6ks1Df6Kwec5sKO5oD8Z6yJap2cYoUddoTFMHPWp70fJrnwyVoncIIl44JyuNZbEyLy4M4Z5SqRTd0xY3+mRibfprdGlaoUZrNpu0MJyRjKOKKIwK7M4nHS+CXQc0IbkM6i60qpfpCJYZTMQFw70w8VgoopJ8oAPUZIEjkpdGrcu8oxARCocyj2t2QYFaca2s9i1Hn5USmDCqY87J/tqeX+clrHGnBoKJYD4ymAwxcCxswIMOuezHsAUOy/lXm2i2rBEQ1LQRUxUyWr6TOVvndPa6itynj77+WtF/HZ9xXx9/3e4SgFH/ZFgYfGminKbjJARm/dX1mH4ONhbPQnkgo8ZJvRdpBm/YoeeMnHsVvLXbtYl9u4nv//EHj8vzHxJ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: eec5102c-d0b2-4f28-bf9f-08db91a48b6c 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:10.6680 (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: Mn04H4asC1HEhsQjQZ4aK3LKnWDuTaPUwjV2POrAsvelTvXsu0Md9kNgNmNUds4v0hic0rzThpVyoSJpXVK6Mg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7671 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772932863878898465 X-GMAIL-MSGID: 1772932863878898465 From: Dong Aisheng When system loading is high, we can met some command timeout issue occasionaly, so increase the timeout to a more safe value. Signed-off-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/firmware/imx/imx-scu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c index 2d24359420d8..14ff9d3504bf 100644 --- a/drivers/firmware/imx/imx-scu.c +++ b/drivers/firmware/imx/imx-scu.c @@ -20,7 +20,7 @@ #include #define SCU_MU_CHAN_NUM 8 -#define MAX_RX_TIMEOUT (msecs_to_jiffies(30)) +#define MAX_RX_TIMEOUT (msecs_to_jiffies(3000)) struct imx_sc_chan { struct imx_sc_ipc *sc_ipc; From patchwork Mon Jul 31 09:04:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128516 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1901947vqg; Mon, 31 Jul 2023 02:47:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlFivb24K0/ya73h/jf03G95GEvvl/r1m4BpdIFk6uj7MVHaJozE5vHoFe3hDA0bA7N3bM2R X-Received: by 2002:a17:902:e5c4:b0:1b8:1c4f:4f8e with SMTP id u4-20020a170902e5c400b001b81c4f4f8emr11278870plf.53.1690796836998; Mon, 31 Jul 2023 02:47:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690796836; cv=pass; d=google.com; s=arc-20160816; b=BaA2IfSiOI0RJJwiMMXIK9He56UEiOqLsIumO3dtZwKKK7eiYDiTq08/KxFxKFkXnN M7IYcwJKKG3wG3Wv+3nuCQFo4+eZfDRk51Ks7onb+pQOhp65WaFbShtkn08Nzq8A1uRD 60hEJQhLsD64Y9rPfinqjXyKZ/5ZseSrfggO/PJzlKav0R+vQlkE+MAX9yE+mQ7J6+wD QMzVUAnNKLvj/ZYJGYIx0p2dsNcpO78W6QRH+icJMN4K2HFt2+H81tYqMhogQh48dPr+ Qso/SszonY0tsf5NB0tQeA6Vkff6sA0FrNKaQMpa7tL11B2yrhjMrJ7uC2hgaJ6BwsZv WuOA== 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=I1EaanuMVw3yN21IXzDoO2thxcz5R4f6468cftBXaho=; fh=lMFpnJZCjkSvetl9tpFZk4oM1K582D2CBXvvYFGhgSk=; b=aUW7plwAhJmmVfejP9EJDwFeEDt0/VmNIBX8NLFh5rCTEOGtVALxHUx5dmkKD85pVy WdwaoUY3VxOkWYg4gxK2d8rqiz1B3UrxEIvXBRoP7qL/+wJYXrb8Vv2fSa2uROyOS75G 72bl2s+v8wXKw7XWxWNc0yMS0Tj2Sz/MnrXViPdX2HuY8D1J6hzI09pPaPcNojMkgQrl zgobfKRxAfOvmb9QHcVmLVfbyHrtZajB2STGwfL9sKUvyHgHFgLfJkMFQE6RdAd9F3hd pPIJMk0jVz0ICtRwyi1ki6oN3JunM8z5S+bL25biQl66MpFFzvl9ksL3qnQw56QxXViW VPsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=MBBX0I8r; 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 k18-20020a170902c41200b001b89cda5e12si7225849plk.546.2023.07.31.02.47.03; Mon, 31 Jul 2023 02:47:16 -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=MBBX0I8r; 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 S231931AbjGaJA4 (ORCPT + 99 others); Mon, 31 Jul 2023 05:00:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbjGaJA2 (ORCPT ); Mon, 31 Jul 2023 05:00:28 -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 E063412D for ; Mon, 31 Jul 2023 02:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hh4/Y/ov5Fn1nOUhG8HLGwh0HpU/YJ6TWI/xWUm7044i4/nq6iFRzlyB4vkEQQH3ifC+MBYTSsxbxvXVhL+Hcz7ppj28XxBMmLX5KtetkerpD3TmLZDK8NBy4TuWMm497+AWT2wX+nXML/4BvpGDM/9g5OmjeFWUzSFUuIkTvght6D9dreE2iqZlBUsDC92yKVpzJ4NzGNJNy+8FnLdKCHU9wIYcGHrJ6obfQKLWc596SqUiFuuHoKuQH2cQcr5yisGQXPY7JEWFfzZ3e42Nz4Lb5p5YNXfthethWxozL8Bu9Vj+BW4URlpX2ZmHxlt3yJuFjcjLtomiuf8Kp1rB5g== 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=I1EaanuMVw3yN21IXzDoO2thxcz5R4f6468cftBXaho=; b=XPgHvNQozMR7ycHTwnIKvTE/S7340fVWjLrsqPTtuRcGWWbWccEq9g3qyLm9HkVxMxQBTvDK5QzM3+0tx+gyBXtbjLwaHVcg5SDon7yPJXIYcagnfrBfxDOgWRikqRjM3N3p5D9bmzHmUOWEOoQw9UA6Xyk9AkDmmuAlL5evg1ZoMxsuB3feckX709Kl2+THR2JL4apikv6yRjfmzavSX8nY38YzTEZGVWihd8qIVpMfUZaSKTDI32uzyJv75hLHq/AhUhNIka/iwJH0cd21AiWNvyVqasQNHpM4cbVTbafMpjSLIlyQQ1Oupe1cTYvTBfbyR5mF3llHdX3YDd2rwA== 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=I1EaanuMVw3yN21IXzDoO2thxcz5R4f6468cftBXaho=; b=MBBX0I8rAmEAcrqllDd5KpnjfIkhFDR3mSPtc2w6cSXqSX9hQCNLkj8iM1pu2/BzenI8uxpDgr6r3aCJYj6M394NAwfOoslW5s7IfU4D65i3yYcftr0WRSMSBHTnomNQUcqqsdXpdKf9aAKUTPBMjhn8SAdaSwD8XD/CbbXI85Q= 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:14 +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:14 +0000 From: "Peng Fan (OSS)" 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 Subject: [PATCH V5 3/9] firmware: imx: scu: drop return value check Date: Mon, 31 Jul 2023 17:04:43 +0800 Message-Id: <20230731090449.2845997-4-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> 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: a31d6047-4fff-46bd-dc72-08db91a48d89 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: G811fF9hv3PxqvFGkefcbSko+11XIAHvE5gi5jmjshguwfhaWnHkDdVvs+UV0aqeTPB7hXVKc21SrITp0UxgemFvqJY06/HOibzwEAVWI9Z2iYHBVI7niVYmqJnwtlvW4lq+rSS6rkxBfeVPjTg6d0shfX5ImpVlFzoxdfcIQ1ctpKfI6GRs7cyYGh4lTiZqEtcYAR3tR5uw2mI6S23KEvHWtimaIVNM2RkDaATG7dtxX0DbKhZ03bbAEFh140XeaVQCmhSMXkTvhNcBYu0J2/klVzJ5OOdJPPsWe2iQiPf+62V9pCai5V9awGcoFfB5FDMabGrIHiBAky34dpIqkrQfhwGFlwoy3cGJYuYOQC0ORtiiRDmstoIeJRzMaaZ4HjH958APsSaPyZF/C7wLWj2hUDjVEGITNrSDI8xEVTfLGGwJ2Ghch2PkJnbVESpWZJdKQ9pK4GDYV2GCYkYzRnGXVlibUdUj/WsPNavPKxSyS5CC9ki2UTe1AgLrT/7o98Nl/ffhNSDbjMTWcbeJkkYosD8j6E91UbjmOPbPJaN8VVpqxI8DV2+8vvDxJdwJhy6bKjNi74gkv1CqzF6bBl3Gl3ZdEjAMI31kT2WEtBXx93kfsdyGWg/1NSohoRu4 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: Jbanhc4JNpUszJlfjCPansVpCyPWpr2gXmda2clFhsDhg/BSssA9RJV3R3BeqPV4xrMXOe6EAGZ7I0iOXStICh2+W7S9UqUKnltzWyLhBFbBMhrMxwTAFkC8nVkJkCezguH2CP7dCl26gaszvf8qh1b88hVAtGnv+5jB7Y2fYs+HqWJysCQQ2lxkjJt8bWhnWsfLME7mGIMdODA+YYXX2IG3KgtVCZpjWos7SJOn7QF05NDrs3VOg97iLyDFhxFoJM498sDdZ4iJ4Ia0Pnb+N0ZluFXwRfHY//dH2gOVHk8SXmFXdnN2ylPffJxStutTKWAZbCIsjbFPLICd7c/J/yqHcMvS8ljjEyA3gRR2KzvbufLu+w3oxM8cAsGUNM/diNksQ7dVDlUAzX4DA0f1QQLQfzzuLEtDWUuuCv0OOCsasrNrMlm7n71x29HJlBM2TdtiEjTKuOSwzSvrH7ZFVGUDkmajWxkeeWA87IApAflQcD++vkIM3/agqEtdYRRTqx20YvkGCaQ/hOacyNQmSc7oMSr+LPmUi+vkBs4lmSiEtOgi1uKAJMW2AEQ7CiLOSL5smOed16weG2U5NLKC5he5fnSdkkz19lcJ8TD0kHtowwuOZQxXdfMGYl/NeSJefauwduiLhAKNjAxUl5KlzpdbEA0GYEc6R4oy8loJpfJ1dj1KCsNjQc+bLK/655ZCGtdMR7dOAH/LQLahSezoSBpagQHh6ejkoV0TRGWFVqoDoko0cvlPpImXZYIjkAAfk4VCXbbtMGLmYqXL3ZnWX5RW7V9QjRJCAnWBxXU2YCbS+TwLREriGzb53iheNT8b9pE6Mq1wT1OYJTKnQggTEbBo97eJtXORsVar3NJpD18oxNZwhUAxvRU2HokfN9L9qj/wrNRbY9jkhniCyngtP+upGlyfY2SCB1z2vHamT2gj5iWDILD0IiyDng8b7iXgVqcTUv2ekxEG+COXbLta6M2o2rOWzxWoHpbIiYFjCnUsLeL1QyQNb5JxX6XPndGpr91JWcVHjyfcWOAGNgHRVDZyorxee0cmxiEJpA+twNWtGXwQwyCQfI1D0UkBG5Z6JuLvKF6+WAM06EyO/HoTD7k60xTw5M4u/UR8AXUZGixGgfajdyoHM45vyWUuNZRMpe7RV0zSTngidj9c3cn77Hg0DqLi1J3uo9AM48QiCsWelme8u2kEfnzU8b8M1/dZdUKw1DlBSFgKsynCWPRxNUQbZhoJAuhUv79HBJlnJkdlbIHWCmPkEuoaJCioiRA4Yl8fte9srs19uxKN+UDqA+R6DQ3ImXkojdJkbyUEwcpWHjguRANO2KfPAfKP3CJtw2qtzL+VnaAJ0N7mwsIF30wcpX8w8eNGILTui1C7AVspMrI5yW6AIi/7qdO/KoTK6Ba+nkwzVqa4600lpcGunkGO97g817AghBJklhVxDTs9Lhsf1usIYElMbv2INmHetbodnAncIPGmm3IW40Wl3jYuS8Lfb3Bk21CofXnJ6172UWBz1UzSxd1lkPH6MBoWDfx8I2teIeJNTRIZhT74QdB9o7IYTlAywdlGKdPeyWsoOg/HR2s3qd/UyiuHhNoT X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a31d6047-4fff-46bd-dc72-08db91a48d89 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:14.1742 (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: B/IfkSp2Hl+Zd/+nNk4X7OuxQKUZDHMScxv/RPmOlGChUuKU/webt2U+vhV7aefzp7qzrtG0uITQ1sE67iSOtQ== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772928984204369895 X-GMAIL-MSGID: 1772928984204369895 From: Peng Fan For IMX_SC_MISC_FUNC_UNIQUE_ID, the scfw has a return value, and the imx-scu always return 0. So drop the return value check. BTW, also initialize msg to 0. Signed-off-by: Peng Fan --- drivers/firmware/imx/imx-scu-soc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/firmware/imx/imx-scu-soc.c b/drivers/firmware/imx/imx-scu-soc.c index 2f32353de2c9..ef9103987e76 100644 --- a/drivers/firmware/imx/imx-scu-soc.c +++ b/drivers/firmware/imx/imx-scu-soc.c @@ -33,20 +33,15 @@ struct imx_sc_msg_misc_get_soc_uid { static int imx_scu_soc_uid(u64 *soc_uid) { - struct imx_sc_msg_misc_get_soc_uid msg; + struct imx_sc_msg_misc_get_soc_uid msg = { 0 }; struct imx_sc_rpc_msg *hdr = &msg.hdr; - int ret; hdr->ver = IMX_SC_RPC_VERSION; hdr->svc = IMX_SC_RPC_SVC_MISC; hdr->func = IMX_SC_MISC_FUNC_UNIQUE_ID; hdr->size = 1; - ret = imx_scu_call_rpc(imx_sc_soc_ipc_handle, &msg, true); - if (ret) { - pr_err("%s: get soc uid failed, ret %d\n", __func__, ret); - return ret; - } + imx_scu_call_rpc(imx_sc_soc_ipc_handle, &msg, true); *soc_uid = msg.uid_high; *soc_uid <<= 32; From patchwork Mon Jul 31 09:04:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128536 Return-Path: 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 + 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 ); 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 ; 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)" 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 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> 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/DR6GEcpT9gTbpqYKAjG8mlAKzIWq5EG03cUTWiXyH85/oWVUFrQaj6wRcncfGO4FF8QWD/lMUzvZi6TP7uew/KciShm1g8vUqTkBtrnW7s5qgl6awS7BON3HUpKAA7gV17HN9zOLGTwvwwC28ATEQymDvsLa+QrDCBZrPwyTOqckzgX8SYLNSpjNKwE5i+hH1Tjn5KAUbFtAsN5geRjLKwMYf5RHCMRiglIAwhCDz7pRGZkiyYa64HFpu/MOAuBJmAtO9xMozuX9DumTIhh++IGHpgQD1TMAwBqFwL0Oa5GUKnO0CjCE0KOSexJ2sZuyzAJD+ptNizVSTvO3hWqOxtNHeUH3sye5Cg6FM6Cweb9JqFgF4WzyhhKziy0Ru0RhwYClmPA5pYNduEEaRurd4CJjP0/8SAgAEwI4Q85dn3GcNmAdBV1wyR2ilN/3PDS9KxUpafHSOK1aZyrT5mFQ9k2Ydor/KH68FW6hLE3XXi3KKWtGrxmD4axGG0ap1s2DcOcmCSz3td53QnCwlX4e4+Ayq3ZyeAjzQfdtu12m6YBwnk3mPyL3ELJGDXE4X7mK9jsKNlR6vQ+vLlJgdOpYsYeoyNEcENIPBDq2rQnmi5y1hOhcU5D3ApvMbAkfI/meYByB5pTWL9XSw2qLZOu+eL4/eCUxlc2VIQ7Qdfds9BXGVsEuRZP5AHWWq3KbPSB4GAQJiGCsTdDj7V2q01Y5c+/UYJRB+PIzSjKeUWdoAeKQoMmZLV4ZFQ7P9pi63n6qyzpJpa3GcRmFiajFUAZ2j49b68ilEtn2uLe93SGKhrbJ2nZis0uqjY8w8aoUD8/5Jq6rlnnyWpGiJ3oFwrYZPn0DJuwTYFN2gCC52cL5b9wBsGaJVUQywjA/XbH/10r7TKX3nb+0m/Ot3l1qCEtOizlmwnHGC61Jz/Du34gHwhqRgfr1KyyAOx2cRk1YUW6BKSAI3q2nUaawCKwkRIu7BYV5Gl48f8/DRoiWEkZOS8AJEAyiIo3x421BPo+okj+D/qnYWlfGRDX3vBm9xabvWpO7Zz0tlVwIu2wrtknEn/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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772929412445967364 X-GMAIL-MSGID: 1772929412445967364 From: Peng Fan Same as soc-imx8m and soc-imx driver, use soc name for soc_id Signed-off-by: Peng Fan --- 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"; /* format revision value passed from SCU firmware */ val = (id >> 5) & 0xf; From patchwork Mon Jul 31 09:04:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128578 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1931711vqg; Mon, 31 Jul 2023 03:59:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFn+BxSJoyLWsRYpCPXrFheQdrQXWDB+XgE0xKlrRCGar1A2HqTP/qBYLMEQLdvXYGUsFQc X-Received: by 2002:a05:6808:10ce:b0:39d:f03e:71ca with SMTP id s14-20020a05680810ce00b0039df03e71camr1835036ois.53.1690801149799; Mon, 31 Jul 2023 03:59:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690801149; cv=pass; d=google.com; s=arc-20160816; b=ejFhBVJ821M309gE2AU96YBMfNQr3Phypm4tfqfw6R3zhVEDISx515grXclaMH7Hpn 9c9R5yOJS+vDmyTtEpheevO2sqyyR+Stoe3qGpE023ZRzOhRt+6sx8lfNuAe09QdlohW naUAlPqu1Ayz00+e1fVB8Ag7Nai5fZiC2huxTKEwCtanAZ907Cf+gIBZPFzlEkD7Crx3 zOXHEJw17HBJQGWIgRx8B6jUVv4C4qQfQSbimvzxkMGyo/rXn0Yz5fJxxYupbBZifLX2 DqPdQgzpq4/7kXJeLYLJ6kLaFUpy2oTTZ7FV1bhZTezSPb/ThHtEvmoPfdNxbsqmTZqe FoJg== 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=3rAd508ifHoA0An7ui7Mgs5JacaZLYV2a17LbZu3sU0=; fh=lMFpnJZCjkSvetl9tpFZk4oM1K582D2CBXvvYFGhgSk=; b=TFAtWGrQmJGvxEe5vnqvZZqrPcZSuW8UsQEWSoplOsV1KrEn9gvYzGfLvPkdcPlDT1 8Vb9pQisV3eYe8+GZKAtIeXBAHoBaHylGKXiD+7T/ozqK+IJu4IIdiUFG0POD9lebIEx iI4VX91oiB8WC+wdMrrjBDSBJu/VVp1CjgYFzJLiEWHwZDa8/ODNlZ79KZ2z60rR5gGS O6w5jWn/qfNVPK8iQqfCT5NwUnsvGq9+NSqS695i4mwMGolOqtxMt46HP5Ywvj4vf9Wf v7L+gjVyegHvbFmlXc/RmRA1t0Tl8xS1LH27UV/l3s3Q1ZvECXOqpWNNc7lN58zokeGN j/hQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="UgSR2/I9"; 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 oo16-20020a17090b1c9000b0026813cd5719si7509948pjb.128.2023.07.31.03.58.54; Mon, 31 Jul 2023 03:59:09 -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="UgSR2/I9"; 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 S232117AbjGaJBU (ORCPT + 99 others); Mon, 31 Jul 2023 05:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231633AbjGaJA6 (ORCPT ); Mon, 31 Jul 2023 05:00:58 -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 B8D2E10F0 for ; Mon, 31 Jul 2023 02:00:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZP7FRmU69y5rLZa2uKgILCigLsJjajAGAcfcmvVMhsVqvo4Fz4xmWGwvKXJ9Q5QkqbyIU1BBYyUgnmIpaBBPqCnZ77y6CypyVBxjRThN6WK/eIMgyH/nMvgeKk0zCMohez3NOMtfFjzdz9DAayRE8elYiQ13yKqck5LzTQYNasuTv9Z0phM9lmcjRACsnOKtbmfmaWG58o/tG7ls0r3tDRpFpHeg6Q2AHQzPCNjqNaWdd21yHgvOg2o3/jgxgB8Y5tFMX1sBR9TTdCv24vq7TQ2UAzyZBhUJDUEHlQQzpY1Pt7WbDLAGsiOZ+so9zldR4qWH7YsjW10Jg0xhz1Gnmg== 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=3rAd508ifHoA0An7ui7Mgs5JacaZLYV2a17LbZu3sU0=; b=JPdvwSQP3cVPjC4kIFVORj7bxjaK6efr9jnpfNwfYC+8Z2+mxYbYzTcS4TKs6LfBnxjZSHQqzQ2+Ax3mCNoy4B4hikM/p7Da2XdV3cXlR2MasjRVc2Ih382PfsTgflddSx8B02c/379580nCmEhkkVLYbg42MlvqngJ2NG7lmA+S3HO9CpRudrgS9b1Kvf6FtJLfh8bJ56fevTDzZ+6TkAuJBw1wAS4KlIvif0AxIXhhljW8edQMSN7XV4ltYc4XQMekvEADA9YFPEMm6AWh6xRR+w9GJCmeby4R7TLF+hN5p/hyP1/JdkC4zhuLCX4+8HzC6uVXg3XpySzPgP8B8A== 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=3rAd508ifHoA0An7ui7Mgs5JacaZLYV2a17LbZu3sU0=; b=UgSR2/I9+7UA+kg7Se8/5uOp5738ZVNkuWWhuniZMVRsbjygS/T81WKymEJPXnVZG0+AcCv2LGRo5BdLsiC2puE/hNZdP6Waj+zfpYf1NOLKFMHCt26m7AeKeDBuNVrZy9V5Kgo8H8e81cB3OHgc5AWFvbILiYVLd5WGs6BBAjw= 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:21 +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:21 +0000 From: "Peng Fan (OSS)" 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 Subject: [PATCH V5 5/9] firmware: imx: scu: use EOPNOTSUPP Date: Mon, 31 Jul 2023 17:04:45 +0800 Message-Id: <20230731090449.2845997-6-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> 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: ae984465-13f6-4b1f-9c6e-08db91a491ec 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: g13ijqHHFTzpSFmZd9Na0az0et4kWWKVlpOcCIUw7YCdWnPksUqi2jFqdz/6Ba/cGa/XayUidXVBvDd2Ovb6UDtMsBrXq9W4SnH4RykQrC9oQugXu7ShxwGzpKPm+7xFjYnQnGVu2qxNDeuv2IEV0Unv9q2o5rKBC70tz7eDtdptGfDT1Z5wysT16GhDAC2OVRsNe+WazxUmHhZat2HCz2Iv3wWYqdXz/tH9RnPBNCHwOtj8nE3dYiCIJm0y3cXJUro3e7r8S8I9xA0r3cV42w8urqc3cF2NsicHAvcbPHNcx76kpq/OyDhInq4W3HSbiAgg44stlOtx1qUIJA4fj8lY95yJIXBQPzvj93JoXtYV4/0KUi/WZxTif4vM1un7wWzK8poRP/z3/0CT9aK2z3I8oRoMqjjc8yYe3XdzQW5+vrhPUbP2zMMXybrzJ+q87mNVIHeLB/6O44yy3zbmc11DpCQ7qKfrNGkQZNApifCC1ovzFFt7llOLVOY9GK12VFSzabHCQEY5xZocz3cYpLo8dfLm8hjm8n7/hTovO1fNnCvBZY0OI/EPYksTtwJGRz/r9TuIM35JG1/sDH2FJwMAOYqBw05f4c1hULxzGeWfPrXbCs7dNSPLRF7C3Q/d 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: 5ZY+aA6QrU9wnwd9NQ1s2pisz6yal/LQqxjuXHqw/tgqPr3Ck7PLj1+bcWdnC2zMekeQBZUwMF/VRHGN1mBzIEUrM+OzTROR1TpAgB0icV3wUMYg9i3uAvdEJxR6NFFwRpGoH34h+8Hk/BccklHiNPHFrrw0BQosqMadCM10zubtlyGTFQDHQqyroGzgzvOAY97AhvPHrb2TqI/PL3SAWX3xUpfmRaomI96LHqaB/2TPEpLCRmjSwhGmiz1/LRycnrH0C2kLs2jG59coNWwXBXUAGOZMhSlpwm8gk2YlKYnrqTMMRAKnAPzYPpCmJ5HeiV11+t8d6pOXHN0m93qtbmn/4n3bsysYBEq2UpVJGIiiRTVMRB46vJ5m8Qky1DTgFIqKoK90a6lc1eZUMCb/Zxd+I35UAysLLnvvSFZhyl+7XK+obykmlxnJrIgN3TCfL9SQTjVSxWgQUnZLlN7090wjhHsQTEvCWI0LJvX3cuQadAtgcKtoSke3W6RyjvS9a4Xp8kbV4l9uRqAQvrnSkLmlb0ClTfW6Fl3PzR3TdRgmaOBw2yqthIUqU69bx2y0sl7ftYtUQTGy+iu0wfRsavD3MlOMx90pdYEfJOivqhA7ifTB0uIPqaRicZAdV1jzfqJ5QVOjEgjx4rl05dzwRpdAEYUXDUVSFrQ7gFzCEW5RBuWmA30rV6u6kjWYZp8oCLJbS6EsSrOFRgUbntldLlt1H57ebRPvHbw+RrEGyoDbP28q2sVTvhilGhUNAUjpUicsZ0XDIb28hxRmqN+k1jFsjkKAZxlqk6VmdClv/1Tydu8/106/d/Ma2lc9Wgjg0Tz8rrD57101lk4Hxv8q+whPzJ0zelgspdLvf0fSrdUW86vZ7muR2rSXFt81+0kBhu/NED7WjS6xmAw/fOvg2TkQYT03XRKTTmgyUZHM5NII72ivpy4gm5LT9FSqzncc37rsA1n1nGO5qmqC9LTs7Bmc7YAfZyE4aMSUMV7Ykg+AVLRq/B6+JCBa7p9fu4d0T5+0htGeorDvbqEM/4Gwk7GRT+oArSj8xVIKIA9R1xyJIOXCbBV1XXoB5G7qLmEUOFwGOWIY6jugQnrWhYoYUDU/cG+/e8LqbBm9Gs0e+vT8Nm6H5dSyrnub3CFV85B+48souxUsjqb7Xh+8Ae/cwmE2Os2MDco+uehO5njjzP0a81dKcvtiLR3Ov9HD4/6RYkyH28BzhraqzsrucnolT7MZS657CiKV3lXTyV060DaOt3jq/WHFfv6fFOYj+NuS/Bw+8aenip6ptxFuHsgW2BOTT7zJRZwSa0OmJHQNUVRIhjhgsOIeNl7jGw/I6ja5qvDeiW8NEeRc7HtY5uBIt5xLus18krF+xlgMg519wQ3TLxHdzyRNT/u9TzZMceCcUT7RVgwob8HTliWaB6KYMLiAmN7n9TyJ49EyH+WVUz+8yYlC2OXMdncB7pWw2y9L0V8lEDD7CLsYjn41lfm6o3MIhU2p4O0gX/f2g6e92OPjQPT4KMKWRGAWOqMKDUDYwipNgqnF+xwgOWlIY0N9VDf3mZwmSpHu8e/sWubYUTqkzXDG9Pgmdy5IiR4Ih59A X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae984465-13f6-4b1f-9c6e-08db91a491ec 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:21.5224 (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: 7kASZT/C5hDe4vcwFRXy7FxAk9jDTlpDkz3vt1UohweJKXMc/iPq/FJH4U3JswHTvM7GGuoQRd7ZhpbmP6T32A== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772933506551161888 X-GMAIL-MSGID: 1772933506551161888 From: Peng Fan EOPNOTSUPP is preferred than ENOTSUPP. Signed-off-by: Peng Fan --- include/linux/firmware/imx/sci.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h index 5cc63fe7e84d..7fa0f3b329b5 100644 --- a/include/linux/firmware/imx/sci.h +++ b/include/linux/firmware/imx/sci.h @@ -25,27 +25,27 @@ int imx_scu_soc_init(struct device *dev); #else static inline int imx_scu_soc_init(struct device *dev) { - return -ENOTSUPP; + return -EOPNOTSUPP; } static inline int imx_scu_enable_general_irq_channel(struct device *dev) { - return -ENOTSUPP; + return -EOPNOTSUPP; } static inline int imx_scu_irq_register_notifier(struct notifier_block *nb) { - return -ENOTSUPP; + return -EOPNOTSUPP; } static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb) { - return -ENOTSUPP; + return -EOPNOTSUPP; } static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable) { - return -ENOTSUPP; + return -EOPNOTSUPP; } #endif #endif /* _SC_SCI_H */ From patchwork Mon Jul 31 09:04:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128505 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1900215vqg; Mon, 31 Jul 2023 02:42:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlEQy6KKX0dY3cw9ucLjBH2VIcM5h+BaSmBXEbXqzVON2vm22qHk8kuBPG7mGJuWy8tU4vxT X-Received: by 2002:ac2:4426:0:b0:4fd:fed1:9030 with SMTP id w6-20020ac24426000000b004fdfed19030mr5737740lfl.24.1690796543663; Mon, 31 Jul 2023 02:42:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690796543; cv=pass; d=google.com; s=arc-20160816; b=aArM506r73DZ7g+65EaETSHWHM9uNSl5jHWS6o3326aGwLaB9bBjmpgbkVcVIfl5BJ pX243mjdLghoMcesTBzSYJyo0qzyVL7uecXi8XLrZf6B8Jl81/CQcNk8oUnhZNUFjeMv GAx7GRhLoZcZpIQXJrOdsO1g1O2jcJIhohloQofZPoFjzDrdFHXohgp0OVL5MWmvFw4R 0ub08CUywv4xnVrF8BzqTACpYLBcOSDourl7bnC+PyxFCBaJUuKNSTPa9pR6SpwrijOK QvMCS0ltUOzl8xZimpMovQmciCWiJa7MidOr8ZnLYz3ccDezF6wjfQqk5vyQs2s9jKT0 phwA== 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=umI6ZrQ15cKelsFX67lK86cAvVI5zNZJ2V7Gcc2eaAA=; fh=lotafNBR+zTgc4Q4jiSwh5mZA/Zx1bp0fAc65GJXTjY=; b=Aw9lgexyhizMi2BTErXajK9s+pp8ShUB2U19AsJZ7HCkL+J3zxljclpOxTRVDTOIV6 Cpkb4nhlqAhhvICfC5TSXJZxIZiW6ZMNLDs6G4Tbpr3oZis+ZSmWySbpe28wsyVHBO8O 8xlrFUOsyYvhwgzB+WWkk2uTaBkdai2x/d61wRcGp8Ymky37zk2wgiaqacYt3tZgo+3a Ed74PM/Ni2+RXoDfnmzotz1V7/J+yZZ+Ahz463i+2HqUdY+kz9VcmfLMsR5sclJ9CiSY +3ft1VLSUyh/xO0oTPoBM+0wzULBls9B/Z0bIy4zq+EorkpF0z9XDfEX1IDS9flPbpnm wg5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=H0WwN2FL; 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 s24-20020aa7c558000000b005223bee1f8asi6387181edr.243.2023.07.31.02.41.59; Mon, 31 Jul 2023 02:42:23 -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=H0WwN2FL; 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 S231556AbjGaJBh (ORCPT + 99 others); Mon, 31 Jul 2023 05:01:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231524AbjGaJBQ (ORCPT ); Mon, 31 Jul 2023 05:01:16 -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 55DBE1BF1 for ; Mon, 31 Jul 2023 02:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fi/ypUZqeq0hN+lPeeTy+z5Adhz2DPJN9nkuzJ9PMvgzHwg/HlvrJpHAuVdc7O3iR9ugpNkkjiU0bQMhOeKULdA+M9cqmlABo3YDdTLmbteDTHpPMdVWq0c+p9jO6VH2qn9m3tF1DwvrR5aiBGt3DjBuBhuxqmgctm4Y5wtlf/QEYifqZrQlpsZVpPBkI8hEylb4TRV4J3038qYeud2vBTbu+7GtUeGEYWfJb4Okd/mH2UCGRrgB1xKxh1QB605R4/aLFAtwdDpA4sgjBjKNscjJDEm6PSJYmGS0Ukh8+AUEoSBPQDnV9phEAiy+JbTE181Iw7EYCEPWLRB2HgLiug== 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=umI6ZrQ15cKelsFX67lK86cAvVI5zNZJ2V7Gcc2eaAA=; b=bV84MZoUac0O6HhAk2ccSih4hCzc0FHJkgXPIs+5RiN1zEcy1Tdpx2CPd6pr8MxrRxY3ZSAei1D/F4kEOl/FuycZpH/o+nk/4WP+VzfVf8qI3NW0wGDzfAetcaFIcdsWj5pdspE0z/UjW+qoF/79Fo+jNKkxgmvN/NhOSLSF+hbcAL6ISkpL4CV5YClhzznq1MoKPd2xlDXoCt6KiQLGxCxa0r32y3gEkzqlfTH+7F5s6tIFkOIIAID4ot3mAOC9mWQI6XTfS+poZZxf6ceapDr+aIncTYrwrocCBnbV3XzJuddC6Bn2+7pYZxZ1gAhMRsO6G7HffNibD/dGJncu4w== 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=umI6ZrQ15cKelsFX67lK86cAvVI5zNZJ2V7Gcc2eaAA=; b=H0WwN2FLrnW7BTQCIYWHY0rVgP2WIJq7BbPjRVLLCfX8+CUhh7SOmIqhYUsif5MjptxGnRiCt8vQEm4cquBJSkNa3skJJe4++R8S4thexW+RceYnzwwhSirkL4JAdkrMyYkuYLEPCCJcY6TJu6neiqe11q5VUmFhLN519HlK0rQ= 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:25 +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:25 +0000 From: "Peng Fan (OSS)" 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, Robin Gong , Peng Fan Subject: [PATCH V5 6/9] firmware: imx: scu-irq: fix RCU complains after M4 partition reset Date: Mon, 31 Jul 2023 17:04:46 +0800 Message-Id: <20230731090449.2845997-7-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> 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: e960e039-c3ae-4c2c-7af8-08db91a4942d 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: 3E8w6iaxmEt/85ux4N81q9ozCw0bUhRPTs5uHzjLq/iqY1ZDFYxxjd8gua07gjO38mHAYJ/tWYRYzu/7/YmsrP8SIas6/AVYaXUWQzF98af39K45oZFSBiEPjsyExbq4WNt2pz2Jo8hEsKQhKkW5ef/wF1ueyAWRf5fHAc01NMo0wO3hGkk5tOYQX3nuUnaJm8vUlEmdFRG8XJTpLPzhIFE7P/mU/8ZTIHd9HwBQHe14mAv8NvC43+AnWWTOsAdxZ2m4/+2Po30hxxW+4tWXjxO/E98UBaP9nWHqmYPFW40TXboq6Pvm+f7pmKKBMOIVJ2VFtaA+QFaTOFHGsvo2b9PDUA5WBi8jZ+E1gZxTQRCQegeQVOAeCDpLz3gPbAFDIjY4x74gRS5JBOpH+o0MdUp/4jW3SXNOtP008rR6zUgpkRis0pDjEIregUglNaimQljme2LPoS5Kg5O/wszMAsLALUGocNVeXBol3P/67b/Dl4ZYktzVTHjDxKxouebnlWIKlsjNIZHKBqYpRqg8p9qVzLm7S8VetvXzxLzk/+ShEI76rIZtbh4/lv5CKiHo6Uc5aCkj0WjNr7DVQhq3R40oJbToImbYu2AuAN2R/w2qsDlvs0IuHk1dP0PTJR5e 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)(54906003)(38350700002)(41300700001)(86362001)(66476007)(316002)(4326008)(5660300002)(8676002)(8936002)(38100700002)(2906002)(6666004)(478600001)(45080400002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZVsSa8cSn5sCJApdqYHtcwgz/dAG7FDAz2tJAsotcFJPb2cji82Wqh4BjWc78kXs5eY49nmZDY9ZJr/ZFKWiuRTTVhtuVJ+9oN1vXxTpB98YqH5zSiTkiw3G2VtR3Bal++yRkL778qVySu0VKECXxwhOXDF9FV8dXFWlhdwUxedJKj0b0DcjygFiTR9RA77m9E1hGX2tKLG808powPszUoXeyGsTJ79Ccbg0tvOtc6F7EWJaPLOr2Wrsgp0aSvuO7d9nw4MIi8XnZPVET/uDFfaN7A+NapY2qXhkI0Okcqvx5EEqvwNijvtS4ffPqoESHze6uSarfA2M4NVWbi6moL2lycZOUcFjEvGqRJUnjgvV18aA0anUyKV2Sy9VyUunh+S2B4B5Vfrhs49irTrA5euzulvae33dgiMfqbqcFNMmoaT476k4enI4GlpcCvETM7xB7ln+Eu0VPOcW93N1QvLvqY9FDtiSL48KaHiaT+mchh6GHSeZUtdT+lMquwiwJtxXBAjTQA85VpxBQiZNtbsBVCBIzsIZEmQyS0u8A8gb6DUqvSHoaa3mRSP1RS44Ej7GchTzLY3RKDxs398ik4MPHxs/4HXSnZjwEP15q4mKrHAKd2a1hu6gBfSUaJCAffE33HsglgZ1htO0vLaOzvh+pzSkISAJdnKbXMvR3SN+lefKjkcPyUThi8qxvc0HpBCrDJnXSl+rkx1y87VWJMV53kdCLucGGte0+JAR9iOFV1OMQOpEWFTntaB6k8y+Ruxhw5da1XX8HQNTuCP4HlvGFO3jLxPqsme2EccIzpVCDqRBUtBjcM6JM72sbL5Gx9o3nL1qir9g1h4myfDlwPh45tIGso2CJGlvvJjeyFRBt8U0q7QYqFUYqAtR95GRYt0e1OVSKrza/XwM751Fp+guybqV/QscTXY78PN5MvnkcihdSqyF0prCUb3i3qmm1WwekitVZMnRJbA2cWWnJAtTXPtkYHuDjL7fg91qqcHBhWNSrKCyeKBRjlijy8Afqz4xXIR3NvYnrELSo5dcXqOlHa0+0kldFm5KmawBaf8tJtT6zy/VrKEsA7eC2mmw2cLQ/c86NkmpoHOn5eKbwc7G9Vud87EW6D2jtk2vxAy+OtsvHhRdeIRSeAYeNQs5vHPeUIGKmpMoZrVO/Q0DWYpujtVgVqnjkAuVyMyrRMpFI/4NoRv6140mx0v/TIO/rjfVYznH5bpKs+tXgwuuhCTRR5DKM/yNExsmiw+wG4+gR8aO9+sDOH8XUCjdhrLsD7fIVl9zFhGKS1M557wgGj0mrb0EpojN6W7+7pEsXThBSR8I2vHe2oG4njZfj0EDA+m8V4KJqfv0klMnahMiD/S9INu4GIXWkg68vyRoXK1AyivoHHR/EU4DuRSAgktdfXVPN+nMTFo5gl/OOgfGpIjIFV5puVdngo4zkNZdE4Sh9sqdACiUVBjzr6enTuJfqDp0MdorxWy4VXqCZDTAGXxtjqoQFuUpURGfHNUX4Ch3F1lL+hkMKNTEqyxToa8VpASd8mFb8sU8auRGC6ktDgeoHfOzyAdwwpT5QNVWI1kUKY4YCyW+eFnc6Gj6g+Yr X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e960e039-c3ae-4c2c-7af8-08db91a4942d 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:25.3152 (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: zqSXfKApVvwvADQ1JB877odIvz8fJcYpYbcSvQg6CtMusEYa3KuDdX+52/0/HglxoImJmYoAWFRZ47qVrYJ+YA== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772928676516283534 X-GMAIL-MSGID: 1772928676516283534 From: Robin Gong Use blocking_notifier_chain instead of atomic_notifier_chain, otherwise below RCU complains would come out since unregister/register_virtio_device () will issue mbox message (mbox_send_message() is blocking) again after received M4 partition reset. Actually, no need atomic for notifier which is so tough for user since this notifier is called in worker instead of interrupt handler directly. [ 389.706645] i2c-rpmsg virtio0.rpmsg-i2c-channel.-1.2: i2c rpmsg driver is removed [ 389.767362] Wait for remote ready timeout, use first_notify. [ 389.774084] ------------[ cut here ]------------ [ 389.778729] WARNING: CPU: 0 PID: 397 at kernel/rcu/tree_plugin.h:293 rcu_note_context_switch+0x34/0x338 [ 389.788131] Modules linked in: [ 389.791195] CPU: 0 PID: 397 Comm: kworker/0:13 Not tainted 5.4.0-rc5-02977-g08f78722f07b #26 [ 389.799633] Hardware name: Freescale i.MX8DXL Phantom MEK (DT) [ 389.805481] Workqueue: events imx_scu_irq_work_handler Signed-off-by: Robin Gong Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/firmware/imx/imx-scu-irq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index d9dcc20945c6..4408f150b3d5 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -42,25 +42,25 @@ struct imx_sc_msg_irq_enable { static struct imx_sc_ipc *imx_sc_irq_ipc_handle; static struct work_struct imx_sc_irq_work; -static ATOMIC_NOTIFIER_HEAD(imx_scu_irq_notifier_chain); +static BLOCKING_NOTIFIER_HEAD(imx_scu_irq_notifier_chain); int imx_scu_irq_register_notifier(struct notifier_block *nb) { - return atomic_notifier_chain_register( + return blocking_notifier_chain_register( &imx_scu_irq_notifier_chain, nb); } EXPORT_SYMBOL(imx_scu_irq_register_notifier); int imx_scu_irq_unregister_notifier(struct notifier_block *nb) { - return atomic_notifier_chain_unregister( + return blocking_notifier_chain_unregister( &imx_scu_irq_notifier_chain, nb); } EXPORT_SYMBOL(imx_scu_irq_unregister_notifier); static int imx_scu_irq_notifier_call_chain(unsigned long status, u8 *group) { - return atomic_notifier_call_chain(&imx_scu_irq_notifier_chain, + return blocking_notifier_call_chain(&imx_scu_irq_notifier_chain, status, (void *)group); } From patchwork Mon Jul 31 09:04:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128524 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1902570vqg; Mon, 31 Jul 2023 02:48:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlG5N/P5My3eYFJO/IV527E7l7738oSAovepKlIBpUyf5/AeIIJbvWJZ84dz6bszuk9Zc2B3 X-Received: by 2002:a17:902:f551:b0:1ae:8892:7d27 with SMTP id h17-20020a170902f55100b001ae88927d27mr10429075plf.42.1690796930693; Mon, 31 Jul 2023 02:48:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690796930; cv=pass; d=google.com; s=arc-20160816; b=Ns+sJciTKjsl27dvhjLPS5L+X3r84iChH5SzjOJ/nqQGFJMGxahReedovhaBkFkrkN 80tYR0KAS1xQjNc/5CCTo2w8YwCKal9FzkPvdrVm2vV1KZjSUOmZ6TI0pGPRN5C0iZ1H odOBvGIygavqudmN5kagEI53XzfSQXavfjlctgaIb3p8EKeuyrt6P0GTtwvVMdw/fqK9 pGEBDE50+F808BKs5TSO92C1gQLcpUH61GIiNK7lhZRvocsdnmODeDfG7nP9feCPM2BZ TsGkNtQxrgSid4isYwb6fSUnonjEyY8V9j2qjm6Zh0QXNBp/IBkQlQOs+tA9S4MNyKzO 4XOQ== 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=oOSwyoTYZ6x0eroytkCZygb8EdjGii6ak5j2QyBRG8o=; fh=lMFpnJZCjkSvetl9tpFZk4oM1K582D2CBXvvYFGhgSk=; b=yxBAaq1rNTK2dItO+aTek4cnluKsD7hT2FzkojgI0uRow2gohEjXINvKgIuDvIxzxE BjK+p87z+XlDumIgtWhgioiWVvxJ2ngFMpqeSHiWAFVk86TVRcR8J8aOD4HSFZbuNyt7 Ttpnt4JM4NLV0oJXUNmfJf1XK4hCQE3AjOPTcnPpeuwm10L0Uo17et5RBPtaXw3lzwf/ WHfLkdHWnIysQaOfmdvQLyurmmDEN83unPN3MFaPdiIm83wMn5ttAlSZR3kt2kE4d+7M DhnvSAH0xJUW4W03LxP1mu7aujl/R1Msye4FHB/01jdyixdyXWJxpyE5c7w1TmGEMZbw tkdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=aU9wvAH0; 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 u3-20020a170902e80300b001b8c47563e7si7348850plg.28.2023.07.31.02.48.37; Mon, 31 Jul 2023 02:48:50 -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=aU9wvAH0; 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 S231716AbjGaJCM (ORCPT + 99 others); Mon, 31 Jul 2023 05:02:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231481AbjGaJBy (ORCPT ); Mon, 31 Jul 2023 05:01:54 -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 11A691B6 for ; Mon, 31 Jul 2023 02:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=keZAgnhXPQZZ1q2TIuW/05hZjBRm8XUsL7fLf55KjfGYjQdFkDAzmnd6SpnoGMCjwWx67U5QJjm9LeuYZWGoRKW0Lgyd6bj3KYMNwom/DzwUJZcgiAN8v1wzdTW8IKwQbCXkPXRe66E0Uzep2a71oNs6U2gZ6O5Afy5zxj3/SVg3S0Pqd6vM1FPdddRqnpWMmFOFlLQYO3T3bP2m+jaNlimqkSASBEvPetkxXbxnAYKv/mVXOkIRFLmTqDZ3sn/k2GW/K8QEUVIukjkO3ABZj/7cb8avooeZIS53AqonO09YC+4qmwItTnD2VEMISpkmVjuJMIyD/kK1nbx8iMtO3Q== 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=oOSwyoTYZ6x0eroytkCZygb8EdjGii6ak5j2QyBRG8o=; b=S4K7AmwqHqmTJH4ZS8jLIK9ZXY5U6udUtpd6Di3TZgxli0zPi1xezKQc61Qj4zwM/HlYSir64CnPRuzNzH9psxa5nZ5u9O/5P5WGZvIow0buyztl6GzyMg80koHViy50YAHdp3FO8xTQK0Lq1ZbPUcS545W7bd2Bqlet/yqO++uqJBuZGFmmKzJEAs05FmJZWaQSmEIPRnOZsAgbgGitNoMLaaGvRNUDNlNq9f0VLvYTXn2jOAenGSyeo8Xv5kVzNesq0n/JFVFy1/RG9+YNTc0jhxN8T/5uewdlaUnV/1ONFhR5vThdODsnyevH8J3CjmE8pumh1C+wE9fFI6IrRA== 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=oOSwyoTYZ6x0eroytkCZygb8EdjGii6ak5j2QyBRG8o=; b=aU9wvAH0OMJK4jdDfSLJprMjU9kmgWwvA2VfoCWXFZU3E1ecnM7XXEQ8xpSzwYVum25V0V4gdtXV8+Z9sg3eeFJmsjTA3J1PP0FbP6jmbsT6AWjkbNfvV52IApoc68XkJXX8xyxFZi9n3AO+ImZAwFHA+pmiiixOa97h6Mc/m+U= 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:29 +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:29 +0000 From: "Peng Fan (OSS)" 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 Subject: [PATCH V5 7/9] firmware: imx: scu-irq: export imx_scu_irq_get_status Date: Mon, 31 Jul 2023 17:04:47 +0800 Message-Id: <20230731090449.2845997-8-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> 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: 8ab2d4ab-8f75-467a-0940-08db91a4967f 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: afgAoqF2ZYSjjR/3vu6clF7nhF01nHccwZOGuq2H5tMd8mqCn2kj61xCq/dH3FXS9q/B2v6R33sOQ8yFbxArVVISul1sFjZxUUKRjg1VcArMy0JohB5DzdQZsNLIKLdqL71wAt33YYBrmt0Q+QjPhBQir7uRKswsSiDvMegEyzWZBMIe/qWFchBt4xRG9GdmL7fATjdvPyJ00ma/0i0xVw+79iAnXOPKxt7boWyL62mYFwwHDEF4VZVBDw1YNG+sOiBVx6jbzlI3m3xXKgwJ42XZN3XesUjB+IM+zS+5/YWNLbZCHMZ+HilPX/bq2KcnRoMXywAEfQt/6Zuh7WT0UuTy/XfAGhq9sDJP+7xgZ2VC0PzOZNfcF3YlWRdRkCGbq4ypJQclny/8So/ytABHLZasX4dWXbnA1dUz1dqx3x3uzUFBFigMzQdQq+YSz5hIvWLiph4nYAJTWzNyVpEbnyLmFhz0vzIzYpVABPwLrLMjhBA5H7I6PDzE6PNiKDv/6X6aDjDouCYP/cO+mSoZqjyAa4q3VqOboFXyg7noVVl79V90nXi85OE3LwmdAe2qJvEWJ7ri02DwEV7Pv3ztFsgRozfQtFkYvllwN2vS30w1x+uEu39w4N1alp3imR6h 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: LUTmo1+1YBsURzB2DUZMYVNMuvHVp5n7Y6CtcXJk/fdwPN4uApNL8Jh1vHiKEvr/KF6wyQFo+T/l+KSDiKy3Gr0T3luAPeFHINw7oSgY7U3G7u1RGCOy1KN73D0ZfAyG1xaketEzZmCyh/CFJJuUYAU04+6J9J0ZWi/10LQynEuVECO2d9KNCADQIKe+BnuSzLMdFxy2fbQxM/V3FHxjA/upykPGDUPMmU6psDRX4oyk8sVeb2c0gWYIYIAbntoGjulR343ZgyJSDWPICNiMjzc4RkL0J8uIHu3lcYrPiVbmRMhy4BRG6Tfvpc8FjfkWSAhB0ozFtfH/TAN77fFD/l9y1TG1D7iNly0Yz70GcfI6LWkhXNebir0dmGePRnawQeDskEYKkZPSjv7U3YuD2luX8xLx5KbjHkUegzndDN/GW2JMYYKGnZ3KD6a79RP2SeIrkoCwJfx2LMEcvojpuPQ+DuEjTg4THWNimuAZcW/JpBEaKfZqfeSbbTGc+mVM4PIJp/MXCankC4RllIvGaZRrCh1Z6MzVxKpsl+Ug0Z/i/Z4Gp9XrvOWLYLTUqmB/i1Qsbr+G34L4YyPrWgsFL5r6Onb82ToswwAR/MSyyIhjYIyD5c+xg/FrvNShePuV7hDwVbDNiVmtfC5bpumgyGCvWpKvs6dKMhYVCdf3vLqQT6W3O6fYzvaSGX574oLhb8/kjBigieucG+hZUweuv2JmMcsCdTXDZqf2/xUGgVLuC+M3jU/8sFnm6xwwu/uHJQgo4XdQO2/3Uu/ZeEwc/02FonTcUVIn/ez++yPDGShqN5VT9GIkiNHu0FouK5S/AdttrjZW0uV88bBigMFHSvjNKWT0Pfz64nYcOwWL1dwEE0GNLd6CC+UNsOnT6a6oqi8/001oa8AxaSL5C6Aq9IbdFAZ9Ev8ShAPe9fjUIuXVRfY0BFRDqrrqYRTPWM8kZ9SKIRsl9T5DuU1pvWryPgRVbHOTGQ0LgjN5cwUI7lyjZ0qI2knvi51jJjuaLfV6UzMExeSzh9EY13fP+z1Sf0tve+F5zPzJEGsb86zDfLsgCQcGHFkkkrXrksepEu02CN43zkou2+N5qlaka8V40SNwOf12LJmPS5S4Vw2AxFBxnZCrsc1IguAPFH7xXMCSxBmW8XYLoV/HuFO8IrtKmZ3ndTigMD7EEwhmfDX0p7SCMQIKUGI2wnnEgP4yVjG22GJK3zH8XUyLUdTNz40egjphFiOG7mehbeHitaAAHu7CzSK87mx73+Y+DLDvC/Sh3lN2ajQQLCpTiiK4R9ZTlI6RQgX9bBPiQxN5Pxe5YsQf6V/gLeaMb01Vk/uSrCF8AE1KZz9At0D6cyfkPQi1pVvQZL6LAl6/Rn/hicSFfMlY0nFoR+AEa2yngeV42cRsypjXtyxLDgO2oD5nMWZvcZMHOJ7qOi8hgsJdDyitiK38qbabsCGRcUmjKtQnWMpbrfoBS9ukCH3M3jSLgmclpUrH5kYEm9YSTgp3RzpPZd+OrMKvYqCrhT1z3O1y0b9uBLrklVjEt5HK0L8ZSdLa2rYNflY4bPfzwsAKXxX2lhS6SSbBFvNSTUowZaDghuUw X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ab2d4ab-8f75-467a-0940-08db91a4967f 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:29.1200 (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: LF4TO/4++qNAiUhpZTvAp/A/ogcCGF7FSnqDysMIrvnuforWFgujCWlXiCRiPWWazNPCseZZT5iI9NnceLCRjQ== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772929082626625572 X-GMAIL-MSGID: 1772929082626625572 From: Peng Fan Cleanup code to export imx_scu_irq_get_status API to make it could be used by others, such as SECO. Signed-off-by: Peng Fan --- drivers/firmware/imx/imx-scu-irq.c | 40 ++++++++++++++++++++---------- include/linux/firmware/imx/sci.h | 6 +++++ 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index 4408f150b3d5..6549f3792a0f 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019,2023 NXP * * Implementation of the SCU IRQ functions using MU. * @@ -66,29 +66,18 @@ static int imx_scu_irq_notifier_call_chain(unsigned long status, u8 *group) static void imx_scu_irq_work_handler(struct work_struct *work) { - struct imx_sc_msg_irq_get_status msg; - struct imx_sc_rpc_msg *hdr = &msg.hdr; u32 irq_status; int ret; u8 i; for (i = 0; i < IMX_SC_IRQ_NUM_GROUP; i++) { - hdr->ver = IMX_SC_RPC_VERSION; - hdr->svc = IMX_SC_RPC_SVC_IRQ; - hdr->func = IMX_SC_IRQ_FUNC_STATUS; - hdr->size = 2; - - msg.data.req.resource = mu_resource_id; - msg.data.req.group = i; - - ret = imx_scu_call_rpc(imx_sc_irq_ipc_handle, &msg, true); + ret = imx_scu_irq_get_status(i, &irq_status); if (ret) { pr_err("get irq group %d status failed, ret %d\n", i, ret); return; } - irq_status = msg.data.resp.status; if (!irq_status) continue; @@ -97,6 +86,31 @@ static void imx_scu_irq_work_handler(struct work_struct *work) } } +int imx_scu_irq_get_status(u8 group, u32 *irq_status) +{ + struct imx_sc_msg_irq_get_status msg; + struct imx_sc_rpc_msg *hdr = &msg.hdr; + int ret; + + hdr->ver = IMX_SC_RPC_VERSION; + hdr->svc = IMX_SC_RPC_SVC_IRQ; + hdr->func = IMX_SC_IRQ_FUNC_STATUS; + hdr->size = 2; + + msg.data.req.resource = mu_resource_id; + msg.data.req.group = group; + + ret = imx_scu_call_rpc(imx_sc_irq_ipc_handle, &msg, true); + if (ret) + return ret; + + if (irq_status) + *irq_status = msg.data.resp.status; + + return 0; +} +EXPORT_SYMBOL(imx_scu_irq_get_status); + int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable) { struct imx_sc_msg_irq_enable msg; diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h index 7fa0f3b329b5..df17196df5ff 100644 --- a/include/linux/firmware/imx/sci.h +++ b/include/linux/firmware/imx/sci.h @@ -21,6 +21,7 @@ int imx_scu_enable_general_irq_channel(struct device *dev); int imx_scu_irq_register_notifier(struct notifier_block *nb); int imx_scu_irq_unregister_notifier(struct notifier_block *nb); int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable); +int imx_scu_irq_get_status(u8 group, u32 *irq_status); int imx_scu_soc_init(struct device *dev); #else static inline int imx_scu_soc_init(struct device *dev) @@ -47,5 +48,10 @@ static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable) { return -EOPNOTSUPP; } + +static inline int imx_scu_irq_get_status(u8 group, u32 *irq_status) +{ + return -EOPNOTSUPP; +} #endif #endif /* _SC_SCI_H */ From patchwork Mon Jul 31 09:04:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128577 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1931712vqg; Mon, 31 Jul 2023 03:59:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtTsIMsHdhpaEbjvCq0Kn/g0iBaDO+x0Fpi+O645y0H92EojMW0hipNUzsH7yMgiZTnP+H X-Received: by 2002:a05:6a20:2587:b0:130:7ef2:ff21 with SMTP id k7-20020a056a20258700b001307ef2ff21mr10180880pzd.19.1690801149794; Mon, 31 Jul 2023 03:59:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690801149; cv=pass; d=google.com; s=arc-20160816; b=rCERvm6azgxx5JP3HoUJ9EJCIdUomcFbrKI2T06Jy1MDJgaW2nMQyhxoJxuxZI9UKx 8lL6PRMkpQ+DvPcH0uK4E9+QAZ8sLz+3TNuVT/rJpmQehSXTj/FroDa3ttxnRcuyD63/ mzp86lMdG715hy5NnbOJoY3OirUtf9pPpevnkP38e1kw1lDqjqwmyWubfgJ25j1vW9kB CModI+LQk35skS8rJiJGX96XmA98DegW4Xz571gfKqZ5dPUrweGKC+iGoEjIzOI/9Sku lYRYz1KLj4ZdZmbUWxzAhxdWbiJ4N+bGsOTMIGVdsQkmpCBmeJilGthgRMYM96J3fx4Z JxOQ== 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=QALHUzHVhQKD3fKu06vGPOUlJ4GnUotQExquzQP0wVA=; fh=lMFpnJZCjkSvetl9tpFZk4oM1K582D2CBXvvYFGhgSk=; b=OJTh2bAkwe3JmCWeNmNQMwv7cPZTM2lzgus6hv3d7PvT87mi83Lp70m8Hft52Sp7cz OsD3jtRKXNp3z3cC/rnhoAmg89tTwGWm3iusTWNBeDmT2QBn5+6Afh4JgE4BVBbRfJGr LgqT89upKZ5acwQJVUHufRiQRHR8XoX90lpzi/93VNjn9zCyPQLhKQZyAAulEgomljRd zAVYGOuwfVYWiTdmygwwhr2J5+e2I+Iwrb0HIcLVbbZbj5XcwT25B1bHGjYxQ0xB3meJ HPN6gkL26V3/LHysD8HNvEv+ZawfgGyPsg+hMkayBs+NkzsvX3EB6NhjS1T6NdKT//Dc Wg1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=NCrquj2q; 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 73-20020a63024c000000b00563de19ff56si2002484pgc.427.2023.07.31.03.58.56; Mon, 31 Jul 2023 03:59:09 -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=NCrquj2q; 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 S229836AbjGaJCm (ORCPT + 99 others); Mon, 31 Jul 2023 05:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232144AbjGaJCM (ORCPT ); Mon, 31 Jul 2023 05:02:12 -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 223751726 for ; Mon, 31 Jul 2023 02:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YTU0g113XIbfhpADm5NCXjfkyG/yYxY13n1/zEZeTEVBsWLKrZ9kdEuuyMxuo55YFwUa60fqAUzxQ/Rz9h8+iy9YGrB1IjbH/f2ZIf7Ty/LTNh9Nync+RtSOxAyrKpGW0JyLsCxYoLFx7xBxdoPOw0VXqOE8/UOyNQ2s8yaJNV/+DL+3wgth+5MTOhnNGSLOb5Ftw7Hl7lRkLYIM7z89TmoDGLtErTiUysvbYzMYQmYnhbUfUgPDJNGeKQacAa0Cht8IGCveTLQrRoW8pABa7SEC4zdqeKAsriZXdjFhZlR5OlAZvxFtfKjmJhwpBEMo01q0LSUCRL8FlH7CVtMU9w== 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=QALHUzHVhQKD3fKu06vGPOUlJ4GnUotQExquzQP0wVA=; b=J1kUbEHAqfuS8ySh6PWIeXNSfV6Q3c9uEV5kuJBSCvsQF/XOVNkG8C3Ri6Kp0J7AI2jmEC1atZLMwpy/SB9IEZv94ENE7Hgs0nRLgMQLanYhmmjA94tE+1n+T9ZakjaXRVUTvwYq1nPS5XX7VXhL1wbNMFWLPtRlY4E0WOIpvbp9pnuemy6mN/geKJf4PrBvkvjtvFAnt90uBi/610RkO3PjEw/KDXucyrFcQ49vUb0H/nMPbLmZBSlGWmu7Ot0xRchsDQNo5u4hGtuNVD2zjra/SZOAcv6bjgiHABy5Z/pyUfZREyAB3nQZhgjdq8NWtYsGfTZvoszo3PRo+7ahiQ== 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=QALHUzHVhQKD3fKu06vGPOUlJ4GnUotQExquzQP0wVA=; b=NCrquj2qy/YWTV2Jnc9HLPEC3H+WwC0LHQbgmgqRQXrYwgL0YjvQQ5DOUDaOSxmUmZ2Vuz5n40NYWmnwT/Em5ONNyqVKRCa4CFsJpHCFM+lc3zEpftzNT998v4linHXgkZ+SNUaSRdSFYx/2JcHrkem5IM8bRVIaMOwuamuyyyM= 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:32 +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:32 +0000 From: "Peng Fan (OSS)" 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 Subject: [PATCH V5 8/9] firmware: imx: scu-irq: enlarge the IMX_SC_IRQ_NUM_GROUP Date: Mon, 31 Jul 2023 17:04:48 +0800 Message-Id: <20230731090449.2845997-9-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> 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: b484ad21-89ea-4a63-ff60-08db91a49894 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: bshFb8SKmlTzL2CD5P64DDsPnMWw5eR7Blpo9Oj2TeXx+5ARzSqSBXU9jvmWhYsrEDCpxaAd7jsN3G6f3JPbBB/BC5oS6wTsm2xKrMzl46XebqW1rr4Paax6YXdWlmHUlJw5xzs/tRv9Knhq1qRSVIkdBoOfHGnUo+28d1PkBZHJEOq8d7x3tlhEfACGTvoTtPZ4jgXjkT/52R85ReoVeHf+T/UAd5ZvXC+p+TblgHecL09Uj877Bv9+SMX99Gts1XQsVececHtnpo8AyNR7KTGsor8Hjb9thQqZarCXOnDnQiuD/pXNrn9t3usMOPrLxZr4lxe/47NPlc7/GFEmRF+C+dLDufV/TekMsBI34p42wZcjTkLn2I/GGuX0rka4bq5LgFGzlKKLogvmUOIfnhXwO3nlOJph7VH9LLnOnIWY2UJTJZ6Vl0x6bVtsYbygoi+fCWf/bJDnSQ4DyrgxGkr9vlQ6l6XOpJ+82lh79OmckAj2XUQSYAbSG3iH2orDsUJxxWsBPcwtFaD6Rt50+yM/keB+WVCH3FnrZiOg+I/b9l/oMoI4Q6yz8v5bstelYwFIExSppBE1w77TefmAsLzeGvzDXSY3bvpQ8vFD6asugPE9OivSsPgmxbCDKFDtLoNw4L0PMeDbu58/lroqyA== 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)(4744005)(147533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nyuT4wNA0EFlcc79zmzA8+rPS1czxAXhYeviUkxklAwQe1ZQGp1GYUjT3h7WD000gCmBDKe6DtJAEwvanbncAVi3PMgrLuT2qY88Rn/wUX+NGgMgIRW1FBm5AnV3fE9sh/bsMoM0mgGXDGPSuVONT4j9MejHPsSAAvWNRLNXcmhIqmvTLpgiBzHLQlkq51WvTND2BJCrugoJxJBYssKnBTOZLDRncUrtxhQtOLYikoWsnCuTHRRTmKMz6QJ4oD9K3kKwM3Eu/WYkcHf4N3WiMjm5PzsgWqWWz/ieRxSDmgAnaLFfCWtA3LZ/Uww17jycWvHDcIWPaAPUXLrgk/cVB/TGpaktXXAKMwrZ2yQYAVgzpxxQtg525zT/Xqe6Ccj5Z8ncSIafUgoxM9fTivFxF8ze4EcmfvOmjJa0eyjBpYYj8QWb/QjTeh2pf4d51Q5FAln9JVIoVBQin3fIl2fUtzix7ufsKZukISeZnX6g1zVrcTyRSNKZftjRvhJnKgURaZ1eJi55ypaCnw54VOED2SE5BytSvmbezPRFpELiLe8uUC1bsRuUkWiLVULpQDuLjbwe2vF618hVHXaO4SpNff3mNp4FZDjMcSTwdpp1WGQRG1Mjv01sdiaqyost7FvMUjn2lO8tJn8Frnj+Dy6YwicE7xk5yXzseLslj5P+D8wi9vZaYg3w6g4mF7mLSSvgZDcAxhcxJlbutAcMeaeMVlKm3HkhvHj4O+lqEm/FoM5xtrEMx2DoA0RiJEgnwXYb791lV3V8DvUoEsXEe+t0rQwZNVucT95vQJD4OhFDG92s3oLt84wX7bnNXmMPElyaCP+bFDo3x5y2thA+xk7v3yCrs6ZonuGZI0Rj4q5jMtXwnDp4XMWfYjuRoFQASrvT3lhTaPR4b51hjSj92kzMeXMQtkcPD42fgG6AXK3763oTawyPKucoP5cTx0np0w0zzJl/iema70UCcelpcJJDAjBEtLizKS18ouuPLe3MGJTVGyC2DrFZm1UlPtSpaRaR3ByGYRvs2kX2RJbw6g7hJOM6Xf7CfooKcaHkFqPQ3zShUFghfuoLKyZiRf2OMdNm2smthvWuJAjxXBXpR412xh+p5NL8tPHrLEZrvV7GiuMiCnKgYIO/srXJG15t+ICictK8QR5q7XhsaIJrWnfhvWp68tX78CVJi0wPQHigBN9W73jpLVElVEeBI9SeBSCMRRRlMR33lv1HsUnLG5MzNb1V2jPi93YEfRa4dMRLt6yaPIIeiddVW+WhO1YP6QbFGAgWWbKSvMoWS1ihUDmFg2dDYAp4558NSCdJKA2DQXPMicMp9Xtceq9aA2sn8sBcYYDNvW0Ibn/cRZrSC2L7PGxU1RBUeV17gugPVwTfRVytO+DcMYHU3USxXikMHxNstMftnFz1TggAH85sPP5HATiKJ5c6VKJd2abJKv1fsCyuH+bwgd+xxED6M5aPQwyrrEPGb9pJpesTaed3aNHBRVIATwNR79VHZRLQ/hx8JFnujrK1lGMCJL9eEK2e6GaACYLHp9X4SgTBX8m7jTwcXF8iLos42fS59VEBgDx9KQiOn1UwisNq7PIrjKShHmNI X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b484ad21-89ea-4a63-ff60-08db91a49894 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:32.6964 (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: gSvNgzXZMXR33cTLIJYfzwYx+nPKyKWx3afTkftJy+VKqFRlrKXpwYv68jZFNMAi1ZbwaxC5afuWkCQnE0rr+Q== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772933506583774520 X-GMAIL-MSGID: 1772933506583774520 From: Peng Fan Per SCFW update, update the IMX_SC_IRQ_NUM_GROUP to 9. Signed-off-by: Peng Fan --- drivers/firmware/imx/imx-scu-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index 6549f3792a0f..8d902db1daf2 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -14,7 +14,7 @@ #define IMX_SC_IRQ_FUNC_ENABLE 1 #define IMX_SC_IRQ_FUNC_STATUS 2 -#define IMX_SC_IRQ_NUM_GROUP 4 +#define IMX_SC_IRQ_NUM_GROUP 9 static u32 mu_resource_id; From patchwork Mon Jul 31 09:04:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 128611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1950565vqg; Mon, 31 Jul 2023 04:34:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlFlSXM3Di4XLirS1tM/P/hNMV/ntsLhUS6xn4RCUvHSjTMa1XvD8g0opz3b1gNsF2nDwKH4 X-Received: by 2002:a17:902:ea95:b0:1b8:63c6:84ab with SMTP id x21-20020a170902ea9500b001b863c684abmr7745845plb.61.1690803266719; Mon, 31 Jul 2023 04:34:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690803266; cv=pass; d=google.com; s=arc-20160816; b=L40HeT0nfOdBHXkwTMbit1ijQlxo2RZ9mPNdhVQN/Ogbguln+VyXQkdRxwojfEpOgv eWzTgVgz+Rgi40Dix5jtxLQPCpIg/jbqXxus9mbtIhJkWAK2LvCyVxVPkDPT5pXwcHta 9Jqz9Ek8Qw5Tpl3GoLxTqvZDTBBCsnrDyrN/YQjp40iR6EGmeoSF/WstfPeaGSsLxSA5 vOGOBUVqGs/kv7sjpGdcdqTXeeFznoQunoFdPnsQFMsr152HsSZ3lVXdyFAw7G305PCp E702SD7lxzl0O+diQi3/7cPSqnHBHN791S++siYafHGUVxuU/N7YXNNqwor8rvHsdL8n BZcg== 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=zbl3luSBPGo5qgtFg4TbLJItGOY4HW50Hwqedi/rJaY=; fh=G0sBX7yutXnsf1dnSrQzjbu65mBS3fvlZO+57bjgcZw=; b=ifiLLTJ78th1wfCtJ1Jiz7KIhZq0ojI+f80iRuDeCJV0EZMN5Tp2OpThOy7wx9ojKA yim4zu3mgAG8S8CnMaVtIm+vBn+MspaPZ8XUirT2xfX1JCRJM70Vy8wkI4XTTRP+8wDT AnBw+QPA76HWFPLwzH5OXrkjn7ur70dr0iA7k4U5noQeCINZM9vWxFpPxt3iYF05pb2J jebNEwmya0x1h2TY/DhzZw/ZHqetx3XHKSoh1h21AkNx3RhhPjw9LgUKbObSJ2kdJxpc 4gEGkr8Umeew6ldEBai7vBTwsc0NAor7Qwne08YyVaUnpgS3tN5gwoPWVwkVF5E5ul// kOCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=GWGa6vdK; 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 f10-20020a170902ce8a00b001b3c63eba76si7350469plg.492.2023.07.31.04.34.14; Mon, 31 Jul 2023 04:34:26 -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=GWGa6vdK; 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 S230063AbjGaJCW (ORCPT + 99 others); Mon, 31 Jul 2023 05:02:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231767AbjGaJB6 (ORCPT ); Mon, 31 Jul 2023 05:01:58 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2056.outbound.protection.outlook.com [40.107.6.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9AB42122 for ; Mon, 31 Jul 2023 02:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RXqYUgGYECIyQWLGdMsc9kP9I/8DHaS1BHKo2cb2MlwLGppQbaTfHXBN5tiLj32s95Efpyqzg5O5H65gIrYnnwnLl4ENh16uYFCnnjERX5SiGCd2DxpGbjTDrnu0bbOzgN+5WBqtI5nsiiLmzqc7aXfxuhh69rUDLigGPszV5aMNmTMejadFGqYDpiliBhdtjUmVELoL35jrixroGvel97LuA43eehDntMapDMjrZ49OqQo0CIA3duc/9k74Ga8O8VZbVz6AredX0Dteh22jGQzajipPq1sJOeZZdfz/DrXn6xC4kiUZtAZXPdt7oVICOZ2bI8pa731kF3pP29kt+g== 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=zbl3luSBPGo5qgtFg4TbLJItGOY4HW50Hwqedi/rJaY=; b=U8s42gxSnBcm4hhU5DMn4F9nv6WkMm2HhxiUuphBrW7PAI76gh5dTIdjnAhbT29hwz0MBjbtpx9d+g2Okz5G+V89h8SGqPNeFbhe6RG74VAqxw9aoa2dyzjf4P64Xq/ikKX5gZ/KQmZ6mo83AoXR6N3dV8EdQgI75Nh23zp6xa1aGzP6ROjyPCxb04Ft1Rlqin+BmcU2wIlMhCASHvJSYrZysDBCVajkaDQwN+kfOmEFBLzg02wRP1cPm0GWXH/jiHruVq7CG8//PMOw1+CgeldPmRKE5AfSpowiZRvzIoEaNbhq0JTL7ICnMf5lF0yisQZY442sk3sE7aMjs5YF9w== 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=zbl3luSBPGo5qgtFg4TbLJItGOY4HW50Hwqedi/rJaY=; b=GWGa6vdKPgVrPhuuA1g8063LeDrQwi/YkpFNybBPodDBKAHfkgOFCL+YGom/KmtG3L9Yrm3kOQv7rxMJi9xpwFdKcfsso0GYgSXGTOqT4KUQy5krpu/cdfbl5eInDB7aRyYcYQS2dakpo/OSH+5gxKUnrBWenez4etFjLEKIC50= 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 AS8PR04MB7671.eurprd04.prod.outlook.com (2603:10a6:20b:299::6) 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:36 +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:36 +0000 From: "Peng Fan (OSS)" 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, Ranjani Vaidyanathan , Peng Fan Subject: [PATCH V5 9/9] firmware: imx: scu-irq: support identifying SCU wakeup source from sysfs Date: Mon, 31 Jul 2023 17:04:49 +0800 Message-Id: <20230731090449.2845997-10-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> 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_|AS8PR04MB7671:EE_ X-MS-Office365-Filtering-Correlation-Id: 0cecfebd-9d46-4c96-ddd8-08db91a49ad5 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: 6Mnz2t20Iyw6l1e/ifKo2XtAP+NAsW0AGFmKGd1uzbP7VnNtSISZixUgRkeZ4sGS6k9h3al4Tw6m1OjlNceMRy6ZfURYK0xEbnmtJM/eMN+nimNrnFFt3WJH4rSimIeWLek3/8fohbYFY7eDkLw5XfyEhL3IFwInXYY4Ge7KFWxLPyPasp3oCqYwL2XGxw/X2So6/BMp0ekd+JNyfmgAr6QwzL0XNPP75Ezct6w/efKsDxQZSdfeMAwY2yCe0OknQjCjXwtn81SlXklDwJUOYdk0tBAeUddrZl1x2G/f/oVn43iCw2lVaaXu+AOodv84nfGmN9g46I+2JgsGAl+dSMCZAExcrxufAD5302M5Kh6Gk9omLK2Et/ECrKQ8gNOwPD5NtpH7y9UdmyNplMPCwTP2TarMYS74/2WExMjaip/Q2GHgK7xFi8SIZ3lDXYY4ZOL8muT0O/w0eoOymJ2UxVdNhMEv6qs0mAGg4HGrKMWib8diiZ+HrLiFkocjLEQ8Y6ZIX0dIRHu9ZYl67i1dvM7ZHtvHqwb2wmEB79poseVmTUcHAbT35LoceTpIVbxRjdKXlxnw2ccZHRl7/GXto45bnEFC9VsQPhvL88xh34ImJZqKUVCyY9/zwIfrtoD4 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)(54906003)(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: pyg/jqiFKSx9ucjktr86ff5eBiOjpAZmq/8Ef0YqXLdmPR9vWX9DmXhAAwM9OqTUYctKGXEiPwV+IeLXMpHiuMFMBeau2B5DvsoY0N4ptF4Ax+hQugKI9h/GahnfHqtVVTVMAIPDVCgiM4VdIGEpVQQDJfrcxpzowC9yU0w2vbcV25jV3A4Qtjq9JCeRNB49jCtP7WJI+F7WvTilgPYS6DjqtifglzM2/L8Az1qNSECisnY7k0UIXU95UF9wS/k9ZJWTvH38XWONG4Dh48BjJ7TjYnULTi5+V7oRlET63Y/T52oj8W5HOQMTnl2sP3Bv4NfEOaFYqGROew2578QRHOYkpbwEOwdkMhjsvD/wzBqm6IgdNxhKbQhSOmQGhPRxEF+mrYRbXQHkJP6ihOr0Ex/GgYXEdv5ddoxAVkJ/9zqe2xsTNQaMBjiyWwIrm5WVBbGYYHL+aUQdFOIjV3+5AnGaGxMpBqOeWiBpUcJ92z8rJIt+xjmH2Ip7+/wcgB6lZn8NLiSNdOSI2CvKBZ0KoRK00pERNsS57kcnAxg74IG7eerEkE4KhtcbWjAN7Mzdx5Q7fOmaHimWU3XP5MYAAZnRrVRsNhFw1HBFVbZBuQ/hwPqqJNhMzHfdDHJFWj+ey9DyKgV5TKKwdgoQxCbLiNU4bXTmaruBrCfAijJlIF+o7ihtDsPvmfFi88aBzlGwBaMuvEqGeeKe/5mcZQrIV/LP1RvB1RVA6iXdIqJKi0ZW1/RMJ9YrjMHdpESDeEYcjYdtdUMlvOez/4iSdIPkph+ySB2K/zOMfyfCqFN81CvQAiAb7XI4RJWCFY6w9IJWLu0bkOxuGkveuKFFFANudl0vEV4RzhFyHUMTKlmabZkAj3h2C4qmU7InlnYNkzedHkh5AGWjndioVJXuPRVcUOxR957GwCHRKQ5vHPkZLs/GW+S831kjWyZqJ0qLvhnLz9/Q5Zy4uJlHz/vTSyYqI6MVv1crDVVJaD95eHvBhYa/uk6rk7teLNFpE9eTccFLPcob/xaySGeAqgT8PcZBkW1pdorPKKQBB3SRIbowQw7w5CbT44SeLBWm94EIpbEz9TCS3CLGQDipIDFhIS/3phaAxh2MtKKdiMJVRKH6DKHYm1YwftsVHdCEQCXFZlkWSBmGHesxH9JJz7nbeBv9TtIU10pnMN5Cwn6FDh/nU+3Rl62VAYCVnq4BEkU6/B4wbtjNKYBd+4p/naJMTxF/75OFr8FuYm3R+c5W5YT86f11C7Je1ghfNPRZ2pEttabShP2fdl0+Hr+lCMEniwUk0+pt2Y9mvOrIE4gqtm7qORJDqTM2JUEnLfZrOKJjBav/sV044bjg9u8nZ61l2zrdWfIJV0IUi+nTW3tlIhFaBGnh/pxtFmzmk/+QBGzF0Paa4hjg5Qwy5iyr3UIaXVd8p0dRnT1atYeiFBiLxCV7irA0GdgsX21ezxfdCf41qrYH631oUcs/frjjdA+d2c6rhF80OlfcCO6JznxFADNJrQfNPd1TWYoUjUgC4U2JE9XT8sjF3DkKyV5hb+edL9XnFwoG+jTRyy6TL1xA2yrMHnD5G5bWG/TBTnw4cdJe83y9 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cecfebd-9d46-4c96-ddd8-08db91a49ad5 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:36.4708 (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: gew43TErmXKumP285rp5Ip3WcBY0lEjNksIkOKCuQf9jOG0wIgQW7a7bFbckd2by9IHcWmHgDY0Uv9Z1j9p+uA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7671 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772935726416154369 X-GMAIL-MSGID: 1772935726416154369 From: Ranjani Vaidyanathan Record SCU wakeup interrupt in /sys/power/pm_wakeup_irq The user can further identify the exact wakeup source by using the following interface: cat /sys/firmware/scu_wakeup_source/wakeup_src The above will print the wake groups and the irqs that could have contributed to waking up the kernel. For example if ON/OFF button was the wakeup source: cat /sys/firmware/scu_wakeup_source/wakeup_src Wakeup source group = 3, irq = 0x1 The user can refer to the SCFW API documentation to identify all the wake groups and irqs. Signed-off-by: Ranjani Vaidyanathan Signed-off-by: Peng Fan --- drivers/firmware/imx/imx-scu-irq.c | 66 +++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index 8d902db1daf2..fcbaa393897c 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #define IMX_SC_IRQ_FUNC_ENABLE 1 #define IMX_SC_IRQ_FUNC_STATUS 2 @@ -40,6 +42,20 @@ struct imx_sc_msg_irq_enable { u8 enable; } __packed; +struct scu_wakeup { + u32 mask; + u32 wakeup_src; + bool valid; +}; + +/* Sysfs functions */ +static struct kobject *wakeup_obj; +static ssize_t wakeup_source_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf); +static struct kobj_attribute wakeup_source_attr = + __ATTR(wakeup_src, 0660, wakeup_source_show, NULL); + +static struct scu_wakeup scu_irq_wakeup[IMX_SC_IRQ_NUM_GROUP]; + static struct imx_sc_ipc *imx_sc_irq_ipc_handle; static struct work_struct imx_sc_irq_work; static BLOCKING_NOTIFIER_HEAD(imx_scu_irq_notifier_chain); @@ -71,16 +87,24 @@ static void imx_scu_irq_work_handler(struct work_struct *work) u8 i; for (i = 0; i < IMX_SC_IRQ_NUM_GROUP; i++) { + if (scu_irq_wakeup[i].mask) { + scu_irq_wakeup[i].valid = false; + scu_irq_wakeup[i].wakeup_src = 0; + } ret = imx_scu_irq_get_status(i, &irq_status); if (ret) { - pr_err("get irq group %d status failed, ret %d\n", - i, ret); + pr_err("get irq group %d status failed, ret %d\n", i, ret); return; } if (!irq_status) continue; - + if (scu_irq_wakeup[i].mask & irq_status) { + scu_irq_wakeup[i].valid = true; + scu_irq_wakeup[i].wakeup_src = irq_status & scu_irq_wakeup[i].mask; + } else { + scu_irq_wakeup[i].wakeup_src = irq_status; + } pm_system_wakeup(); imx_scu_irq_notifier_call_chain(irq_status, &i); } @@ -135,6 +159,11 @@ int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable) pr_err("enable irq failed, group %d, mask %d, ret %d\n", group, mask, ret); + if (enable) + scu_irq_wakeup[group].mask |= mask; + else + scu_irq_wakeup[group].mask &= ~mask; + return ret; } EXPORT_SYMBOL(imx_scu_irq_group_enable); @@ -144,6 +173,25 @@ static void imx_scu_irq_callback(struct mbox_client *c, void *msg) schedule_work(&imx_sc_irq_work); } +static ssize_t wakeup_source_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) +{ + int i; + + for (i = 0; i < IMX_SC_IRQ_NUM_GROUP; i++) { + if (!scu_irq_wakeup[i].wakeup_src) + continue; + + if (scu_irq_wakeup[i].valid) + sprintf(buf, "Wakeup source group = %d, irq = 0x%x\n", + i, scu_irq_wakeup[i].wakeup_src); + else + sprintf(buf, "Spurious SCU wakeup, group = %d, irq = 0x%x\n", + i, scu_irq_wakeup[i].wakeup_src); + } + + return strlen(buf); +} + int imx_scu_enable_general_irq_channel(struct device *dev) { struct of_phandle_args spec; @@ -173,8 +221,7 @@ int imx_scu_enable_general_irq_channel(struct device *dev) INIT_WORK(&imx_sc_irq_work, imx_scu_irq_work_handler); - if (!of_parse_phandle_with_args(dev->of_node, "mboxes", - "#mbox-cells", 0, &spec)) + if (!of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells", 0, &spec)) i = of_alias_get_id(spec.np, "mu"); /* use mu1 as general mu irq channel if failed */ @@ -183,6 +230,15 @@ int imx_scu_enable_general_irq_channel(struct device *dev) mu_resource_id = IMX_SC_R_MU_0A + i; + /* Create directory under /sysfs/firmware */ + wakeup_obj = kobject_create_and_add("scu_wakeup_source", firmware_kobj); + + if (sysfs_create_file(wakeup_obj, &wakeup_source_attr.attr)) { + pr_err("Cannot create sysfs file......\n"); + kobject_put(wakeup_obj); + sysfs_remove_file(firmware_kobj, &wakeup_source_attr.attr); + } + return ret; } EXPORT_SYMBOL(imx_scu_enable_general_irq_channel);