From patchwork Mon Aug 14 10:41:20 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: 13352695 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 58207C41513 for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233875AbjHNKh3 (ORCPT ); Mon, 14 Aug 2023 06:37:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbjHNKg7 (ORCPT ); Mon, 14 Aug 2023 06:36:59 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2068.outbound.protection.outlook.com [40.107.21.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9201FB; Mon, 14 Aug 2023 03:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tm56X62miaigmZXvrm0sJXsQDnAZoFM4een+y62ipNGQal00mi2l/mDGszlhm8alM4Yv/BCQNvApLmw/6116SGP08HwYfZmAFlKhdz8gbuuXPBpQ4AMv5OEWVllmO4mhZkb77ZACqDM7cA4uKzCWuzujb9y3zoYUhBQH/N/pifYifQSR7NMDzdOHTPFThNAjYmLWHSSOxb6oCPL+Ofoj6vrs/Y6wnWxC4P5uAgqJACOminpgt6Nwi8xCzrR5t7bLNn++pXPWIvRXvh7Z/fCXK0MKQZ5T3OTRHd1A9bo+iSNnxJ0dsV+gL2W10ETFhDl+RmClLxsnnk6mTQ/avnho2w== 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=LKnOBYyjixx5/Wrc/kwSJuW4CtSgAIj6KunQRIEMPVikxesNy7N0lREPFLllrTFgnZIlwZ3tyv7hTft2r0FRVLRsAUQwi5Iu+Gwjt2PM3wSIkc/B7EIw4+FD5U2gpwNjFm1FmJXUmU91mNQ7kbPQPfZoSavOyfTl6TDUeXXHagW8ipV+zOoFj8HRFm3/Qav9oZgYqIY79ucs/XxTZfli1DvrslSrJgOAmvKauNZFTUverfxQsf7nUkDvfFE8JEWRLQcrm2sJLtIJnt6GL+XDvBGTVVEhYdfNVAnkcVtyah5ctvkCgyr+BFcfYZ9p1sT0hNWixTW9pS72GP28ut5yOA== 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=kFNQY1mAvy/hYDRZqy3hkW7Tq4+tQS2py1nIUu2YEaqbhtR8mTdK+QDJYmuOplLe/cmtTggVsgllVfuN/tn8hHzSnQToKrENP0JdMxekN03tsfLaVmJLVoHN0GHpuLPcWDlHkX1+0GqhPCXKcTOwSxiGnmpQ06p18t8FQ6e31Z8= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:36:54 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:36:54 +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 V4 1/8] genpd: imx: relocate scu-pd under genpd Date: Mon, 14 Aug 2023 18:41:20 +0800 Message-Id: <20230814104127.1929-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c1a9139-0008-4132-0341-08db9cb26091 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: MH6YVlUEI/jF5egfN4pHQ0MzMq+zM+YFyKDPMTh7WI/rCw1AcdYW1exsfm4cii70GtXW5vj2+H9XoAnyxOw65b9HEz3rCwsBwplVk2MLBfk4cXF61sr55QGkpW+IHQXeBMJQAy2fkq7p5aWu4O8Aa2COuj2mnjcKJpM0cRqoOr9Q5WV3wgsn9WVtZjs2afWXhVMr1fM8iYcKqCReZgHVTAYR93UEwycBsHYyqlTPAucFRNT2g4ieAxIHkOPz90I44SExfelHiSYgBBEJKhxiGTE6svyExgBC0mdtnKjSbkpchrKeAqFshilcjyhwcSsW22KKeviUUuuyAeUOG4szNy40Vq4EtigPJUN+jnLepbXEUnRq49tmwQxu1UJ9N5NLIzaw65bfKYQ2hrn3ertogESxDDRRGaf0iHe2IXT+RFAc+tAAkxLy7UwQ9rmlWuh2fd544h2tGRUaMkEqfqcs3+y0AkEvNpu30v7GyawKWD5pbfrtSiDdT8WAhFxtFdzei2+CjiqRz/wLBJ+TvtS2ZdAeOwzHspjmozT8e68uT1sDCYYnmIqXrw3FxGKEri0vK/X/KtMVuMQcHwkRd1pfm5T3BwjTfyTCeEXKRm+KFKDKAxPSYa7n5Q7gYTpFTXxs 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(66946007)(66556008)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(83380400001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: z8FjTiI1pRzturyS8n0hHPsWMa4+3OFi/1UvPCvFvKdiXS73zdo838ABRNrUKzHHkvZE4SRWlSQVZND+zFK+IoJSUXlJU15Pc2v79AHsc4eoVGYC6cXqbFHSWNQXpxbifJ13/JQMVzxktsXArE4K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1hL3ksKZ8beQBcbEEOEUOKrIqvSrRgWTf2oMGz4m0O4oZejk6azhtNVflOg9DnNrAdUUymadqB7zXpHyKeJS89B+Fz3ihwtoouFvNJ8GK7jT8nsTmgMwtXrk5cqKjbGXpXRHVxaUYXN4iJXJAF7nhjhwnPaFhP8hIyFm6X66n5P5gXbmmu+inWKgS7UtWBgaYXoWfy+8zU3+o+gssRUPRGCPmbnqJ14B7yn0xgj/I9y7qzVj12XqaE47CC7QFnZP54DSU9D9gkKgyhfy6QzHjn+QwK9bjfBIXOdC9iZ2mWHwnFEQi8a8j1/4T3w0f2YsoXAC8eHlnMiNbIpePPra56PM6i3hgmX4ymeLqsySmOa3lX94+R/J9ScPr X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c1a9139-0008-4132-0341-08db9cb26091 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:36:54.3128 (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: yQMEfmQBebw6A6QpYZJ3AVc3YoEl2Xca6ZXEelmTaEM3fw2Fw8lswFey7RTzLS14H7SCAF7n6qvRO7wUpd9oHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 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 Aug 14 10:41:21 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: 13352697 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 41637C001DB for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234044AbjHNKh3 (ORCPT ); Mon, 14 Aug 2023 06:37:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234243AbjHNKhC (ORCPT ); Mon, 14 Aug 2023 06:37:02 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2052.outbound.protection.outlook.com [40.107.21.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB40F10C1; Mon, 14 Aug 2023 03:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aKS1gP68CO5IunWLIUjQsgJdU61zU7NetmuACj+uauyVB+VWOXn5yzOjdHbe0Yl7K0990IR8fXhLWv0Z2v2TkGX72ebgSeG7X5VTId/KgmKe3CRkOx6gdqR9teS8xpmgv2RapCe0suOq481MWB7uJlb98RIObRCN8SITTlcgtEYDIL9tPJSXrS0FZqVX0NvuTN9jL14CzIvUecIREI9TGxPWr+uouwAzaWALTbT2L8qZATeH0CSu9Ea3oq1BpYg8N4JOw2PjEe1u3OeYFyLsCBOEqguVvWiEZ+x+DCF2uiNUkSi7LQ1HiTPhzgvW/mfmo0+H9s8wzj5XamCTYKbfQw== 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=GRgYRb4sluVn7b3FABD7FweaQ8zYLBsWygnveW80yXZd2rnBlRfo/xMAfmMhlfMYwAHCLd9N5n0v0bjBCJbO1nt+dwOU73mUDZaScO706Eh4cPFloKHpjTH8rkybGS0tmTyVAsEfenSmiheREJTgQf0YLThhxbF3SaFDRpjbP11fv2M+dHQtePOPQBayhBRk+gWwO/8ouMSAbp2YZPL/yBYer6mpOnV1wOueJf+cpTcqc8v9SL99dApPrQTXbrR1/Vtje7bNWuEIvWGStRnhXxuo0Uj3P3HTztYKyBvWswACiFWDC72yumgKiGg4ZIhaoPOxIFjdAKTcCKz/t/gJyA== 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=NBpcMq+ipueHqhYMjRGEXTrjjEPQe6iHYCwc5EjdaHoiF05foJbKDNwsqs5jbv+sYT6hpxyLihzb4SILtzSjPnGpVqM8ahojmt7Weqn5pRdFHd0xwjfngX1GkGWlJWIO+Uit57uz9HP2jsiRgQmbfe0dt5rOTnPYbVoEXZdmO2w= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:36:57 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:36:57 +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 V4 2/8] genpd: imx: scu-pd: enlarge PD range Date: Mon, 14 Aug 2023 18:41:21 +0800 Message-Id: <20230814104127.1929-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: 9352c623-c7ce-4a23-582b-08db9cb262a9 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: jK3miuyvva7VcK11OWnfJXcv5DRgDtpk+cNBeYGz7mCfhuUbHCyEC04Jqd5PJf36FcVjD7wVsz2lf+fXPmLqV2eDT3Oovqr9vkNCsy8CAni6kcmMGCOoZfvItOnGJTP9e2nkN8/rxS+7UxlSI1S0SvoRvjyXXFiTuqlq5hotyLuJHepoPzEmdKYc7BxJoUIVOYdKa9yp3ym9F9f/87oqVLAr8rHoZqNWWgmPm3nmTcEiEiHobj1TKxhWIC+/xx7juEJudzXwQo5ZDyN1UDY6FP7N1e8H1dRG+o3EHRnwu0R4gcv8BBcHH3orf8d148adj1bABhtwzkN5ORld2D0hxWYlk15r5OaYgWyR6JXxVQfwH9zDqNTADEu3VwNeayqRWoo9n8WXcHsdW9cTnGcP91rSnf/L51U3XopyJ3bcI4ouSqACL/PmX85fX+FdEb1c4S/k/UkrXbq++sB4cqDJvZkQ/F49BLFgkIhfepYAR0qDsu81a1JyHmCNOy+4Y/rOU+7xw7Gt4ttfUE7IGXL6j7g73Qfn+u0L3M6wfWpDkxDX5yQcM5MMd9A5lGNPE+elPX2quXiYzR/ey7///B+HIXwiZw+jnQerQWh1HBcTpf5coCFW9UxXu9HuZHnzgmFive6MzdDMtETfdawLfliAuQ== 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(66946007)(66556008)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(83380400001)(2906002)(147533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yEtb/qv8HBMVqaEgFl/LODhwSEWM81aFPUEQqWxcqh2KohOiZPc98qoZ1fZI2Ttz30hzsAgoPnYrRpAR00hc1f6fRRcoj/HRoXDhoQZLKejmDJE6ec1XN8ztg21p/3EAdj1FMt9OVQNAnAQVCS8Y9KCKy1odcHAn/mkE3Pww+J2rWG6PJvm3hD0M5v+l4jSk5CjQUMcIl526zslSdm6f8W1YfkvlYLcaVYFDtU+UJHar5WpaKrr9ciN0tva6ZOMSphi7ZtDzqc/TFuYySAwtu7+B8Yb9o90U9j0nya5rdoas007JF/sv2Y6ov9Ipy94Aj2t49sCW5CkFaPME3B5iIZnvt2jD3fyQTWLxRnb3YpDruX3Aq6iqyGyschixSEkCTt2QfSbdufiPmnAmP3yUVZvCHLzQGRZS7Tn2Gwy0pzDEUUe8uZrh+d2vX/zwrrw3SnLwUqTDhCxlk+RgtTGc4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Uh8ftSMoDdKbczXMT48wYOuPt8Fw/gOrQ/Am5/BcdY7qTogFFKoXuPSK8 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9352c623-c7ce-4a23-582b-08db9cb262a9 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:36:57.8226 (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: kiQLVI8B+6A5OeVTDmL885bQKi3fg6UyHaOKr6XPgBcDrfiunW6NhhXPzXPv/3AukQF+hJQIP8L5FCY89ECzPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 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 Aug 14 10:41:22 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: 13352698 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 67461C04E69 for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233543AbjHNKha (ORCPT ); Mon, 14 Aug 2023 06:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234467AbjHNKhF (ORCPT ); Mon, 14 Aug 2023 06:37:05 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2045.outbound.protection.outlook.com [40.107.21.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3168510D; Mon, 14 Aug 2023 03:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cdKCUE3fQHlrLMdqOByIwfaVpMXCLgNSJ3lt9IDregwkPnPz7RRDdIA1kmBA/4j+GdhSSVkHBo3gRxGao049eKQcDN/ih/zIXkVrM5pBNjcscBVUbc2jp/HRF3U5vgcmeNf86WKvWFkxFB7OtmHsPuGGWB55cqDYsCcb0M9NkiG31HikfVx9ZanlZU/8s9aZzdha+mKrlhH/rS4vjZtMXDyH+4lLqP2c+kt+JH54IY05wQSU4mx3Pns5JrGu3+6vdvQzayCaHkkYFA/SbTUrxTSNN6bcmfoGPLVGHryMu31XZSYFmEA2oT/Gc8/JYr8i+c/ZtyB8innMx9RPhendWg== 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=DtW6xWrOh01WJ1RrqlCUZLl9bIfqM41WhHFYcVJh8mWOyuMgKVP+cMxyCYW8lK7Dgwsp2BcqoEEztqmbtuHrAC5K2AUmVjOYJVE9C3rSKwc8wzmMHzt9vmEkJ2lnaHdKFG3xENjiNly5LTBq9ssId33RHGwblxSGoeWxMXIBDh6fD/TvkWgHr4fLa2wJJRaZBjKwG0pSAseuceTGpMa2Feq0gP2KS4UVCzi3OwlmGkIvQW0C/cyZ/MYVKwrEZbLLQmskUdhMJX5nlVWEZu7QyYcB2wbe0zc7PUYTDjnCl4BMT4VLROpQeZGY1nxFBoQX73WQKEe9lsb8J2cSQ9lw2g== 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=RIPuPkEEVaG3ND7wp6RReZ6nPeU2a3Noz7fwpaMu3S+7cmdpnGGknLqHkUY5wZ7XItGThnPDnt+2T6tVhr8gFtWkIOc+VIoN6LXTjH+new+DG0WsIQ4WkC1nXPijnoS5QJF+SH6bv3qChKoPb9pnOAN0i6jJ+TWAki3alBqlQX8= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:37:01 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:37:01 +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 V4 3/8] genpd: imx: scu-pd: add more PDs Date: Mon, 14 Aug 2023 18:41:22 +0800 Message-Id: <20230814104127.1929-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: 1d407db5-7603-44de-151d-08db9cb264a5 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: p2198oHr/mX1YJHM8B7BAjlK9inu2zZ91VDgnDnnOiRhgVGVQ2XJtvHBVzB8AtFwlWOH8j95dxAGoFkjJHUP/+0LzGlYYHfkDv+ZlQ8Ufmt4HkazoFzR0KGA1TxLY9W4lbqiFoQiF4FSobVtFeMGabZiVinw3aI6XZ1NqFTclaSIlW96sYUCO6Hv6vKLZhvHKMEZkz+7M0oKBrznoqK5js8xIcv0o3akyAjiR46KBCBcoyUVd9UEShWxB7TxCMcQuFNs2xmY9mYrnkymbHERRrSSHVBqtrzHkMqI+nv1q9gFt9Yc/PmB/qjlyEaQZd0xMHJs7kpbkGT6INeslo080bBwELtAeudgi5FNHeTMqOpEhBuV2gmkVlcYlF3KNuln1LplPn4IcDYxHYUNJYKpvPut4ojKfY2adA1y8Rp6fFJbb0zg/x6QLNNpM5s94IVwynJrI+oPS2ew+/ZyZ5ZY9vAJ7P0JKXcStroZduFFKp6QJUqJ5Cow1lq+i3OISaOcPw0/ZpP8WZxOPB3bAqzBcwLRw5HExZbXkUCusz/6TV7scPLe/NrCV1eimgQ//zyzGiS7cFZ3QGy3Im980qJx3m3w6QuLCTgFt5siEcM4HzODaCDvnJ3CI20oKge0dq6B 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(66946007)(66556008)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(83380400001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ikpnc7oBe7XiR81v0/d1uoqnk8BTD7oUScWOvm0HY4qLV3bj4DB+1RejwybmLXSA/n1EK9sWrAsd2EW0/cV55S7Un5PEIijGy+htfrRxf2BaR+84BbJ3d5ugfm4nFRwf0kccN8R7NmSFB9oE74E5p5vJUQE24qpE8ncljgK3ZPutXtESq2jUG8txmziHN0/Fr1HsW7dyr6esQ/6+pouY0ryJr1G29Vlt7JCJC+JBtjjG6KtZHXDzSmdfZfeFNN7SFlDWctkUOwWnomJJareNMd8+JWdombWpZxv8MU9K3yE7h2siyuGY3WuVEEUr1dxQMEVxgtOUpre9W0vWE/SgpRgBSN4xfokvl/+TJrdUcMZ+Ls40zFimZ2RlR77F7xMpWrhisL/912zz4ggyU+IHf9/7/L5YrWYfiTxgIUsd6Aq4Cu2oc4kOF0eP7UL7XZV4APi83YQ+apQfMPuZlGoQkdcIMMntjN2GfDnw9nqiSYB83dP7c1tz+vWWWGzkY8RoP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/1sEBt53Hi2 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d407db5-7603-44de-151d-08db9cb264a5 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:37:01.1698 (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: jWbIZMzUa4lyLnNeATP+jHUSkUPC8OJJnG3sZ/28jutoMx73Wnx3rp4PUmTkedAEdMnYfSiEUSsq4bzCJuEGMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 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 Aug 14 10:41:23 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: 13352696 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 7607DC04FE0 for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234105AbjHNKha (ORCPT ); Mon, 14 Aug 2023 06:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234654AbjHNKhI (ORCPT ); Mon, 14 Aug 2023 06:37:08 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060.outbound.protection.outlook.com [40.107.21.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C39010C8; Mon, 14 Aug 2023 03:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fVJmKz0joIpuIR8/QYrHPZtxQW9gKmAkfthdybgUe3wYPBCASFLZGU50u21taS+Fd1tYZ6Y+bVMsQE6pMxi+ainM0/y+WbzRNGiG7RXNyneRnH0MAEIA7/lgyzh4KgVcSPrC2IdpGr4U/vXFMcqjcxXgA/BtVeZ/zOf9v9Dh1mmll223M4LQ5Rsv0sm2s84gCjfbsxBj4Ua68omukDCZzDqNnE71Z3wd4Wv8mvhHE6OS+aJ7NjM2k+VvbVTq92uIzd10uyUSlSNxIhUnQyZIm8MEKA+msz6qc8wbrYWCDkD+ATMp3FBeGiWubRZWGkBqQc3vIqrg+2CVHnUhdc4kqA== 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=JwRU22VMNvJrYHg4B5UUZdcLWjHx5mVs2a1aJWCugrY=; b=TgUBCIsE2PK7xY9x6DF1HV5fPj6x9kLddMeTpyfS3V7IIW5jcNnr17QpkX8VRlaIqpT7ZkxIKU9GQP+nXKHpqqpgJu42UbkLkWOg6IZ8zlRZnqwUOHE0u772XZUMf0gKo0ut4IycrCvwqTiuX/e2dSnLy/qk1KlJjWrdTSn6yz/dxKecb/vtnpKv12XR8hOZMMrfWq/q3Qz6PBBW0UjsKmH06VzYgTyHxbE/vIWVSGNe5X7/9ArhKVMiKZxFfMbtFCBPYABBX2hOYQbU+J+nuMOefaHquArORjMKYbooLXZ+7NLEYv9/xiGXjn7l/OEQX9FJrjig5iXAHpGG/+nb4w== 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=JwRU22VMNvJrYHg4B5UUZdcLWjHx5mVs2a1aJWCugrY=; b=e7L2XUPvfugCTkmlEhnXCzs0DSZI1FY9ZlUDX1xS/lX+fKEaJRWUHvJ2/3IPM5nYgHSbuOgfgq7AbOrmL/+6iB2jnS/krTthDhR78FooJdva8HmnoE4ge+DY/MwJSWjNbf2d0VUuzGCxaaoQzvcj6LJpZixOsc67eyEFU4UMCBY= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:37:04 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:37:04 +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 V4 4/8] genpd: imx: scu-pd: do not power off console if no_console_suspend Date: Mon, 14 Aug 2023 18:41:23 +0800 Message-Id: <20230814104127.1929-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b93d775-c4d8-4309-1f9a-08db9cb266af 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: pcmGNMWqpYOfpHcbE4EHr/cqaqRdF6U4DH+q0bC65jnfzDYv7ql7yBLzIHXigWK6oJ0dEzHhVGgphbua4V4+ZAfgze+1LbDVGXXjIwN8/wx99cyBwjIKQ1wByTnU0RK9KOZprMOq5gMR0brBseW7zXqPvsIbZ/j51ucZbegVyFPyuru61vL3FABBjQ/OLG59scAbY03z13ET/+JBlrdsi7Lf/tJwGjpNBBeEMS75MdolaKQFejmbeBmQ4H1hvEtIhFISvF2taMvfOcttjw3AdG4CUKLSewammmSBzvI2OPAZwhxvwZiIKJslZi0dFLQGRN+qaNO/sOqtiZgfwAUCa76nld6oD1EebWzPv7Pc9vLoe6srT+3PYBoHK/9ws7VARfh/uBosJoiXRcqUUPMCyHaSvQmN4Tq8y4F4CJlzDSQA3ZILWvgh22ZLyJZuqeKLHo/S2nF3pw8YrkRqtTWkhOxQHlJTWZkc1I6eAK5JfMWZzz5qqttYqF0Vb1x8DVJsPw0o4EMepA+FQBA0RTacikXE7Lps+ozlr1yJ9o/6UtG1Z0tVqsvhCpkGgu54NfXajaYIeP091vu+7q16T1/EACMR4uRvq3HH9uqwqau5Nz1uCBeFsyWXOKFe0ZhVety+ 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(66946007)(66556008)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(83380400001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fe1FIIkOU2hphHBVTZdMv6uN8PDP1YXMRIFN9jgIbCMWLtD34r3da1U9Avac7pMxnveV44YRr+4T4YAyM4/q0RS3bUZTpzEGEA1DLR2fFDe9qQICu+JJG0BAjEon8lZIoY0FzfFnVW6qVHJXDXPP09W1fUPaXfT3cw6T/dskF6xJwkYce6rUz1d/OiISOnf6VqZKkgiKb+9n3HxW+YM+A2SyDzLbfH66gC35hHPVM+e7rlH9WSqhMyKcr6fWJek1vXnqCP3SnlwOzBor6uaC/KEsJG+T0+FRAFJ2DTrkSu2d71blt+oe/W/ilX/HQfKg6d2VuFP4zc8jGMwijjXkua8iwCAWrY3PrI0nJ5CTwqdJSP/hV2FBMuJ9HS2BP97UXLirX4PTBWcE2qZTUIrGJ8TcIFCSwg/15zS6StyesqEpa45ef/gUzCL9kqJ0+bxmZXh1Z1uXX6ddWC3D5FhTF65a5guOWJ+PgjCr/vVc+SWCNoFIPAseQPm3Bw/6UkKIBubAHMPmdbYM3S9B1AGae7gLciR/aQgFU8LoMkLWxO8hBNz9a+74tRtNxZDN/JoK4+gYkmNmHSZATlaN+lR77YNJK5aD9PVjT/9kx5UdUVARVoig3esGiJ6XYtg67glGKjlrOqYSaveQEcu1aSEERdjpBjq4WK9vcAZy3jm9hwxpqAeYggdwEJDzwG99bolPdpPmkmElWHmWygG4VgfuAYTFFqba1H5qt0Rh0mvvcf6ubqwEt38hD2myM+tPplVf82ZggIhN9IrKhCM/QR//GqkM3JHRrZz1xMKJA1tIvcw2lfwEydXTKoD51d1SZ8EhiXR7WulNdydOw0FZM8hkH2n0qoCxbPWle6tn57of7kphUCJQ4z8jfn3V3aE/3HMbAjVx5netdOyVkH3oe5YSaYc2Z5Lyh5cbklxPhtAz0J40jrTAiySIflej+s7mxXroC3hIIZDZoBcl3/zfveBRLFzmFFdgSYfo+w7RmE2ZObHSn/gz+yuTj+PbuxIwRtWFXBsDFUgBE3T48DXaWRfWExpTDm7D7ObzonFD1/YppoSmq0tcJJgiY/9SpwL9HCS4Gx8m4TcFjI64bz3E+Hxjj9RKeX2aMOgPprGuZ4JQK8cqOCM6QT8d/Msv6GS0wrlLmhZ/rsFw+f8GrfyY2hw5DFClQzLy0rxAKixhqtH+f6StTSMPojysgg25fHWATvCei8qS0TGlCyjA++n9i7DklG0VQL8ADHGkscScmE0dPnSwi8hm3fLSwo9WfR9ChzkMTN2LIG48c7vz1tbDpnawFkRJtATPz6xXQaVI0oCnz51W98XhHEtjH/LPCvngnkR0N3U78Awd/0g9C56v8J8XPAN2uNyMq/RMAoVT6qgTev6UZ/J1Vrooh7zE9EfflAdftYMzUJSoWxKuR8UxzA7WwgQ3YyYWFM449IIKuTlLq22GbhFIYXf3FvVGdZm2GehttL/dgwZ6BtEMjRVg/IWuDbxHhp9Fs0ZMesfF/jZ5ntmh8vu0XPfcI1wxY7sadFO0vn5XotPXygxEq3lNwyZnQefwOb8Vp3M8uxqhb7G6uhxYRkT1lLd69VHR21MbjJry X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b93d775-c4d8-4309-1f9a-08db9cb266af X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:37:04.7319 (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: fwIult9NoIKJalTvdRSPNEmbqVcCAkaPhcHNgLwDpHpqni2FfyBhHgC+a1WpMS21QqOGkhnantUiQX5+CCV+pQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Do not power off console if no_console_suspend, this will leave the serial device's corresponding PM domain on during system suspend, which is useful for debug system 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 Aug 14 10:41:24 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: 13352699 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 940D0C04FDF for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234122AbjHNKhb (ORCPT ); Mon, 14 Aug 2023 06:37:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234712AbjHNKhM (ORCPT ); Mon, 14 Aug 2023 06:37:12 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2072.outbound.protection.outlook.com [40.107.21.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8DB012D; Mon, 14 Aug 2023 03:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uok+Wr196tBvo+cgyly5jjwxuA1ZOVsltyTgpzfejNL6WP+p5ydVBOsVy5nxQiIZQes5JppdtUks53xFbcHrcyMdd8PCFqv1xkn+v2kQlJYHPLWEOPTzgFDWNlJF2FPnrscB52vIYTAaSK4JspuvFtA3AAGE2nj85j2X3mbl/fZ30cKcsOZQAzVgL+YyOXzk8Oan4uoc9ptwh6r28mZni7PbxxrZD3JFDGcRfQQV6c/CNn4ivaSxEWhYXSteMzkmBWI8JjVXzV/xwvvcVEkEo4Zu7Y+DCD/lx8QXXIbrFBrpRKjsVidX+KBGylUlhRl3A65JVhc7T/gjRfL/OeDISA== 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=RydN9DHxJAfRiLPrbzI9/kFy+Rb7jLxwO5MktCSXDJNFnJ/qZzlnIh8EfvkrzuKU0aFjZgYKJd5bX656xZDRVG0KEqaSlRtJ7LdeTDf18mcNjWWxONH2Eby7k79MdH11aczGkIKxK6J+gPCJlpLElJ+ntdxUBqj/22/SW/O4ye5og2TDKqvB9XG/4Gju8WI22OwM52+vNyTwaDlVr/p8DyqJDiPCKGHXVKgStyGZ6LBuFQVdFet/KoJIgH5VlPYrCp0U3BETNHEZNofXzxgkxzqc0zkpFx9QggHrBPFvOV9jlX6e/wMJ0Yxc4zI0JaNWBDP/tGz7iSpKMZEs2VRpzg== 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=ZvwjZmgvmxUtDHoqK8IfD7WV4JaT6YTnkusdejOqSJVaZ5rcdIAkLrHZKeATXeKdtT3Bq5mLgXdU5CE3VE6HYB+tuyyManPfIS6tkkgFJ641HJkg2/vCJOaSYgQG4yhQHeTHdjGsLfefBMkOcVK2ky+Np7PRQvhHIdqJb4MdQgQ= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:37:08 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:37:08 +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 V4 5/8] genpd: imx: scu-pd: Suppress bind attrs Date: Mon, 14 Aug 2023 18:41:24 +0800 Message-Id: <20230814104127.1929-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: cec30aa3-ba4f-4717-1531-08db9cb268c5 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: iKyGAR2mY51PYFLY+Io/MySSkSYkz6P2rRt0QovEP2ijYi4oYUPgxmoukakEwTZR3ZaaZ1rg6Bcd1GA2Bcgc2xq6IfbeEH5lfySETE/VnZeSlU+qRBYUjpYCZN4vQWyAkqJcEzsPDiEy2Xaw6hv0SLs2NkFH/EXeOLXFlpWhlkGba5amNT1eNRZeYuZo0iqjxUpRx+gBfRHe2OZWfViVWJN48ogA9vRY8yT3WJw6vYb2N0/5LiCXCYC+rvVTLeG5RydzjdReNg7eS0wsFSk+u63TfnBdhd9dej+sGpAtImtJKAL6NKp5laDaUC4jAGhT2aQhuP0fddJpLQXP84boKOWEaCKR9kly+9W0UvkW3iNy86gtihT6x37RV7iterdJFRo59i+z05MumeQJfC2NrzA8j+bTuUTJJ8A38KXrK7IWCWk7ebm3+/tyue9NLRZ45iyawJP2L4UOknE2BAy9smEFHK9l5cZCCd1fPIfwW5s87BX7NUkNT14L1kesQcAJsVxIGIKQKRIQlSzuJFipMUUggp4R0QUKdQNLPuE7dIlqyCBGrfbvgpZyB3ttaH4F0QljQClxswwcN2EFJJuaufaOe4+INF1yABpdd/UOXO3kXI5xfcB90qakgE3+iqaK 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(4744005)(66946007)(66556008)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eh4UHQM4gK0qOhptoQu0Z9YCnoL0C/jnURKK5RDR7ZB0Y7WMIRLV7fJy3nmUHbHinzTw9FNibgthvrS6H2JcDt5v7IfA5Yqn2wr9Pi6Nvk6zeTREAa3PB4F+pyplwCYaGvgRACSXyaLmrLo/fSFi5NqADC8zb7YTr6TJRAqqt7qa8+8N92pi4Fpe99pL37ee2Qi7W9Z4qsLO5psrPvg7A41pPQT3EkjMFBxwlGQnBvPXZZcai//eRXieKWbHDil/GZ2O2iwGh7aYXkxlpWAwt0qdMD2v8rsbjZNsGqAyVuIRtRQRsL9ParMHRBXgdyZmrOYiLZES3TXGfQXL3zsrCoXrsEZi4jDhbVejCXQZvUCnwNfKewH7HYtgMJ0RohGFEkLNY/TjPR6PD5TthFMvhuZMhLbsZYvpkACDNbVOa9DlDy+nsqoUuWMH2COtFwuc0Og/H/F017nE34Ub3oYAINZ0o4p5veErnE3PPA9Womgh0qao7Nlo63Yl1DlH/8gw1qBxGLtIDsBZjkQpAnSl/GGKALTDJA6Nyce5EvaX7SGvk1azFzBFh2ibBw2K38oZt9G3Ixtyo0nJuINmo/VgOu461cJMG2pbLj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X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:37:08.1977 (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: RQ4yCzlKrXFkTr+uyv4wr2t+CkSbreK3Y2wvgdEHAmGRjcHFX6DJbHY9ZAgXfomBQjWSCHGCt5AFpbvFSHfCAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 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 Aug 14 10:41:25 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: 13352700 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 B1501C04FE1 for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234164AbjHNKhc (ORCPT ); Mon, 14 Aug 2023 06:37:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234820AbjHNKhP (ORCPT ); Mon, 14 Aug 2023 06:37:15 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2086.outbound.protection.outlook.com [40.107.21.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A69DA10C; Mon, 14 Aug 2023 03:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W/9F9nioAX+QQojKjta5xqrBlF3Ue5QofH9eBzq0RmbDccPwl7k3FgoJDw/TrW7uP2N7qUgZGQFhP6bEB7cRFIMXy38JOpGofyx641LagaDLXQzRgUbhbCzyiQNNkLyzbTKsazMZxpLc3ocVEfyThwF1pvqnawSgrN0nLAlLVX466oZK/y+sSiqD+rg7s7xbwUEHv+YNyW/HR2ytto0w/Y5/1BcT+Wxn7DWvsOFi+GCwRZW4bHwOwb8KH9BMeJg4XjCEQkPCC0HEhtAJTFfhyW2RKmXmxyAIQ9ey8TIqHI9utT6K8+d72en7Awm0DgurQSfktAzKroI9TybiH+Bxow== 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=H/ZaroiXYhQzhCoCkqWt3OngRJY1DjO+TifDVVt16UnAJrp+HRPveJjiYoU/5/2aEaMddM2Z0tb6jDWYY5tDJTaslCVNRkYEQDyFIlZEHbvUxp1GJT+twOiOBWiUBzO653bAPMKpzdKozVRzthvOOXY/J4vnCzct+SizeSwPyKyKtPzaJJ20lxUmstoV1i4B5ymlOKI3lDRZXP6SNsHmG+LzjqSeSb8YPLH753Ai+d2pvviYw4FOBjRN/OO8xLboho4gO7h0uhe5N/BKeXf8fweHCtwiZpATFz6Al+vAkeOfity2D7BcY2xq1Ha9xY0FfSYZ591fxwWV0A7ivZxN9A== 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=liHdnMqhYxT62th/47qrZE+0v661GrK23la9eXjrtJ0q5lr4yGhRbJ1khfqB1Xx+ThUMnwujI/7j4yRH28broNyh15M5sBvTUvWLI0cPKuUZyocXzFrb2itHOc7doIOutkirw052TYr4vZCeLpn8AcTxgG09DVvuZ18frzlr5LE= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:37:11 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:37:11 +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 V4 6/8] genpd: imx: scu-pd: initialize is_off according to HW state Date: Mon, 14 Aug 2023 18:41:25 +0800 Message-Id: <20230814104127.1929-7-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: 42a9d89e-8994-4d6b-e449-08db9cb26ad3 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: 1tNID4DbVpEchxwjB4dxGSNKOQfw7064mcWL0wFQx+OCoUeTpAKFyAoB1A62fdpLkN3yzXhWxaHsHyW1iDD1W5TaLX6Yawvch9yYlb9nsmirFnl4SWRc39Fjb9x5UZsNyp6YXKrffx+xvaVWcV5p5c5ywAa9bz+wT2KoOqMLsUqtsUkTEfUGozSDEIyhZDkQG7bM96evZKXSic2Y/ZA/qOy+22kDPDQAoPyKo7JvNpl77WX1OGxaRe+CqF0z9XDJrCe1fze/pMFvDbPeHyU8ceeX4O+kUsF28yxe1BHj9WjSzvPfn/kTya0lVy10ehbKzX0vNhs5LcDWgqjtnRnie+nDmVgmgyYWKRLe2UeeUVLle7+1Gp21vsWckdx1F2TZWPh0tbQFco8oBfV5NT/nZkN/sJN2YpcuhUXSf1UAyqokbx8ldCgXQ7s91ftM0zkeXeShmCFwVQXvo/iJN6QRdAfgnh4CGFtU8vLrQMkOmxBYiFKqRR0oMFC+Z/KRlm357NTggJye9ycyL4GBAp4nQUqiWbC15KDTzme55s/zQ7FT+lx2xpVJwLpN65C1qB5mCyfvLQrfa0sbuEoAkzDwpQYs2jxOFJo7ORva8DBBR6bzWPSWmW1GLwKQhxOfKMxR 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(66946007)(66556008)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(83380400001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PgD0BYp1cDLiMF7Gdcgw/qaG8QdzZW4rlHV/3pwyg+SHw9CpwZl3U0M8HF093NAv7l680cXO7JCYx6DTFPDlvrAyWuX9TWKptOLTJdloMogz/Vd9rADgF/eR23mXkc3FVAD0oR+XhzZ8dZzph2moRNY9ZcLaDtCEz8+Wi83aW/q8IO6WRU4r8hgChYKQFwPr3JxyRve1tldlTDdShN87ybWLbk8XOpwkVIe9jYj69ZXlN5dg4CtmMMGM7wW8+TpC6sALt1AmpvF2fYRRceaaATUov2bY02D5VsivypW0QcpJ4QH2zXiVovdwJ8F9f0Qsg2JdhAJRY4PAtL7CbPEO/cJzwe5E5LZg5BEPVWnsOQuLjxpbecTiJqjvKXKTHXKN4Nrjfw9+S0bxQnwqJYWbX80C1RF6urngxZBqhardgp2Twr3yBxQL5aGP0GemzB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+TXq6K6XD8yNYocpVsYrbXsJnK5VrGC9cYTWeN/OJxUOqXInbmK7/q34u X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42a9d89e-8994-4d6b-e449-08db9cb26ad3 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:37:11.5288 (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: mrlqhbcNeUVk6ao5oNxxxBjt6ZFoDDfe5Ys5hHJWXD1WxdU6EkZW4yuHYB5AmsYaC8PzEPCaEQD6fJp3eB6/Hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 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 Aug 14 10:41:26 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: 13352701 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 BFF5CC0729B for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234217AbjHNKhe (ORCPT ); Mon, 14 Aug 2023 06:37:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234921AbjHNKhS (ORCPT ); Mon, 14 Aug 2023 06:37:18 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2065.outbound.protection.outlook.com [40.107.21.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BEB510F; Mon, 14 Aug 2023 03:37:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fOI062OrkbK4gP4hav6CgFAie1HNj4jOZ6WFT4PEqOYHF3wA5KlZ1/TGxLNkjxUqyojw2ZwDtRkYaxTmyFFWZOOcv/ejqD/zlAn7TAKUaozm0SXvYY8URnn5eRvlmRMlnuKtpEXZ5WcYpcfZxym6vlg1VSePvEEbxVKMEOE/kak641KT7GIT4nJVv9VC2S27p0OL8BdrkL3NcBFFmKg38P4vbvm0W5Ct7Rm6NVCUJcqEQI3oBUUxagS/0cYreyGQKsCX9diG609iR7MNXBXh2hF7ZzD3EapeE0ubD42MCggUBKfJWevW0EmjJaNsE6z6cZntr7cAr47lFVoZ2lLyKQ== 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=HPfZ2CuRWnJEJ4G3o/YV4yNcwzePY5JF2dWUdpKCp0f8Q/8ZaXPxIPm/+w1qTxr76EKWJfolrJOmjYSBRZcmmw2mHoaduHXkXuFlbmbKT45+1nRG5UA/dMjyrbM2Hf98TMoa3AJ++DqVeHZmI0eQ6hZZswSWsh37m3f/HbabS131q7pa5hIth5X5QOqYK2aFlRFNGtzI1Le5ikC4OSZLzaVfDN2wRT/RC4xwYDwGX98K3+ZMIDqq8nlC8/BQA6O+mW+bGLClAnLvNYeHv1OuV1Cz3ekqskzv6Pvp11gxOUTd2X50bhQUpqz/DiGCLp9F33coT1HOpbq+kt+eHxyfSw== 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=SbjOrr2yhabk5xCMA2cNqVd+EjJlMpvaTggDGM7tRlSUBgyEEQ9nIgJ4qnwS1BHAnxnONBnBLuOfomD010+G1qYSrCNi+9LxSpN9mMz0BxlntnH8jw/A1kJf8OSakFu8Bi4MveW93qm6zayBrzFkSakK5R8oI7Qcp8JA4l78sGE= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:37:15 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:37:14 +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 V4 7/8] genpd: imx: scu-pd: add multi states support Date: Mon, 14 Aug 2023 18:41:26 +0800 Message-Id: <20230814104127.1929-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: 00f6d7d0-b45c-43b9-65ad-08db9cb26cd4 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: itTx81Fu9muAEzoC0x3T9krMJehDavYLSs2oaCDewnmJFBnL225kMTAsjKbdIyGmbO4Cmb4ElwkYdqIEaFnDNCCOGAOe97/8bOW3zU1G984cpNRJJZPtkNX1nlt0L53aqOF8c+1HPGkfZaEf/4R99sv4ziOU1aj3c82jwdKuGemu3HuPIyBiBEAoMuBf1gim75Eu/EtnzrBPPxU1XTyFvQDQQJZOxfa2Zkup1GLHmdCu9BD3SayEvvGLi9XdBR9S3igqVr49VXBJxR6K6FgbN4Gi1RYlDPVRgGxg76KaOEfs0KEmqI9JmYBObX5GLitr2NBTCtHmBmbGmxhZIOBS7dNSKjhGuS90khezqEpIedyvOxAwkns/IgOayv46TqoI+xFNg7smozZbnFszwkFx4JAXQoZLYAE1OPpVnkrw/r/W0m3sMyObaXrg+XsR43/U7I9G44f4m9pf3lKf4Lyxo1s85TqsYCj+pL4KtuD3Mjkn9z926ajBwi9TnthnhJyxHkyImLzLLoOU9yBY3pUnepDJYt1b6sS2+szkiw1uBHcoBM5f6AtGLdwzaT7IBu8X3qQbxrajdJ/D8q+KlC1dsq+NnGUOFbWFrzIx8S0CO/R41bhw7V88OAJy8qYoEPWi 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(66946007)(66556008)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(83380400001)(2906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Gt1k4gK3f9w41gT4dyvdOnHn6ATCX3XfZRs/UXHdRAXg/xJ0LmAd72L5ExbHHZGof/DrC8hHf310YzuO9R2snFufsSerO4uHP5EsKTx/Jn22MehtNcM//msyWZfWvW+6/baRM8kuehpLz08VHVzcwbqbKdtEd/oKDU9q+Kn8wwfTs29D5e5Dlz12wsKxnYL1QiMMzftlyBgL+66wLytS87mbMDr9jgmQFlaKn7971tcaqArcsZJE31Sjpiwt8/ubvgzxmf7J5tM2aytIKNAZl39dLV/foQi715ORtnSsmAuuo2QOAHnVvr+q8HnDPrqEQINqvKZTuWhQ2SreL2SHiLUEsg6vP7RXQUr1/eMnU71yVCqcPePJ+EjsmRAF9UdH6nhSMqbEK3WgUIubZpvQn+28OzWFSrsIs+6xPvT+o0WFOdZvopokeNjAa0bzJbGv8m0ZspN4BrKvoB1GwGi5xdorvDk713h1Zgc+YvazPJtZwnHhopzp0BoWm3zNSQlgFrI1O8LcRHVlACLTjEYfXgqHzcMPs0nwh0R0PwyaXuKxlDsilyaw27xN7x2Kxpiqik5FEVwilIgeUhYzr8vygRxgSN312yt/A5TpF X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00f6d7d0-b45c-43b9-65ad-08db9cb26cd4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:37:14.8722 (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: 1hwYOa/B4Ev8raqPCMwnipfJs5Q6VpqN7HGR+fl22jg7hAQjAqgMISuI/sVhtuizubwkGnLbX/M3+krjzrfNHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 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 Aug 14 10:41:27 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: 13352702 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 CEC11C05052 for ; Mon, 14 Aug 2023 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234267AbjHNKhe (ORCPT ); Mon, 14 Aug 2023 06:37:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234944AbjHNKhW (ORCPT ); Mon, 14 Aug 2023 06:37:22 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2082.outbound.protection.outlook.com [40.107.21.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3927FFB; Mon, 14 Aug 2023 03:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=afd9/GcM9zeuJezVqdkDL7Kp7KcXljSKjZ2SzQcrPDKXOFex59biG9+kVDkydu9WuO/jMLORxkbSTNDLAdvPE7pFi8NOTDjKFuY4+0jn2D4rJ3TqG04vWYBrQdDiBN5JtkFh/2jJMRdgqiMWr5/0r6ldHB6yOQ7id4HQYbgT8PUxsRMXOaJQ/81SkTsysUj8NxXbkbjvgi0bO9QraGo5++HJHzOJuCk6h3mHVFgH1030hVOUDi/HQU15JPOMWuZNQCq6XcR2eWigeJutDygIaI+7TelslhuiOA66QO3CAhwAaNdSTVnUp7Ujz9AqMThbjaYV01Th4uIaU4aK+aE6/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=z6eZg2SXpnwBey6uGP5mOAlS2QAU13HzikrGZ4cybSU=; b=mG/R+dFvUjYklPeqMGohwuj24Z+9hLua1r7I3T1D7eFXbIQXKXEW+RFu6rpuOMCfB+QHZAOdAqV0VnxgqSt2eS9BOJPvTmNDe3jz6lay3rlOhzwx5FnYeBixVrWBV/gQCdlRw4excmDv/Xg+aUmhn2WeCCLAg5L6rpe9yJmu2XUiWvp4wHE4a/1CjuXW/cJ1N67ylEAhlyzFlAReMb9rDQMcvwE9FO47NJpyvI0WtR7o0Hv8bCJEgWA3XePXIQxlWpTBu1zHXMJ7raxbNlzp2IT/rI0GT2FZoyg+HDFjwnwUMs3xbQGlm1sW2Bk8aRj0G5nPnjea9wRwTdb86iucAQ== 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=chpBoZ7c0SX0mXqorfoXl3rOw8ARC9tQyRTKST7khB//BJMTJJdKVH6aY2aqauQaM/Flwpyqv4ovAjvzYirM52GDULb5ZhEjN3rSi/CKo3SB+VdnWvbYV4amDxcRwMIAvgQ/v0AszKWVOVLn8traLFs/+GhMAtfgUL3KIpPLOmQ= 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 VE1PR04MB7216.eurprd04.prod.outlook.com (2603:10a6:800:1b0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 10:37:18 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::2b3:d8de:95c8:b28b%3]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 10:37:18 +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 V4 8/8] genpd: imx: scu-pd: change init level to subsys_initcall Date: Mon, 14 Aug 2023 18:41:27 +0800 Message-Id: <20230814104127.1929-9-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230814104127.1929-1-peng.fan@oss.nxp.com> References: <20230814104127.1929-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0011.apcprd02.prod.outlook.com (2603:1096:3:17::23) 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_|VE1PR04MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: cf200120-b06e-430a-83c5-08db9cb26ef1 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: DvSVuvishrQOEYV5bK58SHTBstcg/ELd+j+UgpNfT5H1+FCfhFdtFJCZo8+aXBC2MrEgMC78ERWT9biZSvApmZjjOy+8N7EjlHPxcnNKtYQoS1f3CuT1Y5S+7WgoV/sMWOT2Go/AG82BXCoQ9cnBjTTRiM8zX/mk5N9JCFzApbO/1pUc9yB4oZgC5VUbZHdDiCT/sUT5GF3QFDhJ7ke4hr0cTiP0LAbTPfedWpggJoKe7c50jQP2+CWmvayM7bjVbj2H1LVG7sa2HgHy8XWAsvuS07mEw3PWDeNOrQGrVghFwdarJ7uCwssfPLkw5f3dYmXIVnUMqsMx7fy3jl2QRPFKKCZ4dPnQE8CU98swcmut+4Y3AfpQ24Kc9e7QDldQU9BxHYM1+Ff54Eb6C2006zVPc8O77XAzaKGTV+fBBNsAggHAyoM/+aeGB4hDI0hZfShbth606BFMtAk8y8rDen+Ynxwg9bQ9sPUiTcMAFRrIBfQgjzJo9+Eo0AGG7qYw2Ng6h9S2XkniGBfuxYut3EfVN2sFLp6lZCu5oRrNzkq1V9Q2iPnF0neQbQX9vEdZMhpIP4v5LzNZS6hgh5ZpsyRkzGOuf5E+CGNeb2Fn62QpSTV8spwlCf3YMYcPkit4 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)(376002)(396003)(346002)(136003)(39860400002)(366004)(1800799006)(186006)(451199021)(478600001)(6486002)(6666004)(6506007)(26005)(1076003)(52116002)(6512007)(2616005)(4744005)(66946007)(66556008)(54906003)(66476007)(8676002)(316002)(4326008)(8936002)(41300700001)(5660300002)(38100700002)(38350700002)(86362001)(83380400001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V9tQDGADz9iLVfqeHM345Ff6GK7ggBVyPKULdTaDiAd3ZWxBeqK1rb9jCQR3b6c6vfbOvIEt1djzU0LWpxZTiSnvF6zTqn1dqWe6DC6k+44mFi7KPE1oZVpY9Axf8av+JP7GR52q2IY0mtslzOb1aI5Z7W9MUwLjFTgYls7YMbZItlUZE+VgXtQX9NqJsP+bNzr8Tu/GhkGOCr7R57rTG7jN+PTTybR0/8rcLx+4hvIL0OC5+3Qt5/aek8wUQk6/YZtFDB0qkIQhUQ4ksB7yZNpI+0Y9qXh4Nezb3lpjyLfZe3foMrM3VhbgieDt96xLUFwzYbcnwRJS+6ZpbSrs2+SWXpQ3xk2SQa/8SQ1okz2bka2d3c5mGpsyCwtN6IW2uzirQ86PITKdwwihh6O/D7UY9pU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EgalPY4VUDaR4N2r4rfPARG7iR2S0R/p39iZNmTBqTIzSYeKeEj2sK9FK3jPCJELs8TNvpIODi1DjH9sBvKx0i7y4/YoBYT8QxTsi2VRVg/b X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf200120-b06e-430a-83c5-08db9cb26ef1 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 10:37:18.5630 (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: hgodOTTgttqra7XFToHWeE+HEdNxc50+LW5LpAtvIBo/waPCJxPlsLmFi66UYU0h/8GYV7+RlKaaA7sTib1ZPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7216 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");