From patchwork Mon Jul 31 06:47:39 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: 13333677 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2E17C001DE for ; Mon, 31 Jul 2023 06:43:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbjGaGnM (ORCPT ); Mon, 31 Jul 2023 02:43:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbjGaGnJ (ORCPT ); Mon, 31 Jul 2023 02:43:09 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2044.outbound.protection.outlook.com [40.107.104.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3ECB1BE; Sun, 30 Jul 2023 23:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pu4Vt6zL/wesRN+RAAfMKAZtPcome3k+B9OCPf/IKwEk8QQckmuAwLKBBf9QdCbhxGuPndWH0STyubK+bIin5KLrbiS863HwcvJDxpIT6/oHolUkr4YeIqvJ/nbWr2sOgSBRTdxJ5avDQ5XzuhzIRBW9iUEOl+L/h4MpTXRlDjg5FI8he8qXFbBOaV9N8yZTgKsaBuFG4Q2b3iKoBK81uZcXteBoBgXmXLPI5sEfh58LDuI7ir4uXS3CVeKJ9Izv97CtNFaU0Uo5Jcyn4aZ0OpH8RwXI90Via4Fuafg66eLnAprrtuM1H4rPFGSBR3GZrzCghWyu/QKvUwRx783CVw== 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=rkvjEz5P5bLiSv98FtG/zmYm3TFZEB8qrvdApjcpSqs=; b=BfrsCSnPIkViZ8AngTYE7U06WeSYtbpILHYoq4A1GPWz+NSETT4Ksx4YjWAZdk1ZVD1RUnQBDF6Fg7EPv4rxWUOPqAlUpwbTWLgSHaFTNd2uQsl8JIEHgp8tQh7suR38WZH+wG5MRGH9NbSUT3yGBc5JvopVxZRuwRGPJRAr3UO54h74BoO/+uXrXYsWT3PYLfMVAF7sInoHPD0Y0hB+TXSeHaqmu5rDHjkQ+Cw5jzOTkq8i13ObMeltH92w90bE8UZTrbSSSKpcO9MO96uRd7I/nrKAfyJOvH/Cwn3ohszr/0OTRlIXOkHDPvQ+n3Aeh/zgNlt/QRN/d1vUTKGWag== 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=rkvjEz5P5bLiSv98FtG/zmYm3TFZEB8qrvdApjcpSqs=; b=lsSNDm/taMWHZK9tJauXeStykHwBXiRMcVY1uBgRH+9Giul0/fjKf+pUmg9prNwkgxviTvLVfZ0n9QWf/YrxfS/XNOCFPEzYttSaYvnjl5lE1RpQeoLGoKd2uMu9Yj8mS99kJPnhdWYR4KyuMvq9yVRfw/10q+cE/jKA+MY3NQA= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43:06 +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 06:43:06 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Peng Fan Subject: [PATCH V3 1/8] genpd: imx: relocate scu-pd under genpd Date: Mon, 31 Jul 2023 14:47:39 +0800 Message-Id: <20230731064746.2717684-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f501607-0b14-4311-6b30-08db9191658b 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: AYhGdEws3g87K5ckxi29Skx5dEOV/rGGkYU9BMIkTBqabvaOdq3uQSz8l6uGxH3lB0vTpg0xVKTvPim0gKyjCPa+aM3Ffxyqf5dJiroWMJkzbJ8AECxlk2NZpoVvV4z1e9KpI6DUyIkXQxzhtS5cAR9yDA2PQC0aUyolgi01nlue3N3CvT5f/Xyd+MeyHOLmLZ6WoGtNYCc60M1TQmtjXWVLXha+iZRG1AlAVZRugphigXHsvYwKXkT07rpk92qusbTTqmJrqtBMIEWnS98FljD79EvOE6gS1ZaexCO1BFpVysnnI6swBIn3Yv0a1Mp8i7HJNZhwWv0HHaEorFAFMoLd3g83+M2LYqeWpHGCkallThXHG4bkhPATtNyqHgHEHNBbwNDgCGukc3Srr/jDzidreZkjRzDJhWR7rF2mRmRP6a2vSaAAnDB2TB3Pt7v7EuB2y4P72/9UupRdW7pskT36uO9zF5YRfw34N/4Dzn2uHgy7RIqQ2bKDroHPV5YBZSsbY5akwMuLCmmGWAqY0bIBtx66OmssQwbFKcGQjuCsYfnOTbSkvDGcAn1ANBqa8HnlEZTsA36OTiBJ/pMJPFCoQ8qaWdlEf6Yi3lG3tB/BwSaCj/Y7OpA4mSX4ae0G 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(83380400001)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(316002)(478600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WyyBrzoVUhemvMHMCDnj3nZZi5cdYgg8Dcy1EhwG81kkKK4D7CNBok54spNJXTWHE56fW1eau/qdHWHo5II5qOjv9DTO+fSrNY5sExFQQGumJFGFQjjO1r302h/vnc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8fWlw4tocrwwnxSmfHAYgr0FwjjKt00FQxaqTnDO1H03DHjH74ImliVGX+6QZVxbQa877aLvAy1cI2ykiUKEhL09nQ3UumXG8U/6IStJlBUkyQaRfG0KyGj6b0hXmk/Y4GxlODpNBwxPHLEe3I1bygrUugmTdIPsyo8ZF7JUTJgyRh/rw9qcmLbjipmbyBwCegtr2rJqYR3aFn/rg2SUb9PwYlwFvpmpNwIqKL90L71Hq4uC3tCe5VYOxapb5NcXnTE+1sOHmQjgfWhCM3dfM2q2Rb+1Z0nT3RqH0MoUZk2oWRI400E0fT0GwrazUfurvoiXZfO5ngg/JFdLmNDILnvXnZ9VmXAZ+IcWsUZ50AIy4jalHvKfcfP+ah1fYqB6JGIqbUVF X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f501607-0b14-4311-6b30-08db9191658b X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:06.4870 (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: C+0QLnO+I+IHhD6IwXQmbEQbww3iYZAo4PPy9oqogxj+1XJa2BOk6oCyLAbNTscnj/ZQtL8hcm803UMSgUYbRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Move scu-pd driver under genpd directory where the driver should be. Signed-off-by: Peng Fan --- drivers/firmware/imx/Makefile | 1 - drivers/genpd/imx/Makefile | 1 + drivers/{firmware => genpd}/imx/scu-pd.c | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename drivers/{firmware => genpd}/imx/scu-pd.c (100%) diff --git a/drivers/firmware/imx/Makefile b/drivers/firmware/imx/Makefile index b76acbade2a0..8f9f04a513a8 100644 --- a/drivers/firmware/imx/Makefile +++ b/drivers/firmware/imx/Makefile @@ -1,4 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_IMX_DSP) += imx-dsp.o obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o -obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o diff --git a/drivers/genpd/imx/Makefile b/drivers/genpd/imx/Makefile index 5f012717a666..52d2629014a7 100644 --- a/drivers/genpd/imx/Makefile +++ b/drivers/genpd/imx/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o +obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8m-blk-ctrl.o obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8mp-blk-ctrl.o obj-$(CONFIG_SOC_IMX9) += imx93-pd.o diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c similarity index 100% rename from drivers/firmware/imx/scu-pd.c rename to drivers/genpd/imx/scu-pd.c From patchwork Mon Jul 31 06:47:40 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: 13333678 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0ECC5C001DE for ; Mon, 31 Jul 2023 06:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230258AbjGaGnU (ORCPT ); Mon, 31 Jul 2023 02:43:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbjGaGnP (ORCPT ); Mon, 31 Jul 2023 02:43:15 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2077.outbound.protection.outlook.com [40.107.241.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C06379D; Sun, 30 Jul 2023 23:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nv9sa6UaqDSAgSMEgRKHiALA2qIO3JImwAbTer5kLG4Lu3S2XsPLTNmh2ob2+ckfUs5p95sqSBy96L2eo1hITf34EhQTb2PXfUqDkIOKHWjwzfgCmp416XEumYMwTcJBaG1GbJDipuvHkp/umhkMKQXEi/foobUwSYTrUw1BsViAjS+LwkzOsQvtm18fbrYyBrztizDlXdfJ5EFW5A2Z2UXEsk8yF26SjcYOvg5GyyiiPI+3NakxFymTxNUZ2PHpgba8MGN0kCvZmmL4DdyU3eHIwhMSLD5cXUZrvkosz0WPhhrKXd5jITXNBOVqsUHnFDc6qbWis/+a94j8bFe7pg== 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=YhQoD2TPdn2oyuDeTNC+2pCtRGqQB5NBDr8lpk9WY9Q=; b=EVIsfA5BjkPAdLdFyLvx9yjD8cDedGWitbM8/uMqBUi8jIMQS8KD7OxJInXmet/645RFYY8DNuv7muIR9t2IEYlZ+IkgiXHnfjnkZFElIRpgeKCi3FUOnb2gsUgBJaj9raWZskpNTvPY1BoVjAHo5IZ6UGZJk7351TxWlyWFEga7ptmVu+dBEnNVcnflOzwUIJs0FAofSWxyq8VMa7xaqlOJpCj03MFbzAo07ffhxFyas/EMHywhF00saxz5jn03jA6zt8m/t22EHBQzNgusbncTJpMGfR/wGizVnknwt48XVmWNLAssMxF57ivmJ9wo0sk0oCI6aWnyHH2gTLkJ7w== 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=YhQoD2TPdn2oyuDeTNC+2pCtRGqQB5NBDr8lpk9WY9Q=; b=AabOEozme6eDOhyj10cU6S0zZ1gwUG2IrSDajSIdjBoM7H4Y36zHHB5GsZQT899H45FzfJwbW1wacm8o+G6QLoKwt/gXETMCc4KxabfBp+a/WtJDhf2x65MEQf0GVbgojwrNzwIJ1yI+9kwg5nBB4N/6xiTpDBifkWU+Qy1H1lo= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43: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 06:43:09 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Peng Fan Subject: [PATCH V3 2/8] genpd: imx: scu-pd: enlarge PD range Date: Mon, 31 Jul 2023 14:47:40 +0800 Message-Id: <20230731064746.2717684-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: b19362e3-b696-46dd-4f84-08db9191678e 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: zq7KXu2bw4ntQ1C52QTtvj3ds8uv+AAy5FaidWOaK6mWzDPopdFQYPz3bonnEhqWeCUVfYTlIOGeVnlSTmXRt2J56g66kXtQNPYtZ3Saq/2dR0KdK4f77ApxGR0zMzg4rQq6s5o/RZLv3GQDvSh8yTlMyZc/Vl/Jbfz/9xjDOQa8RcbSkqPlEAsYN2ySxZQddHOhqKFqfBAlJws2exgOQ8S2SfotRrXoMkxzHRJNrSKj7/qLMxvBwRXOgjV83MZt/InxxqztaE21eYpVI5/yV4ylDXYQiGz2tYTIGY57NTrpfLLnzwTSfkxaj9rPieaaV0jncJB6udVAf3ZjK7DEqg8GomIVqwUJS4cMOVyiwu3W5BdVnMHYd/IOSdOAemug6t71VyevioonwuS1PbUwrdzfuQNHx4hNnJsNMQmt2onk68CJ10jjxWEn+pvcx3g9G/FjLGMI5dHNztJFjyJ+MUarLZfBAUInxmrsmMefhCwBRH6v1CfI+Sxg7/jYG5sjwEIUlfcaPLeoTFKptpafhH9H8pbTfaTDmgk7e7xbKzA5DKIWEMkAaYOXdJWqqhaCGiX6duP1aeYTr9zrmehHcLdstAreD7GSm1YhVch1xGySsgNLXPuYWmA9OQH+sC585W7908cgSxVp4xNk/Hd8+g== 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(83380400001)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(316002)(478600001)(4326008)(147533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 17YxNnsw6nQvGmA1ulXCQMWYzUIO76aN4EP56gHWJSmM4nzYYVg7hYo9eruCkzsim2MgUpYK4akk3ThXWPo5e1lS2ezrqNZxckvwhI5eQd4D2ZMoVtZOJ5A1ftjTiqSXMV+NvZITUqo53IzRRug0h4kyIDDcVfQR9L4KJYVC/av6sqPPSSXoUFNR8OO0cuAxuXAmPHNtvoNAqgaRnMM0qx+Xf2XeP+oFhngYOa4NpegpRnPz5LZ1zDX8Of3/3XIYnkhbNxBEUbJVir3SzVHJ9vbYOxiofFZm5yvfEjOdSzV9/vInH6/AdMrTpHBztxWt69PsoS0wzglDPKommoc4cXTUBRRUYQw2g4WcVTXFWTIRJqmUAJtqfJRBGW4JXcCmtKV339eMLwxZvtlCr22xIWWN4jZR0tvsHICth76KL+0HIRFuJk5r2mY7wPD2V6MP+/qWjJFMwR3tRZV2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dhWX9/W88D/4JvInfjxiBO8CpF2gdwG2WFCoT6Aac5GQRLNSZGETJS/ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b19362e3-b696-46dd-4f84-08db9191678e X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:09.9297 (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: PL2H5nV68GIAJAMGUS4t25sZhTJuvc/8//YM9M36+8m7PMryxRD516zI8l2RvXNPlbMB9VVuaz8YIRLIQc2SPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan There are 5 LPI2C, 5 LPUART and 32 DMA0 Channel resources per imx_rsrc.h, and they are in i.MX8QM, so enlarge the PD range for them. Signed-off-by: Peng Fan --- drivers/genpd/imx/scu-pd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/genpd/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c index 84b673427073..5a28f5af592a 100644 --- a/drivers/genpd/imx/scu-pd.c +++ b/drivers/genpd/imx/scu-pd.c @@ -121,9 +121,9 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { { "audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false, 0 }, { "audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false, 0 }, { "audio-clk-1", IMX_SC_R_AUDIO_CLK_1, 1, false, 0 }, - { "dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true, 0 }, + { "dma0-ch", IMX_SC_R_DMA_0_CH0, 32, true, 0 }, { "dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true, 0 }, - { "dma2-ch", IMX_SC_R_DMA_2_CH0, 5, true, 0 }, + { "dma2-ch", IMX_SC_R_DMA_2_CH0, 32, true, 0 }, { "asrc0", IMX_SC_R_ASRC_0, 1, false, 0 }, { "asrc1", IMX_SC_R_ASRC_1, 1, false, 0 }, { "esai0", IMX_SC_R_ESAI_0, 1, false, 0 }, @@ -143,11 +143,11 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { /* DMA SS */ { "can", IMX_SC_R_CAN_0, 3, true, 0 }, { "ftm", IMX_SC_R_FTM_0, 2, true, 0 }, - { "lpi2c", IMX_SC_R_I2C_0, 4, true, 0 }, + { "lpi2c", IMX_SC_R_I2C_0, 5, true, 0 }, { "adc", IMX_SC_R_ADC_0, 2, true, 0 }, { "lcd", IMX_SC_R_LCD_0, 1, true, 0 }, { "lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, true, 0 }, - { "lpuart", IMX_SC_R_UART_0, 4, true, 0 }, + { "lpuart", IMX_SC_R_UART_0, 5, true, 0 }, { "lpspi", IMX_SC_R_SPI_0, 4, true, 0 }, { "irqstr_dsp", IMX_SC_R_IRQSTR_DSP, 1, false, 0 }, From patchwork Mon Jul 31 06:47: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: 13333679 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5091DC04A94 for ; Mon, 31 Jul 2023 06:43:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbjGaGnW (ORCPT ); Mon, 31 Jul 2023 02:43:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbjGaGnV (ORCPT ); Mon, 31 Jul 2023 02:43:21 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2081.outbound.protection.outlook.com [40.107.104.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D016410E0; Sun, 30 Jul 2023 23:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WnwWlh+hLr71ZkYCa7p3zYb3rYeDPeWSz8d6onpkxQHesFHRR9aXfLkEZoleQtZsfvwr+sWNMHt2iGLTUiUXmNebZSudlfZx4jdByW7p2vnlU924dlbjFmxXBSDm6njzENKD5vf3M5g3MipSMarnt5/6TFXbg1msHIhWHduU6pFQSHwL3mflypYqqY+euiML3glSvzc+++fIIjfr1ZGSC02KlBCsz+54CL8U22PKne5vFImLeSK7miXAJ3+0VHjntRAyJNjwHsGAVFlCABN15CSCiQcGVwS+vbR9oQBkRTPmJaTabbn5KYPOdPRk1lSKfqRAWnt1e7h4rMFXGzPMJQ== 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=V7GbvRVhPcQTXuxEftVUaeloxpR/jBxTz+ehgNyrG1U=; b=M+p0GMF9LGbEf/0TAT1fYtb5TDtjtvBRg1s9LInvDJ88tRmF3kjrQPxZRa3lRi3tQqrX8YpMnr+S7PtiCNPajybmSVnCx4oODRnt0/6nhPbgNcUInG/0B7fVtRi+47LSleyA+8VM42zTRBvS6YfdxM0BEanWIaZJC+RFS/IohWZOf4L4OyCyGnOl0b/dWY31jecsLnJetx4fN0DDq998f8cU2L+J6WaUbv1ysp3yZDtrShyxXllXBJbvA/DFtK3l4SJyEGK8ZmfZRwLa3Rwv+TuSPmHJta3SoCnmaEzmK1zDL7A1SkCVHK2n8pMBQZd0UO2Gc7iCCmPiQZrBQEm5eQ== 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=V7GbvRVhPcQTXuxEftVUaeloxpR/jBxTz+ehgNyrG1U=; b=A13VFZAGUUbmmcyRPCM3niQTiDItyhWwaR0uYOTVlBUHMs3mnET+rxyDjRqW/sFBww+94ZwN+eQ2y+2NvkalDJTcLbQ3LexkDSZjZE6ecdDMCtGdeSuWLCxTstYuRjjHXFjEH5UGWdsy/hIToYBSHGd1mvIkV07pl2bJbQN6tSE= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43: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 06:43:13 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Peng Fan Subject: [PATCH V3 3/8] genpd: imx: scu-pd: add more PDs Date: Mon, 31 Jul 2023 14:47:41 +0800 Message-Id: <20230731064746.2717684-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: 0fb8fa12-78f7-4b13-1f13-08db9191699d 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: NDz6mkPNGcUDk/Bff4TV3sTTk5XvsOIyyg5N92WTbwBRqqzZGG1+Dni0g8GA+5uOEDThfJI24foeQhFuXkEHfVRf0Ke0cOU/Xo73rYZ6E1XHaJCYo60ZnZ4pLuMSdTYCFaWR5URc+wKwiSmxuS6TEoYkcnE7ElEtB8MhbonB772GKrMVRZSoJe6rFNEmlChByprP8YsLeza8ZEArhuSYmy454TQzYREOOIG+wES/auYPsheV6eHEegrmyGiZSyLFrjg48IxjNMQmE8nr/hUCiVfpsNibUvxmQwbPrr1xEkA74JWqogbgZzlmxYvBuGYMY2GxIwdOxfaYS/P59lNRuL0H+c0VKKovizxUOKFQ3Z+hNV5wJIWRCNCCNFpMiiEi6kr/776MgUeOiF+dwnxEYoaUcrnt8B9kQTn7iZ+3D0ilpaOto5xqPnOQ7NX75V8zTHzveBDxVZZrnUFakdcNuWn5ZtPs1hqLbG0b2uSvcogfVusjP1lUR13gMCUQd3CzcdX5hmHdzXZ3KJu51+obgg9fOGx3+ms9sdktMPcKJbVuK3l9ONIioDIVOCZZgip8l0wWYwVUMbZ5ZEpzJfeDVA89vDQoDywKGXoDyyyARxvlx5sWbQgIGJEYZ26Ip4mO 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(83380400001)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(316002)(478600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NzflYHZJgWGn2pUu9KXCFUoCFEJCSAlQfmjL+QTfecHwF0h5Dx+UXVae93jfCZPN8jA+EljG3pg3zmxC8fl990zl6S6Xmqlf3JZENsEmrRXpitVGwVYBq/F0zZ0nSB77NEhLRRler1nRURWprpDx59dCQ633fa9GqQqPVb07X84lH9OgP5GM+o1oe5N7YJDo1OBVW9VSoZxss614EjTSG7nMJnfw8RkaAbecbVyaaHMfAeE6gn5GCRBlTx8j1Br/eMO7tpAP1f6MQGjcuzb3pDcxzQ0jzKoeU8siBI2qmJ2CWHAxKniHs8uMU7ZvtDOt3AbjtTxaVZWaLvNFG7dv0DnLw9sOJQJR/Ms67BQbrJ4elhpO5zZ3aXmdWmc2HfwJmg/E+grY/PoHzg8i+nRgJZh50pfZ9Fwd1yG47QpbocD7g+DkBZAz4f7m2ablo58jei+VDo3HOFGQ/0pMt9JZJQPpOut7ePR67Q+oE8snnDU5441YZj4NV2i+TjKgW5Wo1Yd0HoqI4l/ydh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-Exchange-CrossTenant-Network-Message-Id: 0fb8fa12-78f7-4b13-1f13-08db9191699d X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:13.2787 (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: 8I6mJb2Uspc81O16yWVezswkKnRh2g42iSBU6ZVIfP5paEB5m80myaDctGYYwPAedl+NIP7nyI5sRCdzv9pi8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Add more PDs for i.MX8QM and i.MX8DXL, including dma-ch, esai, gpu1, v2x-mu, seco-mu, hdmi, img and etc. Signed-off-by: Peng Fan --- drivers/genpd/imx/scu-pd.c | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/drivers/genpd/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c index 5a28f5af592a..08583a10ac62 100644 --- a/drivers/genpd/imx/scu-pd.c +++ b/drivers/genpd/imx/scu-pd.c @@ -121,12 +121,16 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { { "audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false, 0 }, { "audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false, 0 }, { "audio-clk-1", IMX_SC_R_AUDIO_CLK_1, 1, false, 0 }, + { "mclk-out-0", IMX_SC_R_MCLK_OUT_0, 1, false, 0 }, + { "mclk-out-1", IMX_SC_R_MCLK_OUT_1, 1, false, 0 }, { "dma0-ch", IMX_SC_R_DMA_0_CH0, 32, true, 0 }, { "dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true, 0 }, { "dma2-ch", IMX_SC_R_DMA_2_CH0, 32, true, 0 }, + { "dma3-ch", IMX_SC_R_DMA_3_CH0, 32, true, 0 }, { "asrc0", IMX_SC_R_ASRC_0, 1, false, 0 }, { "asrc1", IMX_SC_R_ASRC_1, 1, false, 0 }, { "esai0", IMX_SC_R_ESAI_0, 1, false, 0 }, + { "esai1", IMX_SC_R_ESAI_1, 1, false, 0 }, { "spdif0", IMX_SC_R_SPDIF_0, 1, false, 0 }, { "spdif1", IMX_SC_R_SPDIF_1, 1, false, 0 }, { "sai", IMX_SC_R_SAI_0, 3, true, 0 }, @@ -146,8 +150,10 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { { "lpi2c", IMX_SC_R_I2C_0, 5, true, 0 }, { "adc", IMX_SC_R_ADC_0, 2, true, 0 }, { "lcd", IMX_SC_R_LCD_0, 1, true, 0 }, + { "lcd-pll", IMX_SC_R_ELCDIF_PLL, 1, true, 0 }, { "lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, true, 0 }, { "lpuart", IMX_SC_R_UART_0, 5, true, 0 }, + { "sim", IMX_SC_R_EMVSIM_0, 2, true, 0 }, { "lpspi", IMX_SC_R_SPI_0, 4, true, 0 }, { "irqstr_dsp", IMX_SC_R_IRQSTR_DSP, 1, false, 0 }, @@ -163,10 +169,15 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { /* GPU SS */ { "gpu0-pid", IMX_SC_R_GPU_0_PID0, 4, true, 0 }, + { "gpu1-pid", IMX_SC_R_GPU_1_PID0, 4, true, 0 }, + /* HSIO SS */ + { "pcie-a", IMX_SC_R_PCIE_A, 1, false, 0 }, + { "serdes-0", IMX_SC_R_SERDES_0, 1, false, 0 }, { "pcie-b", IMX_SC_R_PCIE_B, 1, false, 0 }, { "serdes-1", IMX_SC_R_SERDES_1, 1, false, 0 }, + { "sata-0", IMX_SC_R_SATA_0, 1, false, 0 }, { "hsio-gpio", IMX_SC_R_HSIO_GPIO, 1, false, 0 }, /* MIPI SS */ @@ -186,11 +197,20 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { { "lvds1-pwm", IMX_SC_R_LVDS_1_PWM_0, 1, false, 0 }, { "lvds1-lpi2c", IMX_SC_R_LVDS_1_I2C_0, 2, true, 0 }, + { "mipi1", IMX_SC_R_MIPI_1, 1, 0 }, + { "mipi1-pwm0", IMX_SC_R_MIPI_1_PWM_0, 1, 0 }, + { "mipi1-i2c", IMX_SC_R_MIPI_1_I2C_0, 2, 1 }, + { "lvds1", IMX_SC_R_LVDS_1, 1, 0 }, + /* DC SS */ { "dc0", IMX_SC_R_DC_0, 1, false, 0 }, { "dc0-pll", IMX_SC_R_DC_0_PLL_0, 2, true, 0 }, { "dc0-video", IMX_SC_R_DC_0_VIDEO0, 2, true, 0 }, + { "dc1", IMX_SC_R_DC_1, 1, false, 0 }, + { "dc1-pll", IMX_SC_R_DC_1_PLL_0, 2, true, 0 }, + { "dc1-video", IMX_SC_R_DC_1_VIDEO0, 2, true, 0 }, + /* CM40 SS */ { "cm40-i2c", IMX_SC_R_M4_0_I2C, 1, false, 0 }, { "cm40-intmux", IMX_SC_R_M4_0_INTMUX, 1, false, 0 }, @@ -205,11 +225,56 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { { "cm41-mu-a1", IMX_SC_R_M4_1_MU_1A, 1, false, 0}, { "cm41-lpuart", IMX_SC_R_M4_1_UART, 1, false, 0}, + /* CM41 SS */ + { "cm41_i2c", IMX_SC_R_M4_1_I2C, 1, false, 0 }, + { "cm41_intmux", IMX_SC_R_M4_1_INTMUX, 1, false, 0 }, + + /* DB SS */ + { "perf", IMX_SC_R_PERF, 1, false, 0}, + /* IMAGE SS */ { "img-jpegdec-mp", IMX_SC_R_MJPEG_DEC_MP, 1, false, 0 }, { "img-jpegdec-s0", IMX_SC_R_MJPEG_DEC_S0, 4, true, 0 }, { "img-jpegenc-mp", IMX_SC_R_MJPEG_ENC_MP, 1, false, 0 }, { "img-jpegenc-s0", IMX_SC_R_MJPEG_ENC_S0, 4, true, 0 }, + + /* SECO SS */ + { "seco_mu", IMX_SC_R_SECO_MU_2, 3, true, 2}, + + /* V2X SS */ + { "v2x_mu", IMX_SC_R_V2X_MU_0, 2, true, 0}, + { "v2x_mu", IMX_SC_R_V2X_MU_2, 1, true, 2}, + { "v2x_mu", IMX_SC_R_V2X_MU_3, 2, true, 3}, + { "img-pdma", IMX_SC_R_ISI_CH0, 8, true, 0 }, + { "img-csi0", IMX_SC_R_CSI_0, 1, false, 0 }, + { "img-csi0-i2c0", IMX_SC_R_CSI_0_I2C_0, 1, false, 0 }, + { "img-csi0-pwm0", IMX_SC_R_CSI_0_PWM_0, 1, false, 0 }, + { "img-csi1", IMX_SC_R_CSI_1, 1, false, 0 }, + { "img-csi1-i2c0", IMX_SC_R_CSI_1_I2C_0, 1, false, 0 }, + { "img-csi1-pwm0", IMX_SC_R_CSI_1_PWM_0, 1, false, 0 }, + { "img-parallel", IMX_SC_R_PI_0, 1, false, 0 }, + { "img-parallel-i2c0", IMX_SC_R_PI_0_I2C_0, 1, false, 0 }, + { "img-parallel-pwm0", IMX_SC_R_PI_0_PWM_0, 2, true, 0 }, + { "img-parallel-pll", IMX_SC_R_PI_0_PLL, 1, false, 0 }, + + /* HDMI TX SS */ + { "hdmi-tx", IMX_SC_R_HDMI, 1, false, 0}, + { "hdmi-tx-i2s", IMX_SC_R_HDMI_I2S, 1, false, 0}, + { "hdmi-tx-i2c0", IMX_SC_R_HDMI_I2C_0, 1, false, 0}, + { "hdmi-tx-pll0", IMX_SC_R_HDMI_PLL_0, 1, false, 0}, + { "hdmi-tx-pll1", IMX_SC_R_HDMI_PLL_1, 1, false, 0}, + + /* HDMI RX SS */ + { "hdmi-rx", IMX_SC_R_HDMI_RX, 1, false, 0}, + { "hdmi-rx-pwm", IMX_SC_R_HDMI_RX_PWM_0, 1, false, 0}, + { "hdmi-rx-i2c0", IMX_SC_R_HDMI_RX_I2C_0, 1, false, 0}, + { "hdmi-rx-bypass", IMX_SC_R_HDMI_RX_BYPASS, 1, false, 0}, + + /* SECURITY SS */ + { "sec-jr", IMX_SC_R_CAAM_JR2, 2, true, 2}, + + /* BOARD SS */ + { "board", IMX_SC_R_BOARD_R0, 8, true, 0}, }; static const struct imx_sc_pd_soc imx8qxp_scu_pd = { From patchwork Mon Jul 31 06:47: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: 13333680 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C57B0C04A94 for ; Mon, 31 Jul 2023 06:43:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230244AbjGaGn3 (ORCPT ); Mon, 31 Jul 2023 02:43:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbjGaGn1 (ORCPT ); Mon, 31 Jul 2023 02:43:27 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2081.outbound.protection.outlook.com [40.107.104.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7054010C6; Sun, 30 Jul 2023 23:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IzqHFurjMKJPX5i2w6yRD4hF6F7eoZICpvnd1xX9yrqS8j5XupmhYbEpS/W8fQ0EI09BiPONItmuYJSgjfA7CitmbE426g1OHBz+LgK3tgSB8eZnX886qRGRDspGM1A31s1prxbL/39ner/CacnIj7a+YWYEBMh8VdeBn/bFow7q03vBEfp4WzbT6ndV+13nM0WnN5bGw6DHBlA6J0dEDtWYH8gjxQbbfCagEkQQPuDTZOkMLCwJiredBb80ujyMblxDDeMJU8sSkcjJgquWMBrZ9MWwsDwMpompsikpj3fz1yO56qqGV0PwzrCWXf1vCUWwwGu7hvm1KxHnTFGS0w== 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=6kP0lqZJuvmmSdkRT65OTRDCkODncocwe1oExCy4U/A=; b=oAVyNLT/mN2Uxtinn6N6BEULn6xH8VR6xr3nxyqaywc6ZPuk47Qs04ttYe2SZrljULMjjbVyJH0f+/T6aXq4h1cD6JyGZTEefWHkuBdktBGdXP3s882jE7bs/zAYbTM9ZwjqLnfTt7GDlvNaeaXdCXj9r3KfDYiKg2M/7iKhnkoJCyEMSt2/+ZOPSFZYzNp+YI0amwfUqIcA/8975WN3X91uTupcs9LweFjQQe6M1iRToYZ8QuQLodz1NESp5yxQ/PFTVB2hRaoUjJrxB9i9drwDpnH0ijOZMFlm1kLvYfrTQ8EpNn1zavsCRMSv9ZbRTJakCqaGbJQ6qzK12HlChQ== 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=6kP0lqZJuvmmSdkRT65OTRDCkODncocwe1oExCy4U/A=; b=HGyEvYpE1uy4pEqUGC9AocmJioU4DKuano/1kLDLKf/VbF873nyC/Hu/B6+zfLx1wFkjZ38NXLxlk0KYLFLbBLXeUu0YqVVMTvG9/Zft5mD3LD0OFULyzRmQHsIkzmmNuDoA0YTTqTpopT9v7QidLeIXrnOVlIHqDpxmzQzMVDs= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43:16 +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 06:43:16 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Peng Fan Subject: [PATCH V3 4/8] genpd: imx: scu-pd: do not power off console if no_console_suspend Date: Mon, 31 Jul 2023 14:47:42 +0800 Message-Id: <20230731064746.2717684-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c7c132a-d438-40cb-7a4d-08db91916b96 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: xetCxadBqfxIboc5Pzt1rsHIR552LzCqgt5RPEehEh0jD3CNQm/3r086TwduKqNXMOAC6tj7CKOUKyfffntTejH3vYexwe5BOc/la+RF4NtEbNTqKj6zKkUfTTCbz6WHJXpK9eg0bB0CFwAndf1v7Obc4500eXBDqGHj5znpHP9Ulz3mAfoJsFYuIklq46yVNOtreGEXpWIDCksN4WXN4z8vWKhA6XwrMs6KurlzmF2ANmBOx+arK+tATEhX5mBMOO0MUEIyQoHrt2DJ7hID6/esNtZkElKKMQU7v7R2pSFwhksCAiQGljF30b2xO9pWSjJppPXJmGAuvsIyc49nP2NBGxmiggFnauZUtdKBza1e/iQIbFEHLjRcjbdv8AKNX/45GQMbPQr+qDGRBLUzIccMGiloxMLGLxzEkibmb+JqfUkZkdC6E0XifcPKbXEqiI1TcgGt9K0gFKZbIDDnXKTCyNI/mlMXK8BPkF0fgr6BVMVa5GFTiEBj0+CTsmGFQ8Li/PGUPieD2bzQAPN1SHuf3dYc43RFgCHCwEBi8ydSl2ICr3MjPmcU+YQSGmqDz5f2p12TJpEiqvVbsWlgusLNza5AZArflwTuhCXbiuP3jLK1njd5Mx2FIwn2qwEo 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(83380400001)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(316002)(478600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H97PuXemyXJI4lwMqj+NonyNwt2L1TPYkpbDRWIcvb8d6dtRJD3JduSSS+FwA6a//YQVCiaXwB3IYlCV+yCT7WqL/kuNV5g2wf7qcWFC19v3xDZQHhKvpESy73XknujjRZekZRoInyqo3tKC6fKuKKp4vR4UC5JtKK3Bfja4GZAxNK9r/+gfetDyCSLr5Eiea0KarxswF+FifGvh97NTtf85cNvnuItVcK2ADcgWVZEUXNLIEkehNop2AOSAnrbaMNrsk+AAW1JtNjESytX8FRqD6ICrTjjqXY5t8CmMHtsmViJhsR6dEXs5DXz+rFDUoJZV4Cqpb2xs0Rp8oCN8i2Vx05uWT00D4ZK51UNxeKayrjTdRtBT23Y4zO9fGSp4puOEltULH1styDlUQjqgK5TGByIiTN3BIwXqVL0ytdNqa54uvkuakjhQ7IF03jWeSDj2UGgSICp7JFRbme6f4iwaS0IS/prs+avDVAq9Ca7pNKERs9nwBFNMZu3KoL7LlkEQWWOnkMU7x8DPS3ddntcMJoNt410n5JatpP2/n8NKBx9+cmpJC2bQToFnZoOufpkDtUufWep2tqk2MLIF0l+wuji0ZKhdC71rxb375uBSjXJBHridBUPv5NAlSEETccoO7j2CL49nNGzIOLhclk0bk45LonhHsnQ/IInBrOZps2MQN5VfVTNcl+Z09TmIwaJ7uZ7VUSpQAKtLdEZ+O2+0LztUntVRkJU3uVak1/GbTnDjWysADCKbXBUYfi3E0hEDMT9rt5n1zyMFMIMNOZafIn2XsHvp2di00arTNrOYPKCf0qLN3PObdUq145Yhnlp9ebVS6rQck83cx2NPLvkseJSW+eGH7m79jfLe8zkQSSo08hGgMSpw3M+JmNAuMKV7nPPwSgVB+PPjNUeNOYOGW2JXMbYaIK4A1sE5HirR1wJsW8LvXdycSKdRbHf+0icI1KIjdY/TCIXL7FXyOFBHmwMmNYgI5UfaryZYVG/qPmWm6Y/sUDV4951MYXjIYDNRXZrvgZKtyAcNG6RLKacAylWF054Mq4WzmG4k4llqzxVAQXmnH/k88EDFu6r4OU7L3S6p0wYBft16ONTrGX8ztHxMBpUxEZzZ3z+HyRnkRPHtVEBiq+D6tfa/9FI59O9wRGM+rGXds4BLsO8hN1prs32x2vgTKwOceKhnPA/lneCLFweJDHf0In5k4fzgOsys1lGEJpmxlFxXSb4z7jRb/rEsveNd5eDU/cXWh6hg/KUhxpcMZ5wBX3hkEIetmCxdBCSoMUmhQFf98IYc/eDNRfvzeDqv4m6pE4fxeA48bUsWXOMVc28AcTR0h3Xs5mw/fKRZIUNy2TtI14GGS3OjVyQKE+N9ygKp9Mvt9taqY6yxKkb/6MXS2F5DgMvrKQZMXeJ4uVITTgTqW6lDqfA7y6Y8s6b5n5vRKX2M+vRy/xXcmmTrQyXghf/l1uwOBHlYA/1sfKJxJ0Q8+TlMBL6LsMqLNSjqYErCv5tT/Dv4wrRXdwaVykallswTipf9L2oTwMOsOM4HeLQpHmFmR+s0QwSaYTItqvMIdHpma/B/4vS8RjBqdLWvbJFwFGZM X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c7c132a-d438-40cb-7a4d-08db91916b96 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:16.7218 (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: FrnK6cuF7RDzBhA246FybYGW9KU1Ekim0pMEbhhkOK9WnDOkuMMAsJFbv0jZmvFDQgoQ1rpSK0d95XoCiK4TZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Do not power off console if no_console_suspend Signed-off-by: Peng Fan --- drivers/genpd/imx/scu-pd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/genpd/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c index 08583a10ac62..d69da79d3130 100644 --- a/drivers/genpd/imx/scu-pd.c +++ b/drivers/genpd/imx/scu-pd.c @@ -52,6 +52,7 @@ */ #include +#include #include #include #include @@ -324,6 +325,10 @@ static int imx_sc_pd_power(struct generic_pm_domain *domain, bool power_on) msg.resource = pd->rsrc; msg.mode = power_on ? IMX_SC_PM_PW_MODE_ON : IMX_SC_PM_PW_MODE_LP; + /* keep uart console power on for no_console_suspend */ + if (imx_con_rsrc == pd->rsrc && !console_suspend_enabled && !power_on) + return -EBUSY; + ret = imx_scu_call_rpc(pm_ipc_handle, &msg, true); if (ret) dev_err(&domain->dev, "failed to power %s resource %d ret %d\n", From patchwork Mon Jul 31 06:47: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: 13333681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC1BEC001DF for ; Mon, 31 Jul 2023 06:43:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230272AbjGaGnr (ORCPT ); Mon, 31 Jul 2023 02:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbjGaGnq (ORCPT ); Mon, 31 Jul 2023 02:43:46 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2081.outbound.protection.outlook.com [40.107.104.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B31C9170A; Sun, 30 Jul 2023 23:43:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WkdwFl4jFCEAY0yki29OQSr/xL0Ef1L6eL8cKZDN/RnR4RKe6Dhxji5H6XEVBbTj5XTfIyecDJ5zc/Q3pcE3Ujnt0RQnJ2L2TItJPo/Y7/pOZh29VuV8nn8Qqona6DCFz+/acvIYLbcUTlwp++qMVtt7Xgy0UM3eQrwzHOUDRrUoyvfQIhJAkENPBSh0VM6iJSA1zc4OLAcQMYbI+ivVKMMPGgkC0l3GCIa0P1s0yEJrrxgOxelSxOrTrtRnVLc+1Vh3BQ5E2paMYFI7QuV9MjNXrNFdqmnFG1icB31531MhqxulfGvrkfbwmOS84tbXU/btytChsTBnnlAjPqyfLg== 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=egD3H43VB+M29WT3I9pdzG/iYCx3+8lbdwgTclArnN4=; b=EfARvx4kmGAnZxw6iYG1VSDwjHDo47gRk48psj3o6Kvpp5nOedJdvKT7+gdSysreR5lkZnUgi+F+YTZSMpaudVkHxpgOSCa+kMBCb24YJY2D8i3PVHUG+zky3tcBfyABvaHavXp7EEXxmWErVeaFWINPqlh4ShR7ZNpS7QJTgbRo4evqh/MjnMlnk7eNB1J6HmKJUgpi7oSXA2mKKL6j/RQ2uXH4Wp6Mc4bmpbgE+A/eMAEskwyBnZcjnvBj7D4qCEsWJN1aQFv5Da4dvaAcoWgw7T5qBsPuuJJZ8gU7UB/NjaW2FNN2CPSMhKkEEH9Q1BQfi/d6UrllFK1Z5vOZfw== 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=egD3H43VB+M29WT3I9pdzG/iYCx3+8lbdwgTclArnN4=; b=P1d0RD2HoYVXEarUS7JnxokpuDF+nZZQSrtrGZldBsKbwyAy/MsckUJgBBkSNCtpe/eAbxpBUO+O64P0wvnpK0SBln1i+7W07kYGSuzeGc26U7MS+aEG/txjws1YnlqUFlNK5k2epFwsFj2tVrGo3L7YG2Zw8aSVv300mFczutU= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43:20 +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 06:43:20 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Peng Fan Subject: [PATCH V3 5/8] genpd: imx: scu-pd: Suppress bind attrs Date: Mon, 31 Jul 2023 14:47:43 +0800 Message-Id: <20230731064746.2717684-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b9bc8a9-b8d5-47d8-4b9d-08db91916da5 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: ymYHFIOe7dbV/wiQ2DbGHiGtX510TfrfdCJgXPF+/wwwwHC9bZviUt40+dKcFBRG0/xD7R4efVwD7YilHh+PGJyhlUImjaNFXumqk0nq1+rEwdTnws71ZB79nJ+z6Xf6ER3bGxfyBsC3s1RrDnVxgeeR9FWG4KqJCzuHYeiiSIuTQTPAUPMQiM8gusp7/p0kUZj1tZt7FQgrp+wmrCMp8jNKQtEsiqyICKiCP7FIAIRr1wCM0dDt64p504zKsRLklx3Do1O5jQRRV+pyigbO2PDdqU2aWnss2aqKOM1Oca3FmUGPqSI0FV2pISZ53JpeMZsaeKdmZ4QpMcPUpZAl3CF2XghD+uv6PVu6VWPmF40eVczFUnd+65CkvnOha1v3NgsVa9YQZUapO/bSU8K3iZBA7xRWvWMe0gxtfECOj097aSIRj5Cj35Y8xkld7fGyLRE10ahN9a2UII33KFGpqdGwDxaf1UD07JyUqwoTTY8DO9/ugUSezHH79szRGcCkwUFhC0f3RaB4bhPuVd33KsTAz28f08DMgy3Qy9jifWRtWxirMP1v2qJ6MkPVKhbvi7j4RSwu3P5UzqCinsBK7Pb7p0CB2WuOu5R5NF7U1JL0RoLUi6Lf9nWXmZ31n74y 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(4744005)(316002)(478600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V91Dc3l6FPznSUC8vwOO13KGaoxPogHbf83Xf1X4jbJsh9yUQUO/8y1eShO1hJ/ibeK++h8RGXEF6Q3Yzoh6KV+ch82HOCSuYZoGlQxOF2H0ENbJ4+w4AJbu8R35Ap2TqCISO0epqpvzlPsq72rlH/Y9moq04Sf6LGOOYiWL/xQ8HkPuXs4Ufr4XhxSgv9MHYIfZPZ+h9WfVtiQ3sxA3bCRHGKSxxArPrMin/N5vTQ1x2E6i5rG0FswawGLewggyxYzeMMNvg1xbrEq3IEi2nVBtR2VCqH8Ao0gLmTCJ3CnOpDO+9OQl+D34UI13kgVW7omU8/g6fdW4ycy4Zs2Ew5nOS0dEomjlr1G2dO8Z69POSfVlGQWsxmEIOeQgUhxSnbE3hRE0KfE+aCFdZSlXx3RwfxKxNUTwI43BH3WHoO6mqlkNIO/M88rLO4Zmtgxv6+m3ZRvTbUVOXH/SU+60EwThxrpn3FfUdghHUISOdhI/7H1ZTERG36kjAtSazDa6gWX//CSn7ZF7Hq3a/6oPZnYZW8+Umv1J0HW1jgXMsNDTxLfUx7px1fJuFaH9M8HLiNvGUBAXhZSqKQ0kxhQqW6hT1Fh1kh8WaVxsTEOnMKJRBbjHA8ruZezeLPSsEVOoGyMX6NnK7N6q2pEJEWWNkN0MTI1/+pyJwsRvDVXKnmPh8hlUtwmOIl91z9vdk16S97AMGYd8+UTmhGoUY9d/mzsYW9V0utTAF15NiL8YwY2W51YuspE3pO2vihzaFf1AK4gl0+mJ5bMZWttpEC+7Sb5BrdgdF2YwV4N5lKuT8D/xcV4PyuYxPIH3FRuiwjdeT47m7nBinOpGDKij1ArA50n53UGjY0t6kWGvbWnGyUlAI7vWl7XpLXWcuZUxWX8XrV9WjOxTHTqzESI6eG5W0j9iSDNw4Xv0UFbKiJroaujTy86vfi722mywdYWStHFnYS7+b9DfcOnllcP+DYv/GbyJFNwHJxr+5FHITWrjQojoGfKyQEv/vUVdgkWnJK2WyElJwwkMTBIkKBJPr3oBUqNIPLlJpXsO1PNWaLHvgylRVRGBjP9ly8ot3mMtFynEgL8Ta41YUi3zN7D6FeAWF+ideIjqNX4CvFfRA0LCB6Ha5gNEubqygcGOVMPbh/HrNG9G+wbKISduHdnhDdvHWQ/yEbkdSPphQBKmrrXeRiG7KS5Ft8auNEVB6dfzBRYdFsgOFdI5ME8AcOJUk5RN7RxEi86CShDE7uv2gxEU1HGuPVQJTPV8ANdoZeXWCHVDLzRQOFOGkYoOZQRkihzWlI1ihtpSDaIeu3LERrIMrYMXpA3pWW5tpXPDO+30FUdK61Gaseh15zGS+j1IkkJmmInbPBpfSVgqg9/+lmxrmz+UyAgBvYyhOZcsrNQri+acufuUrNgPy5394tc/uee6YCoeKKrZQ+cm+8x3HU5opOD3FUaWz0lxJI2iacSvoQUlApG98rWqY8xg/6cLqlnyxf/8njWgw9difFbNLbzFGI0FCoG5FzCyTr8oefRNWohwxdOXoHDx0NlnwYsFPmR4tp54k0w+CDGWGYE1AhhnhdAGsUI9R9BDKH7CSBPagzyJ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b9bc8a9-b8d5-47d8-4b9d-08db91916da5 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:20.1689 (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: 9bhdvxsx89bl8iQi2JwgYmH1gfDhrm8u3+SSsE2JV7ZtMPMgfPF9r0A8L8a8qnHYbv2zBjoLFGbZy7RzQqV3tw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan This driver is registered as platform driver, but removing and binding again would cause system not workable. So suppress bind attrs. Signed-off-by: Peng Fan --- drivers/genpd/imx/scu-pd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/genpd/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c index d69da79d3130..fa840ebe38c5 100644 --- a/drivers/genpd/imx/scu-pd.c +++ b/drivers/genpd/imx/scu-pd.c @@ -488,6 +488,7 @@ static struct platform_driver imx_sc_pd_driver = { .driver = { .name = "imx-scu-pd", .of_match_table = imx_sc_pd_match, + .suppress_bind_attrs = true, }, .probe = imx_sc_pd_probe, }; From patchwork Mon Jul 31 06:47: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: 13333682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE30FC04A94 for ; Mon, 31 Jul 2023 06:44:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbjGaGoM (ORCPT ); Mon, 31 Jul 2023 02:44:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbjGaGoL (ORCPT ); Mon, 31 Jul 2023 02:44:11 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2081.outbound.protection.outlook.com [40.107.104.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE63CC7; Sun, 30 Jul 2023 23:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZGDYw8d/4D7bjTIDdVRTYzEtrxtGWaceF/Pmzo3JOLvY01N2tKE70pnTr+QDRJH9iXGD+NlEzpTbyGjId/Fbt1chKSLuGlSbKjJJCEFMMTDObe9tf/n7K+caNdzg6exPYqtVdIXCo6/09bkGRjkIPUsKNUKs5g8J0v3OCtso3JcHeOKuCHTq01sRokz6jY8TsqCL1TwpZw4W7yWiY6emkvLEW4ZfpP92m03SjoyMbLUdM6HKZ5b2TfZ83xM78IjCQmytafJzuAolYujFl7BmPL+Fhc0BXVxSDkUgkoTpJBiCQvg9GQlA97Uyt/A0+JTKoyyTvJEH9aRb3xXdILy3Ew== 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=hnwPH3pq96T+Zzaklp2pSzzWTeNVi3Kc0UXMFo83+kY=; b=SfgRuvgWB8qaIw9JUjdooHxJPzpcjDPRSJ8Y7w2m2UM3Z7ERYoV0ABY6a2vi7wBHKrRpcQ8NzcN5eDrV0vCGagPgIYSRH6SI0hIl/nGfjAsiEvV+lekmBil6u+Ex2kesWXcu4uSDzKBPYnArrzuF8xJ/HjX7yA+yFlta7rYBBrxyVQdwYXUSF2HEkcrjoKno9ebOXQu0PiIIRs0IpZCf3flPj56iXxkwEqVremh894vERnm7NawXEk5ijpaY4dskuD2fD6d25cSZilXaeTZxpKbawLKf2nRhLmxHqn7aC8vMIfWb+BzTeUj/PjgBKtZEtN85DElml/vGHZbs8Mz6Jw== 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=hnwPH3pq96T+Zzaklp2pSzzWTeNVi3Kc0UXMFo83+kY=; b=YMybmHNqydiRyJmaBBDegoqsCG52UMHzAQ8ZFQwHetrG2tozXGSYX7nLhuhAuF5edsQbx7M+zShgUwaMg8rsLZLEDlFEjy66i+gWqqVtUF0V5zCdrVNUnpvdsR7F8HDCvKqy7J5guFWYWaCGtAyh7/mddZ9m9unw+qCyl4u1lzQ= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43:23 +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 06:43:23 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Peng Fan Subject: [PATCH V3 6/8] genpd: imx: scu-pd: initialize is_off according to HW state Date: Mon, 31 Jul 2023 14:47:44 +0800 Message-Id: <20230731064746.2717684-7-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b122c7c-e2bf-4a55-b6e9-08db91916fb1 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: bty2P9MExiG0N6fpY/CFTQoRG+Cu5zTuJDnRmbG3ZJvS4WjNwg8qxlR9lYeh9gtwI9/y4WX730p5V+WHffb5r6PRc7/WRbsiltapSumhULf8oIdTtA1dOAJvpGuGraWKIyj1DOWQtg0gDf12+2Oijnhd0cZrZXBLkA8IKQ+MBG1zAi+hjNdf3DIjEmhzc5HO1OZ2fXfr8RC7GhO0w2xIShZmMSQANfKW28TLVEsA+B4odG7Z0nOvw3Ns5Hd92tuDA0iwatNbDtp2lHSLjEWOuavrCwkWOr07kJhl6HBZ243t1DZbVu2L1AXAdEd2YT7PoB6/cmCsRqQVlS0XfNIcXjbhZhfngBWBUD3++OSyQMSd4ycwRjc9PtHjFxhcry9Xr4+4O0SZJZnGDBF1+a7WRkgvY1TFadJoiWV4VkbW6FpgBLYrz/VcjEwpH0mE88wa1EKEakXKh2nbd3VoJIGeqE15wv+5/HitGvLh1a686x9MiIo3Gb8Ch/VuduS2wJ6SvkUfGfxNUbnAAcdYHX4r+N2EfRs6IEMLU4cm/+ltehGCxbyEbGQpIwitMadaRDk+6jwfdYfsVF8trt9AU81wmemXwig1htvIBvhlT/PwcRpjR21/iNG6I6CtzXWprpan 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(83380400001)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(316002)(478600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5tFs0kUXKMw3lR3hQ/WSpDaic3Y7MOlv2ODNK98+QZKA93448Of+0gIwTzl8MpBHDrGRPUYoqi3LGFOy+cQ9DJ9KRV6GrJRNb9mgVZlDpT49s4SSv6PpdWiX7TwYhqbfkfiah8LlylgIZeMXrYfw0KaysoHMdJtBJIyZ72EDZxkW4yxH6gHNRP60xikaj5Ng6iaXkkEjctmdNwTuU4ER5DSww7hH8Fsehn+RQTFHR5fVXoYtEWXtu6U0rDy7qD8AoY15YdVfknwFqRVvwVELH/bp/eRb6GQocGIqmfBd49tNDx2JTdFuJXbEPmunpVGST7GwxPqJlrJIOqSDIGF57V4kJ8QiWxFuFM0xyjRmvufVm9z9uMDpXNC14kLaM3mLXS1fmHFLi2Ft06kcb/VtdC0EeLKHTz41ZF0hrZqR+12shjhE6uuEwE8/EaJstCLaAZa7a2WX9O952q7Aaz61TPCXTGwbr0ZIIvh7F3zs34n45mkCqtnRnD5pyxG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yfOUVf7hZs4enNunJqY+v93dz4 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b122c7c-e2bf-4a55-b6e9-08db91916fb1 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:23.5214 (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: ukkSR4NXx8dcDJFmnWyJI4u2xBF/zjEnxJJ9vayq21aD9PwiV2HJFCApkVZklG0LyLxHHdwBLq35S7jTheaLxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan The current code default set is_off to true except console resource, this implies bootloader should power off all the resources it uses. But this is not always true, let's check the HW state and set is_off. Signed-off-by: Peng Fan --- drivers/genpd/imx/scu-pd.c | 59 +++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/drivers/genpd/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c index fa840ebe38c5..2f693b67ddb4 100644 --- a/drivers/genpd/imx/scu-pd.c +++ b/drivers/genpd/imx/scu-pd.c @@ -72,6 +72,22 @@ struct imx_sc_msg_req_set_resource_power_mode { u8 mode; } __packed __aligned(4); +struct req_get_resource_mode { + u16 resource; +}; + +struct resp_get_resource_mode { + u8 mode; +}; + +struct imx_sc_msg_req_get_resource_power_mode { + struct imx_sc_rpc_msg hdr; + union { + struct req_get_resource_mode req; + struct resp_get_resource_mode resp; + } data; +} __packed __aligned(4); + #define IMX_SCU_PD_NAME_SIZE 20 struct imx_sc_pm_domain { struct generic_pm_domain pd; @@ -96,6 +112,14 @@ struct imx_sc_pd_soc { static int imx_con_rsrc; +/* Align with the IMX_SC_PM_PW_MODE_[OFF,STBY,LP,ON] macros */ +static const char * const imx_sc_pm_mode[] = { + "IMX_SC_PM_PW_MODE_OFF", + "IMX_SC_PM_PW_MODE_STBY", + "IMX_SC_PM_PW_MODE_LP", + "IMX_SC_PM_PW_MODE_ON" +}; + static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { /* LSIO SS */ { "pwm", IMX_SC_R_PWM_0, 8, true, 0 }, @@ -308,6 +332,27 @@ static void imx_sc_pd_get_console_rsrc(void) imx_con_rsrc = specs.args[0]; } +static int imx_sc_get_pd_power(struct device *dev, u32 rsrc) +{ + struct imx_sc_msg_req_get_resource_power_mode msg; + struct imx_sc_rpc_msg *hdr = &msg.hdr; + int ret; + + hdr->ver = IMX_SC_RPC_VERSION; + hdr->svc = IMX_SC_RPC_SVC_PM; + hdr->func = IMX_SC_PM_FUNC_GET_RESOURCE_POWER_MODE; + hdr->size = 2; + + msg.data.req.resource = rsrc; + + ret = imx_scu_call_rpc(pm_ipc_handle, &msg, true); + if (ret) + dev_err(dev, "failed to get power resource %d mode, ret %d\n", + rsrc, ret); + + return msg.data.resp.mode; +} + static int imx_sc_pd_power(struct generic_pm_domain *domain, bool power_on) { struct imx_sc_msg_req_set_resource_power_mode msg; @@ -372,8 +417,8 @@ imx_scu_add_pm_domain(struct device *dev, int idx, const struct imx_sc_pd_range *pd_ranges) { struct imx_sc_pm_domain *sc_pd; - bool is_off = true; - int ret; + bool is_off; + int mode, ret; if (!imx_sc_rm_is_resource_owned(pm_ipc_handle, pd_ranges->rsrc + idx)) return NULL; @@ -394,10 +439,16 @@ imx_scu_add_pm_domain(struct device *dev, int idx, "%s", pd_ranges->name); sc_pd->pd.name = sc_pd->name; - if (imx_con_rsrc == sc_pd->rsrc) { + if (imx_con_rsrc == sc_pd->rsrc) sc_pd->pd.flags = GENPD_FLAG_RPM_ALWAYS_ON; + + mode = imx_sc_get_pd_power(dev, pd_ranges->rsrc + idx); + if (mode == IMX_SC_PM_PW_MODE_ON) is_off = false; - } + else + is_off = true; + + dev_dbg(dev, "%s : %s\n", sc_pd->name, imx_sc_pm_mode[mode]); if (sc_pd->rsrc >= IMX_SC_R_LAST) { dev_warn(dev, "invalid pd %s rsrc id %d found", From patchwork Mon Jul 31 06:47: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: 13333683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D366AC001DE for ; Mon, 31 Jul 2023 06:44:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbjGaGop (ORCPT ); Mon, 31 Jul 2023 02:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjGaGoo (ORCPT ); Mon, 31 Jul 2023 02:44:44 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2081.outbound.protection.outlook.com [40.107.104.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B24F610FB; Sun, 30 Jul 2023 23:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K+N895pVVzj1azw6kCq4invr97UuVXLZTMgm5rfVFow6LUrn84C6moexO1cD7sxImCF/khoo+EO6pTls3xTYXpuXuZxfXGK/mjfCj56Dkbxq/Ufe5/vVElYyQ7cjHX7WBkInfPMsETQ/Z/EO9TJwBeYHXmNfP14e+zKGBvRLcIXrLjfQYCusUfIS434HbZPUxfpYbNzYaDA/maFBTGoucIeBFIhPc6ZhCk4GhMPzIt2j9HTc4qBOXFFK6+8ilxVeL3a3HP03n8Q5m3uzUH+N86AdW86D0FliW3kXw1qzrXls4A1jScY3cXsP8BqNIm4l5EWCIG+77WZcRHjV9OcJsw== 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=bTqXGAi4gv6df3uCGkaSZVTjEApwuAc+7+xXRdnwpqU=; b=aZ/ycowiZJQ3BMC8LMGIc7kZnAUZ+3apcEW7+DXBdlPBCX+VUeDBZasFE1iRfBgBeHpIp+hO7hAGp9yJRfxmihfpB20cpcny5QB+pSuNwagoHqG2j+OGhsuTW7lov7+n4Ap99wqq2lYxFjtWOiYYs7ld/n95uB/eqiS3dpNVrHPk7N5tx/7r22YRK+73CbmRgQ8CT3h5frxprqjYXvjjjeZIl+ROIj6VHtkxk/VehEDxyINvpSOXuFveTQUkw1tfJuU0PAmd9kGJIhpsru5bD6h9NXTEjIqwvCzTBHgbaRvK3L4/dx4Z4RlTW2vMCNInqEtjT0jmJx1G/qFh0gcG5w== 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=bTqXGAi4gv6df3uCGkaSZVTjEApwuAc+7+xXRdnwpqU=; b=lf7iNFEb70jXadI3BwqPeL7MfMbDKEzdm5R7Am+AnvfMeBsUErXlu9fHRLSYqPcf62NCRnszMjxsGSB3L5xQ99X9XaCARAzlfu9YVcJ9+KTG9CCJG5Uv5+vErPfpU7u/C3EqRbEZl7UXp2TyLTPdB8LPXBXXUHRPkFpBv4D/4Fk= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43:27 +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 06:43:26 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Peng Fan Subject: [PATCH V3 7/8] genpd: imx: scu-pd: add multi states support Date: Mon, 31 Jul 2023 14:47:45 +0800 Message-Id: <20230731064746.2717684-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: 5131891f-d8c8-41cc-38ee-08db919171b2 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: 380tpObBOTV3uINmOhMdsG35m4Ut1vs6aNSxI3vts8l41i44PflwAVueU1uNU05uCfF/IlRkqgNIQqMqV/J6LSxmA/q/0okJswnab3oTDeKdyaWaoVO037a1g6SM6kXlBjfX84+k+LhYXS4txkPcjkbchEVGBxeDqoQU04gTISXc0KFpkZL09xX1loo5Xy4XjddjooKDSYYcLV1x3Mh1fSKZV415O4KKJr4/eqioZQFGGcyDTiqDK8Bsip6HOvBk74hBh/+zcYjMxj9pf0EHRPvFOf51gIENgoveOHrZ6SSkja90wR5hbdppeQpCtf33NPqdlNVOkeVlFPD22867b98AHyKvnbrmDJQ9jNHcQ7VxjmRYS6VQsm9ILskvXbH6xsqKw3LvO2pwQKVi8/+IYSlQEBcSucuAxhrYFKM1emlndSt2YT+K9LMA7YHPjG86G3H96DbJWraZx+WnpHodM+lVmqh8werKFIBDr0JmoQkzTZpG2QFRbUs5bHds3+dxxaykHUMeFbNA996deFUWrApb9BqpwooLra1ZAiB1HdpSeDtfLHIjOfyqI4R+JvCeIwdsXy1RyCfDUf9TuIFwlnudpv5nfjrEzueno7qJ/HRJdNUSOyhoFX7v512N8iBS 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(83380400001)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(316002)(478600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Ex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gf91mTEpmh4SaFUICN5yualK2LD+etwtTSUb8aTYgrVTB0sIdHWKo9AgKSSTXVPQm2PlP2LxgU0d6FtAzDjOdLrYiNmXCeXI50/BKi3ARTF0m/odA1fIJj70BxsNNE/5fMivD/H/N2nJc6anrpCN3iHXZoLPeujKvJc1VkpGKWgaSAOWT0mvKX1iVJZ8yO2rsreWgFKD4tosA4bzIPhEwbdpKuKSm8EJSRvYHe7W3t8rbUg8SEK0kTSBtKOZuc7QHzo9yaIuGtZU54Qrp14eenUZOZDKKzLMFnk9ouZdZepWcMS/dpURFIhjRz808FyMb8iU++to4XjgDY8ZgLtV/lUFhxcfqgTdSCZ5agisfgehuvqxAIAo8A1sQ6LyiUFTCXfcuCyBccay3yZD+97/2pSdx/m9PO6lcerN/UUTJIAVrpsoFhmBm7CbFY04Dae8HyVr5fNa7cdIUMza5klfFKSJabSoqHyD9vyCcSo4BuRP6xzolw+dsJ74YkU3tV+tW1liixQxp52EJvKoOabDAvzoqDIYlb7QbwHaVQYk4WTwCQe X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5131891f-d8c8-41cc-38ee-08db919171b2 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:26.9248 (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: f2lLYqp3z+nENl/RKQWOxxM6w/jUxyx2zU+zKPbT1BDlsV3tOIluEUyLejdFEj/NPTZRbgQB7Slqbz5SUDNhAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Add multi states support, this is to support devices could run in LP mode when runtime suspend, and OFF mode when system suspend. Signed-off-by: Peng Fan --- drivers/genpd/imx/scu-pd.c | 48 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/drivers/genpd/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c index 2f693b67ddb4..30da101119eb 100644 --- a/drivers/genpd/imx/scu-pd.c +++ b/drivers/genpd/imx/scu-pd.c @@ -65,6 +65,12 @@ #include #include +enum { + PD_STATE_LP, + PD_STATE_OFF, + PD_STATE_MAX +}; + /* SCU Power Mode Protocol definition */ struct imx_sc_msg_req_set_resource_power_mode { struct imx_sc_rpc_msg hdr; @@ -368,7 +374,8 @@ static int imx_sc_pd_power(struct generic_pm_domain *domain, bool power_on) hdr->size = 2; msg.resource = pd->rsrc; - msg.mode = power_on ? IMX_SC_PM_PW_MODE_ON : IMX_SC_PM_PW_MODE_LP; + msg.mode = power_on ? IMX_SC_PM_PW_MODE_ON : pd->pd.state_idx ? + IMX_SC_PM_PW_MODE_OFF : IMX_SC_PM_PW_MODE_LP; /* keep uart console power on for no_console_suspend */ if (imx_con_rsrc == pd->rsrc && !console_suspend_enabled && !power_on) @@ -412,11 +419,33 @@ static struct generic_pm_domain *imx_scu_pd_xlate(struct of_phandle_args *spec, return domain; } +static bool imx_sc_pd_suspend_ok(struct device *dev) +{ + /* Always true */ + return true; +} + +static bool imx_sc_pd_power_down_ok(struct dev_pm_domain *pd) +{ + struct generic_pm_domain *genpd = pd_to_genpd(pd); + + /* For runtime suspend, choose LP mode */ + genpd->state_idx = 0; + + return true; +} + +struct dev_power_governor imx_sc_pd_qos_governor = { + .suspend_ok = imx_sc_pd_suspend_ok, + .power_down_ok = imx_sc_pd_power_down_ok, +}; + static struct imx_sc_pm_domain * imx_scu_add_pm_domain(struct device *dev, int idx, const struct imx_sc_pd_range *pd_ranges) { struct imx_sc_pm_domain *sc_pd; + struct genpd_power_state *states; bool is_off; int mode, ret; @@ -427,9 +456,22 @@ imx_scu_add_pm_domain(struct device *dev, int idx, if (!sc_pd) return ERR_PTR(-ENOMEM); + states = devm_kcalloc(dev, PD_STATE_MAX, sizeof(*states), GFP_KERNEL); + if (!states) { + devm_kfree(dev, sc_pd); + return ERR_PTR(-ENOMEM); + } + sc_pd->rsrc = pd_ranges->rsrc + idx; sc_pd->pd.power_off = imx_sc_pd_power_off; sc_pd->pd.power_on = imx_sc_pd_power_on; + states[PD_STATE_LP].power_off_latency_ns = 25000; + states[PD_STATE_LP].power_on_latency_ns = 25000; + states[PD_STATE_OFF].power_off_latency_ns = 2500000; + states[PD_STATE_OFF].power_on_latency_ns = 2500000; + + sc_pd->pd.states = states; + sc_pd->pd.state_count = PD_STATE_MAX; if (pd_ranges->postfix) snprintf(sc_pd->name, sizeof(sc_pd->name), @@ -455,14 +497,16 @@ imx_scu_add_pm_domain(struct device *dev, int idx, sc_pd->name, sc_pd->rsrc); devm_kfree(dev, sc_pd); + devm_kfree(dev, states); return NULL; } - ret = pm_genpd_init(&sc_pd->pd, NULL, is_off); + ret = pm_genpd_init(&sc_pd->pd, &imx_sc_pd_qos_governor, is_off); if (ret) { dev_warn(dev, "failed to init pd %s rsrc id %d", sc_pd->name, sc_pd->rsrc); devm_kfree(dev, sc_pd); + devm_kfree(dev, states); return NULL; } From patchwork Mon Jul 31 06:47: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: 13333684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F09F1C001DE for ; Mon, 31 Jul 2023 06:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230102AbjGaGpZ (ORCPT ); Mon, 31 Jul 2023 02:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbjGaGpY (ORCPT ); Mon, 31 Jul 2023 02:45:24 -0400 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2053.outbound.protection.outlook.com [40.107.241.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C696610F9; Sun, 30 Jul 2023 23:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mMzVwntcOuyQyOY7vPYwt7/q/8nFzOZWd6LH7AklugegoPlqykJu8pYbnDqWr2Wu9sauds4290007BiYZ+vTsH+Ln0IWs/99ba/6GUHPos/zyJqiFVtc1PMVO+n4Ebp+YxM3vsRUJg8hNE80eValTbgvnxAmajwexkRnyH8MEhwPfaPtIh0rZwxnUKPMsfELB4HCQhxB8Dni/S+n2D0InksV60DGiGoPCxYxi/ubTONnybWJ5cKfpCacaJUxW9Mxbth9G0BmAyjgqUMhzEm2McOAYRHGCjUtkaZ/LvDAAg/qu6WZzPIzjyYp6mLJo5+M9DQdozwKdePAyNp6XqKWiw== 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=z6eZg2SXpnwBey6uGP5mOAlS2QAU13HzikrGZ4cybSU=; b=PFRf7asxvTFUszxY0fKO8+ch9/yJIyefvPOC6EVmhWFRrq26k9/uYVXTSMYXSIuRDAD3Thl6NWqyQGMfAfjsuXhKzJL2pdrHADC/vnw0aGWGVO+FrYyV0fU1iUO9EdZHZMt0JGxn54XAaWP2FJSysx4OpFGGmki6RdPhc/3WCl2gPaHft/UbqRlhtq9j/9kqT/8xSLp3VwGyzqTuOl433xuhyHJYW6EWe8cyXCW3YNH5XLGAk6RKVnp3OE19Dp2qohRWMPz58uKqABybZKYcqr1OI99hpT4/Wx+rqlkkFSedTIekTmGELYdlbeF9Q/Ps57cQ7jKtpzmF87NwsI0/1g== 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=z6eZg2SXpnwBey6uGP5mOAlS2QAU13HzikrGZ4cybSU=; b=Uts9sJf5npAbmtpfrTWI74gqT2b9BfDSwlCCmuh78TCsOS3K/5f9SfDOvCsUP0byOWUes4WWBKNyXaevqPsdQBhjT0RP7DNIJjV8gIGPKcLO2Z4IJvoJtrjAUW5H53J/lzdZ6ycnJRWDcPP3vc/4igFEe/c+73mUk6ouLUFtpkM= 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 AM0PR04MB6834.eurprd04.prod.outlook.com (2603:10a6:208:17e::13) 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 06:43:31 +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 06:43:30 +0000 From: "Peng Fan (OSS)" To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Dong Aisheng , Peng Fan Subject: [PATCH V3 8/8] genpd: imx: scu-pd: change init level to subsys_initcall Date: Mon, 31 Jul 2023 14:47:46 +0800 Message-Id: <20230731064746.2717684-9-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230731064746.2717684-1-peng.fan@oss.nxp.com> References: <20230731064746.2717684-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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_|AM0PR04MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: 23deccae-04c8-44c0-64fa-08db91917401 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: o85uwYrncA9W4LHOF0mHB9u0/HgzLyU+RS8TqSZzYtSxHeQyIjVVHOMMZdDlY0ubeRXtvDn5DzHhgGCRdAa6lGRcLw7Pi0kbCPvPACyx2aX9qxVoU8TzQua/yMscv48SA7QC5EeM602AJVXiCPGdL0pK+VGONtfSxkN95QBPkyYQ5BZ3Wu5QcAiIN2lcKZLGDSMDxU9pebkZbdKt3BvJvum0E2KvfAYg6RZpobH/qo+Q6bee9TWeK1F2N1Xb9VSBX5h5/Ci+tJEmDC8xXEtl9XYra2SIFGCjtPFycCRaCODKybxIYmhpY0F2HTiPVCpMvNSHG7ExdUisd2VpfeevjoyNhfc6lZMv9brms+jSONEnb2nPLtEVI0x6Vvj0y3zFo4LJrwTEuSC3HkF8knVmVzJtM1xX5wec5rvAIQ5qq7VjF8lFf6rTGXsz1iVEcWbd7K/UqZRWXgTiWsJbnBTNHqfGkHD6qxGgYzKHdz0Cum14LnidymG9kSNX0D7xuzQSfsBsyUeF5W+Of5to++Eiq1Nl40Jnj+tKzIpRsNirro1TQnq39vJgG2am6DWCGS+cc7+jNjNWSyjq9XG3R5xV2CAzbs0KQGu6BhQUD+5Otra1jL4OqD7Xu8mHdADGtSm3 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)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(6512007)(52116002)(6666004)(6486002)(186003)(83380400001)(2616005)(86362001)(38350700002)(38100700002)(26005)(6506007)(1076003)(5660300002)(41300700001)(8936002)(8676002)(66946007)(66556008)(66476007)(2906002)(4744005)(316002)(478600001)(54906003)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: upfguargHNyC6PH4SaIWPMy6cxzdw0dTxDN/EwOvhBsFFe3ATZlA2AZJK4SZbrjhTSFmbOzNfOLGE74h1oXKWNNvtDVVRkOuSB+iN1QOwqfyOSUc3O9h5CQyxAD7VN3s3b+83UwO4NGrERG+HUR3svNIE+263SVbUVWnO4ktY7D/L3Ivq5iWhiaxCZVDuCpS6tuSR2ovOUGEA+1X8F8m4f+hmhmHqmhtxrMbvLYqsvsQaFraZXbVNzUD2EbV9e0NVL56RwSsYVhb/stzSeMluxeLFNdPyMEV5r55VE5nSTvjdKRayc/EPhORMaYvacEwanmUrsOd5KJX9epQrPeHd3fJcTenUR43CtzNu4lupmJYQzb7lXy9Zf7hxWr2cijPW1nfLVjmsBBPfTMlSyaJa/qTxWGhfDqb/IfQoSxTiUamN/lF5WWmd548UHJBPwMIBwcIIjYGOJjVWj54SyUQitKvZ0YSqlN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P7FbT1LZQ1pQFGj0CmMsVljY7n X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23deccae-04c8-44c0-64fa-08db91917401 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 06:43:30.8734 (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: O9Cb5htWhZdjZgMZhIRTK6eXbhKHAHwgBswI41PPj7oxsSMq8LPmBCsRLx0DUzxQs2WLAtGJbgTx8ViiAE/GSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6834 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Dong Aisheng Change power domain init level to subsys_initcall to ensure it's probed before most devices to avoid unnecessary defer probe. Signed-off-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/genpd/imx/scu-pd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/genpd/imx/scu-pd.c b/drivers/genpd/imx/scu-pd.c index 30da101119eb..0cda0999a1f2 100644 --- a/drivers/genpd/imx/scu-pd.c +++ b/drivers/genpd/imx/scu-pd.c @@ -587,7 +587,12 @@ static struct platform_driver imx_sc_pd_driver = { }, .probe = imx_sc_pd_probe, }; -builtin_platform_driver(imx_sc_pd_driver); + +static int __init imx_sc_pd_driver_init(void) +{ + return platform_driver_register(&imx_sc_pd_driver); +} +subsys_initcall(imx_sc_pd_driver_init); MODULE_AUTHOR("Dong Aisheng "); MODULE_DESCRIPTION("IMX SCU Power Domain driver");