From patchwork Thu Jul 20 09:16:54 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: 13320202 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 2C681EB64DD for ; Thu, 20 Jul 2023 09:27:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjGTJ1t (ORCPT ); Thu, 20 Jul 2023 05:27:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjGTJ1h (ORCPT ); Thu, 20 Jul 2023 05:27:37 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2079.outbound.protection.outlook.com [40.107.20.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25565268E; Thu, 20 Jul 2023 02:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D59DmU2TssHzlsxmMWwgQBYNcF050CEN/4vrLlyAaAeijDgM7p2B1mnh59ggbXfKNYAYYgZrmdu7ef3YYLYuJHjTBXR13qAbb3NRToeZOAV76Be6wl3DFhxUQLxFHr4LK7l1Ti4sAYqTitgfeFJdNwtzraIO8rziZhBPu/cNmk1QSxXXLY0sME+qEU235MpGqApsl9ntLQlc4dRbRb+FOR3kMjkT6j1vXbYyNgXUy2mV4cB0PF6B9J0vlnkeqKIBYy6qxbcgMS3UIuRpCJfrpRbphFBazkMwrOUAnjDZ8ZD7Qz0aD8/DK1T9FPJ1A8wM4p38X7ZDCsAOI47ZbKOfxA== 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=Zn9/w+ho/0H11kwJu0ydc4HJuRV/6VUZ97sYO1iCEA5cSVgsRpG/1cQeuLkf68Hfugp7QbOhhsaXKVFGmh8nBfIwKQXA74glVrLzztjR5geijUJ2euqsxryKjtg7ROMpDRPY6oY2fnS0Gs2Wv7/73WzDJXAXOGXDh68fKYRoNtw5MblFbshRN9GBAJ7esz60bIZSBjuPFVY5k9w+zRctJoXIodcfccGsFKfM2IoES8qgH6uEqhzh61NwosHUAygA0rA3wzMcX4e1U5vDkKeLjmTVZqMan9LzIzLaKkS0VFPEWBYreJO5o1Bi0HxSScEWGRhBayXGe73jJSx+C+P73w== 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=iOS+FW5yhReHiwsCyIMlQLGG0kheuLrjK6Pu2ehXb5lhje14AZW3/Tnd83hC7knzuZ1FrqC0dqbj7BLHd6hPqkwZoRz/9ISr6vYchtqqFicCFZmyawtoYZHrfVofJ8T10THwvdmjzXOZ3lBlkfAi3fBh1VIeL9C1oSdYQ3wFh0s= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:20 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12:19 +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 V2 1/8] genpd: imx: relocate scu-pd under genpd Date: Thu, 20 Jul 2023 17:16:54 +0800 Message-Id: <20230720091701.517197-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: e91c0e1b-bf94-4b5e-cc0c-08db89016b60 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: 3c4hYi+p5AWD/dbaZeQYdITJTigkqHZvjfetpejyGf5noYjQ8dZESaNVQCF1RmbSypBMyuIjiMIlTQzfTcM9a09HG1x1teM/Y8RpIqqTSmp+8A8Oo6Gl0FH5G4r3hpR56Vbpny9jRkiM/hY34IRYYAgWwN6J501YBlSL/+r2ScnTxys2Qsa8RU2GcKOdHrTsgz5ujaLmVozuNnyF5Cchh5NeaFlt5z0mXYVVBt8P0FAmb8FkJp3+p4tql9x9BiTA31q+15bmqn8ack/QulVuti3KJs4tE5ew1KPiAcx2e31EYT6EKyf1+4N02vYWMq5NEvQb217dtNwwvxWskM1Nqqr7nij5pdXVMP4hZwHtO1OwuLg4IuaEEX+AVKni0uDXi75r1VD0XbUfTsnqRo1e4wxb0hI/kT/CVhRl2P0VbKz7EnOqBKSqm1wln/N2SgXoXad9D9cp/908jQTK+T6pneuMgYE8/1fdbJKDWkBUv+floLU228Ka8ii3bhReV4LRGqETMsJwxqNzvchUzog2C5dsgRX758fvAFeo7HZ01BmhQBrpbAWnRux3n1b5y95ZsMAWwRv5gOoW2TTwmsN9w+TxumokwbRWm9w2I6qdvm9WLBmcQdJ03ew+ogMRPEdY 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(2616005)(83380400001)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jyPnsHxf7ItD1VoME3qTadKt9WyNBxUiDdyRx3far37YS0HMulu+lAh/airn8NzSwaMX4Ctd2Qm8MD1GYdQjHu6t/mppOSVVPPX/1orgcDruphWQNfeknwqzXZ7/OemJw01S8Kj1xsduQMKvE6CD7oSu68tEv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tM+1V18XrB/yXNbn+DWL6QdarN8VIlEZqlaK+PsO0FrZgWdsk5RRbwxbOsdXJHqT2QkFv54ChH0MxPKuoTsE9Whz9azUvI6LMxM7ifyPu2vTjcKRjGa4qsxdq/W/QNobTmEM/FjMi2K0g3LVWfLMQ6Vr5CbB2ZEdsLbcU6JYXl3aUS2brqj5wPKpKCeABsDe7sBYrW/em76HNPBqTuthNI61TspPiM5RBLggQIACw7ZlpsqEgwpvE7OW8oEaiW6VV3WDmsknWLaRW9Gg7tOHPW3crpr0s5nr9yHrN+sayeAF5VgtKSXdZF2uAnXXRPeaqds7bD4aRYyvYuePGRnC69NRuXcQsQIiVAb X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e91c0e1b-bf94-4b5e-cc0c-08db89016b60 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:19.4962 (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: s6XgE3NHqid7r4ek9j6NPiAQgkVoI1IAqU08Du/NATsJikQekanKtIv/uFG4W0N/XXheMKSgyTjq2tfg1/ZMHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 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 Thu Jul 20 09:16:55 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: 13320204 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 43093C001DC for ; Thu, 20 Jul 2023 09:27:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230390AbjGTJ1u (ORCPT ); Thu, 20 Jul 2023 05:27:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbjGTJ1i (ORCPT ); Thu, 20 Jul 2023 05:27:38 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E4D449E2; Thu, 20 Jul 2023 02:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aNqF8W1NYLuw2Gz671TDZZZjmII0BtPQNBhRDkaWSZ9HMLwIzuCewWDGURhkzHUn1kJIHC9/fysBBq6Eer1rvOrL3D3Gxr4sjRp35MgRt6QhlGRON835VkKbA56Ay9VNJ6GaqUT7lJXQi0on2swPD1ORr40ClZHc9UX1ATLGkU3bLnptfvoULIbv5Z+b/jcyEJSUSkmwXoC5WhwBGWi2LD0fVWqNaAIJMvZuK6JenNizRDtYmHbXnEt9yK9DMhnM3cKgCzw+uO5zOxMHJ7+mH9bp5OeNiCIQdo6yuqaq9QbC3/JRXTLAntqPXf9FeMeT0W4r8pMMhM6i36C3lurY0A== 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=ha8Cbn6AHOAtlwS2+FL813qvYkN1w4/lsY/S4XsUIiwhzqtbc79sA2EGN+N4dlNATYlU2xMEjtzpJPy1LAwxt/wJlnKEbaoQY64gxpctV+Ay5puqmnNYPNQWDZVTkIkFrNpx3jdxoQoVgyeEWQLStBoUyN2YvJAFNKKV/7SxPYQYplYCWmTknKu02pUxVOTtB/sBlyRJ0K6PC9Eqxlwc62qWPdFb0hsOyQ3KcdOfvoWmsnh4uw2vBUiB3aWWkTzua0xkVWlWPF7vedOGKb/ne6w3vD9HBt+GDk3d6Vw4dEvbEoD4YH1qk63mv1EGyMtTSqxUiXev1lSKKBk0CECj7w== 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=COiPJhz5T8LFqGGo9EQIHhtI6yXwUI3JA/mGcowHAxar3IWdKZ7Brrhjqbs84/srNH7tc2DETFoG/gevDvwSeYR9Ne+ywc0T9hp/LvynaYBvQfnK4SYesZNusuhFZUYABLGZ/gexAUKtnNPzm4W4NDOcG/+5nmTZLXc7S57vDJI= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:22 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12:22 +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 V2 2/8] genpd: imx: scu-pd: enlarge PD range Date: Thu, 20 Jul 2023 17:16:55 +0800 Message-Id: <20230720091701.517197-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: 52893e0a-81ac-49bc-747e-08db89016d68 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: vIrTWDTJwu75+YzgGPdEAK9UqVtD8t+em26jl0TDsvk8DfpfZISsv2CanE3XHtqdiMzeUAWXTL5oRQp3IDgc0b0+tTywS7t4xEXbCuqSyO4pli+FGf7mp6W13r/wfB1EPNDg7YGf7AR/O/7gkocv3dskYpbEnukIm9HlDoi2w5a4mo1zYw+QVVO+FqNY0HrIUtxjwZa7cReWlBCgYcHQjc4KgpNovuuITH1fxrgNxnHCNjwMBplm21+4a5z9O1ZtVguZnkf4//Q3xvgNirN2FY3jswaUfHMZRubuEMGMD4sFeAMCwC/CamP1FID/K/tyoK7rRhE/g7aJ3QfE22BiEHbYCzuRh6nO+dyBTardZMi3da4SjS5cYyzkyYLmQKk4QeP0p0RRfAdj1JZsZ7SjDP4LpJdPuk5RIKpL4au3d741l88Y1z/ZyS3gl8rWQHc8eg51xuJU0gFal2zTN7lf5+STXB+fxwMXc3jvUbA8lpW1cTh7Z6NXPIAig3Sk+RCJGa6NdSkdXpwfd0UYu5egyLvukQD7lCami0GSUA1Da7FLlhs8rQiai+K9ZPLpf7I9uMEMlOxX/l+IcO8+mVc7nhMAHXoakinXMAQWDm37rdqb4OWyi10v7xfupMkRaRikczOziAUV/uomX4PK58Vsng== 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(2616005)(83380400001)(38100700002)(38350700002)(86362001)(147533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /IAYcOGw1oH1g5+r4HZ34QA6BtNcQ1bGS0rJMzjddpI0yNXRrytHxsUOAtcbvvXVWgXULKBXZH2APD9fK/ZkJOMd1F3lLf+e+JNs2hUIchbJPZo04FIvewETc2hj/F9jplUV5eFFP6bvA5t2FK/Md8tPXijOuOXvVcuu7FBDFpsrxUteKcHDEV2/NdX9ajcZHZZJ3lZmcPEimcs3Nvbksz8uUlbFoSSF0CWcDINCJ3mRFLJOjnVsnspKWvwKRLy6o/CjmhK+1+PIw1zpYk2XStuIgcWNui/dtwZqCdKuvgal43+y8W1T87jhfPuVBisviSez3VEiKA/CJYRiz3vktTxt4QUzMbZi1ZxfFb8IQuDIt8cjCZ47uJrWmI78CAnrKao/HNYRjMInQtlOPB6SyeIIjklqdxBFsBhNI+t1Sswl95tTWxFDVxwTR0/AhbyGM1djWoVzKZMLISDhEiJPKIcI19IrBpSbxKKzE7roB4Bkv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wqbWnO4558WU13ZVg5Av21Ru6JDKdPVvKkK X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52893e0a-81ac-49bc-747e-08db89016d68 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:22.8119 (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: pcTUSacGt3Y6HdfF76VIFjdMAV8GCIISF0IgAzrckr1ZzFOJNKBnUZSHxqQs3b36tv1haA3S/FhESonvO6IaHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 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 Thu Jul 20 09:16:56 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: 13320205 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 F3A2AEB64DD for ; Thu, 20 Jul 2023 09:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbjGTJ15 (ORCPT ); Thu, 20 Jul 2023 05:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbjGTJ1j (ORCPT ); Thu, 20 Jul 2023 05:27:39 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5AB72700; Thu, 20 Jul 2023 02:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hUhPKcLosDcgEMS/39dKhNbXo7giIFhgO4Et+iiP8+fOAem2x821EllEc3VQYi82wKlgEYS/lbmx0xwgkcioUYtNh6gUDQI0diP+2JHnAG+jHMGscshlrkF5D3A7Ea51Kxe0oq1MoWSo+VXJOt0r5TmfDPKyWrRdYzcUsxSN1Qi2dZ2IrWlqWPW0LwDvYOw1swRuZ90WO5/9ZToXOuLSu4LY05qxMhB6+oWb0s5U+XAwIE+/2tXKbcPSk6YkNnUkUQcoXwy02TN1Qv47SbFxHntjznlTd07iKIee3LJFRnO6WTYX5RdgEUe4M79YstHpPMVv5VizmAwq9VzxW8Mscw== 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=Yxmr1thRzIGqqy4W/c1s1A07YMimD3sYiomlxawJqCQ5AOM1zpOkYDrCegAD6Y4ayn/TPE/M0vE2HOTDgQPkfLIq+U/gl66zVT7/ZbMnNZNTnmhJSdVS84Kx2r+Wl7KtTEF69g9Uca1h3dr7InKraCLyJoljVymj9NkAW8aTMpKxuu5sSo6n45lSlGlGajQMNZFwbC5I60ZREp6B5+metkUB6+y2zIXhyExdixpFKddUhzbjLucfvH9bQIALTrWDEV+PS8+XtzhKhL0heDIECksKziwdyYl+BzcKwSPWWa6QZbr+mUgfl3k9RTsuCXGCv0QL1SOwMBSiL67meHef+Q== 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=X+SdB8BEV5k0A+g8cL1Ioz7HRXvDzFi5f+BKQQck5o7odHS1eEfCCZo6sA9SOiZykI+f21W8jU23dlTcFae3+Iiis5EJN0p4DWZBcwPc6yTofcwEPW7EZ+nmI5klAqucuca75wmS+0LUkzAxoRi/OxcDcCj/96cb422vOukBrrE= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:26 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12: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 V2 3/8] genpd: imx: scu-pd: add more PDs Date: Thu, 20 Jul 2023 17:16:56 +0800 Message-Id: <20230720091701.517197-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: 61b86f08-4ecd-4478-cc5c-08db89016f80 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: MF+BiYctRaNrlJfgyJG/A3Ep4gQvSApuzjJR9fvqQDyb3nR3SeYaTIErn2BY1xeRD2zmgp1ewCjayIcGeOzyIpLhayRL5r0hZC5ZnRy8U32GdXhaK/l+lC+VFS65O5hrw80W7OKLICm6k/fGOW/4JQ3ByxEkoVpKEeefkfxHrAhfX6i2L6Wwkv3Iq0BiJTt86C40v63j+szzxtkLSphbguv61mYeblrHdfvSBIipPSh/JX1Jy2UHdXrxhjFPi5b3xLNOn3CBFEiG2jUjTiD/CGtP2Pb45gGs14Z/031TcVWHC/g9vdwuNZoDE92RdEnaK0X+NoIrPxT9QrbA7gH36/xm8IGetnYKs8nVVaOYs/Fq693DVF6377fHVhcvbe2FO9dcnRBpjBwKKLM6NFMxtSkMC1mMjW/aIQNYWkcyOM9f8uoOOonPQ4KtQ7TrVXVeBoLFvlrPQ0XdnD0NEkNHBLY4uW+UY0KLmsvhpcUlVgEtm5g4voCNMLpVctD/fG/xNNo6Ks52rHKlMKhuJnWnkVemjjbHkiREbigrx1xVesEDotPi+GwOYCDPm58q0Ipy06VOCLMXuY5yxRBQKh17Y4HIQSzBMshyOVQE69PxRs4/44POxYOuU4inh/ptuW1l 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(2616005)(83380400001)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bpuWT1WffBTWxD0yUv+JhnEgYr6/7GimuzIi13WpD38TJWslS/+SoZccvqVmzTQaYPPJ1bTIAO7fxXTLESQ0qXgXrFaqIJbXxrDooH881f09A8BwYZrg8wBmwHM3nTwHIBFcQmPEKvhj3+IHRJyQYQPBuSPYUvni0aGbcyGRHruYqnRDxX+v7GTcJjT03+VI2vFGGP9O1RzpVSlMB1FOPcBCTP20KWOWeOzcR7+Zr+nxqDaCG3DkDgk4r9qhj83PgNu32MYfURE/NJ2EqVbfHeqbjlVxS1ITGBLXdCY3Ue+0dpSrSuoYpkA2/PtIB9n77/tKk31XxJ5fWQTMvtA+kVFIkMpPVbKWG154HXGF9tjlNpaCJykcdkQ204+FRUZdGqKgZiYbKrYiks7Bdn2io+l2Zzvme1M126LExTt/5vfkhbYncm4bsHkGaH+fm4C6R22UTsbGLjOXTvB338aAMnHCOce1BWqEHr+JF+GjhcP07bVZ5NSRTXoY7w4ZU8LOvbsc5Hlz+A7pQ+AhbwfP1yyqHf8sERnhvm58mJBsQabam7WLkwv2ti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f08-4ecd-4478-cc5c-08db89016f80 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:26.3516 (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: pG0XQNVFjNZkG4UJzApYIsBT1TJW7Tqyc1LirziTXVlDgBJWz9pZHD1TYwK+yFckcohnT7x9kWLYuiIrXNRlOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 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 Thu Jul 20 09:16:57 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: 13320206 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 4F8F7C001E0 for ; Thu, 20 Jul 2023 09:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbjGTJ14 (ORCPT ); Thu, 20 Jul 2023 05:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbjGTJ1j (ORCPT ); Thu, 20 Jul 2023 05:27:39 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5A9D2709; Thu, 20 Jul 2023 02:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TwRwJp1wC0QASSV9BZeoE5aTaq//8TqHjkCQh/PNScMyt07S3ZOh4dv9PxXiqWkQins2/zswWTEvgCbJ1UJvpRrHrlIiPr/9U3X0VXKpcxQkaSUn82cs1khUhMx2DdEuBFRqPl2GBrwZlSpiZ1elpplQCVbjiGdkbcc2dMfpSgO6TUseFjfAQnZlkXskTS23JWxL+JeMYfMsajNh/t69uFw6okRHELw0bEdV0ltpQDtlOkW+7JRRQe/DvOEPkU3RxIPn76X7pp/Su2ROIJcOg1azcB5xnGOplH6Q39pCOnyCRwrvmiFVTjwxoE6BEbq+wonUJHLDxyYu9d6ScMBi9Q== 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=nyBVgRzpyg5IR6E9+CmaVCWGHJxOd0Y7s/6JAqiYs+k=; b=CiZT3V5TGKXlrSOBC36resIS/egcDW3UuYZJEtpq+8N5LibUBY8nnDEXj5HZTMksF/N4UkZlNANzRoR0nRlb3Xsp9Slf86YOww+YyONHhvpttC5U+WKeRjUoLV43hdAzuTImQeCYSVoHjKct2/t7MFJFYxDWvReqaY0c8+6BpRaOh/2DwbferOWqqjmmI4GHnF2GmoDFOk883kqqesDfAky+oEkqUvWX6xoABv8nPGtlvBgOxslMJE3ViD79ywdp/OKNCfK3sp7rlvdvaiAqO0oYmQwzhM3TOt6fR8RJxOr/xOSDtxYYTWRkwyqLH1DhG2ISvV2PLjWroZllUxc2KQ== 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=nyBVgRzpyg5IR6E9+CmaVCWGHJxOd0Y7s/6JAqiYs+k=; b=X5PQLF2CA0EE3qppq2hVVG5BdMEwljGx+p+zy5C8zW05ZyTBoo0zS0yIUIa9dwgkebfL+5t4566C1gZQy0zAdwLcYSNpw54lenv0xUoN3wukjA1+saskIWpkUGHQ+zPGguLEitF9/kGWEVomPjnWjA+YxHWhM4UA5vDwCJ/1dUk= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:30 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12: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 V2 4/8] genpd: imx: scu-pd: do not power off console if no_console_suspend Date: Thu, 20 Jul 2023 17:16:57 +0800 Message-Id: <20230720091701.517197-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: fde83e8a-7cd4-4fa1-0ccb-08db890171c4 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: No3zx9GlU3pxmD27rbj4AGaOWExjl9wvb0V95fQMr3pZ4d2Bsk0S4oAjmnnqohUczOpTn4pKjXlY5aAkxpvCgIo2H0PqUIwhTfQFunwmMplHQSIXaYf8/Oh3nGEddBRYrnn9NiXbtIsKSfEfQPWItFZJ0B3zDmFp83+/Qtm+Rp30/mPhOwFQuO28o1vsUjg9s9Stw3phKQ55GXRyHEbgXVCrtHpTyfPogooEKLSyL1bf1UFlUwlUOvzIesJSE2HPgcp55pUlLS+0I85ua+k7OHdvG2PueF/gLlGq4pwp3a1sa1sh4wNvMipKL263OEtsG3Y3K2YKyKaZMax/heP60OaNzTwGyFbkBZGlVA5JHJoOg+PLxksr6CYWGiyWX/iDGkI7MYdZgQHQ7AZHCO/t69UE8cPsAhR2dfBHLMUjvh1XkUrWHi8mPujUiwwCSu9U4K0AFA+8n4psD5UPZL+Z3xML87YMTeEO5VCZjDSgJnu4Id4JqyzZJnzYUPT39b9IxQQpK9PVkt1IEIpqSHmAMMkkQ8bubkEYS2wpnvCuiPTrWIMarI/DD5P00vzYZjNRK9yLPdDcnahHUBUIFnXZ8dq1GJGGl+Zp4Afjs86VA+ZeirM7Qfc7Xwo2aFO8S+Xv 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(54906003)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(2616005)(83380400001)(38100700002)(38350700002)(86362001);DIR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iydJIx1dsEXSZNjWAoEQDQHOQQxnGQdHd3f36/CpFPIWpgI10ajeUrEhkP9JxYmdQxGVhXbNHapUcEBppftZdz8YgrazAMiF0eTQyXc7w8HZ7TE+FVC7NA9SE1U+SsjrR61CxeBIV3v7kJIZJlIhbwDCpWd/O2/osKUw0W18QkLBqG4C+hDtp7BaWN3526hvmGGq3nXvN5HuJFOYDEAp+ONQytrI/9uhD1L69A8WTRuFI/Yyu9+HJkil4nHKkxtOBVqyRVlR/37vT1jxT6sqXpCJAbT0yze6WAC7zEIF0EcYMfRFIahryKvKl4YYRLeABlYh44jP3WPxmZAkxmr/jE7JhDNUkiiH5PmqxYgci+haKBfSKE+nleom3Jmld5kK5uxT/puRM8NpMeyc0m9ABojeo7w9VNm7o1HrmF5nswvfZC7jZFZFPCYmZ34rWJiwkmlTGCUeEOrigqG/zGmqMDhh57kBPukhY82/kSKJVfJyXge937L/iZtwvrXGR8gCAZ42Pd035u2HUh9ErlSxqsbIQ1AD3ucaHsh7zW2umP/avklw+TujsCoiZZdyPCxnVa X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fde83e8a-7cd4-4fa1-0ccb-08db890171c4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:30.3106 (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: mxvpK65L9LOz/F+d3O53GzpupplzuHWRGHQCvSiv7ZMIhDzHzanm9MSeuscJ/LwqaStJEdaObQ8nilhzW9ykMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Dong Aisheng Do not power off console if no_console_suspend Signed-off-by: Dong Aisheng 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..6770be51d234 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 0; + 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 Thu Jul 20 09:16:58 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: 13320207 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 A4A36C04A6A for ; Thu, 20 Jul 2023 09:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbjGTJ16 (ORCPT ); Thu, 20 Jul 2023 05:27:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjGTJ1k (ORCPT ); Thu, 20 Jul 2023 05:27:40 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2069.outbound.protection.outlook.com [40.107.20.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B719B270F; Thu, 20 Jul 2023 02:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XKiNUSoc0xrcInj3h0XcxeVd9cTE1B6fW1TUinvImYdNvt3jf+/1VqG6pgagI3VVnZTMp1ROX4BktoJ4+aeaOSXV7hHn8mbC5l/ET2yX6Je7rdfH5xIlP4lUKBT6d/76iJBfk7x9hpIUkm56MGkCf5F5U1rWhX1itbQLkeHl83YdiOaBbtlKZnfsOGIotPCFkGUCfS9Ylakx7VY12qTK2LMvNWy0A5g2ezUAEtlPm56PbzMdZ3JaTSZwzEiZwIEV0UGfJ/SGYp41AVVqVDBma5VSIQ/Y45aUBf88OV7lYyAhhmvt3TuV7P9w0uQShj10yqpzlLK0hZNIZrhWcxH2zg== 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=ORzNhWeeNhvkI0mNLRqcgjIfNcSqGQffHhzG9ffl5Ik=; b=AP7LxgwDKfCThmkRDCirYQZxuDiDDtwEHza/2BQsJ+cnk9FRnrGtiWhlntDx2NJoceT6NtwUmfaPxi6bRaz06xweI+g10Rl7ojaeaNdFmOEuj7xfzfnS4gvWaumi6bh8M4xMBrVaLkaTYlAfXlALfqzOzgt1Yt0b6V63D5mj438a0mgm1id/hWQfpmfJ5arxnt5BZpU9BiLzCESwEeEYrCfQLexelXx7gx6A6VvnNOAZpZNyUy61yku1GvK6XZEGXy37+gvfiQH1HZHFJsjRg264tHzFnE8E2jswlpAOBABOaLRpa/d0dhEvpY8XKVWQNLC9rrFrtzQcteN+zsBBXg== 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=ORzNhWeeNhvkI0mNLRqcgjIfNcSqGQffHhzG9ffl5Ik=; b=GTHGMReHkHtsYImOVM1AP2KFXvgm7USWd2kYYP+ox/RDb1d/Zi3K4GOvGE82QyD+5g8PA38NdFp7+FQkQxtlEtHsA9ML7gMQDfht0iUar2sYSPmcdWg3iqCmSRVcFjyGZFuxLm4sdAKOhe/sChhogCM7jdTthlKP5c8MpG88DXo= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:34 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12:34 +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 V2 5/8] genpd: imx: scu-pd: Suppress bind attrs Date: Thu, 20 Jul 2023 17:16:58 +0800 Message-Id: <20230720091701.517197-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: a1f8dc64-0764-4b16-4cf1-08db89017407 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: LPQ6kgH1YEAdWJaoMTWQifCbrjAGZvQyRrmUPnQcwwOLYzuUe2r+EaHwPoBiifNG/HzBcOnCO0Xc69hPq7JUvJh+lYzPlhm6QB9/BNbtK9TEl+SV488jWXT2+M/GzVTJrkMCPhHL5DLX9Ldg5TV/F0vFm6x4gUcJsh4wd+WZwJo7F2qiTndyKxxODzFZ593o/Ft9CiAZz/LA+hD3/ubPNojn+pIjZz9ypX5Y8oxmzkwr89WU17mC2JJ64bpPwgJqk90sHsLt2kO6NiGfGC4fGM+IlZx+mVqPTxnaoXDPCykxeYqC9SKwCHvkS1+h6nMgm1dWp7L8hhd3PiPGIdi3eyN6b7vAI5xHLZ09jpZ748kcHdhr8+JyU1yyHyZzOtAy7XuNrJrtO1OkOaaogJ64wrVF3AVuWMT+oaad2Js1DfFjmg1sd60U+PjVOq0EDpCcn/kZgtNBAo3SB/E3YB5dJvPQH33ZgwplUuO9O4L1Ole06QYTsXVEWBJZhvrXlKk6FXQqmASpfZ+aTTIK4rNnJ7v4vwXHC7C+PZdU2ZVB781tEipgJHz30D2OZ7Dtg41I/NZ/fBqVbbUeNkKDTFg9NsVMTBxRYfCE91y5uRXc5Tbg8yBIqAyJiPWga66oq11j 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(4744005)(2616005)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LC9ZpAyhf1GJrUgOHTeVTuYwWVn7sKWIrOiqqFqCoF4FyrJULafs0Ss9TSFQZm8oajcfMl6yBuDXdFUtXTDrLdz8S6d+aZO4NV6GsHkeZForynw5dXRWzBist+MdYwZ3U7N9BpkMcn5x2T0tFXSkBTz4aFKYoUsMx/N1+kh0L3AnfBPGqs4Sc4YB2jF2uwct+fPo/mIjdcbiJAO5egWPC5q11fMnlApCUPHDqjyM1q/rqq5w+W3VoHpSCK/lKp1YTfvjRSVVhb8RKVdu0I1MKTbmohkTHdDDhpcQkCF9/NGPK3N8A7nXW6zuyeNKnW2Bk96FyavzhoQKkbH+TpICUgjpz34Jz5pbXhEUA5xj8LcflMm8fmdmbUKIXu6wVArhOSaSTt1Cm56NkPmtzAmJRdP/zSAC7E5PSKSd6y09CGWTdBFVzVJXJiiX2pYrCKaKR6CmPuAM7KHi/TB0h180a3d8LnTZMxGEWzjeVUP79rXbl7Z38Dds4pvCJB2iThJs3gUnxw8jNUeAy4M4sow8jFcsILiChaYMwkvIL9Kh5eQ0oYPN/64ADsG7TaJuyl2YzBDEPxhJxyPFvljvkVGq/yW7VZDX7K/uMVP4lLOSdWl6579uZKW40Aahl/r1LNeMOoMqQdH+EE3rgovCZQ2Km+zBrRPlc+NF8putt10YqdNTQAVCfXUbCAvA1/qTSgTqhxPeVnEdWSV+/7FWMRFf/bL6ZXzM7+liKhevOggEI0+rdQ79oZJyvUI1zbh6z2/JMtnebbCGGlg2/2qUfZPEoi6coR4+mBPGqD1zE46ptEjiL9bhx5Rnc5XlkQqVJkdYxfG0Pxm8iOsq+SsGCXt4oZXllaDjX1ZoB7R71UE1aRc1PsGZ8fECTweEm6PnpERc4wNGKttP0ige+rSJKsW2JnRTpWyrXz80Id+eT6AvreB67cBxKfCdlquHKcfpe2jNlSHXdcgE5XCACUIX477o16A5TxMDXDlLJphiczUlefDPFzv1WbdfGWDF80anATKI2auXG/zuNQ26D3+vFI7sDau88ejb6HgK4SM6jYOfvQM7BS3113bwWX6DTV1DcctlfZ+rFKcyYZIsUvddBD3UbaaDlZlvcYRoufbe0C2FFBjSs8Q3xXsoUqc5wYA7Y2nY28BDcUuS23RytcXQiiuke4jsoEYHMQjxcTB0Du1MDsNHE6fmVme/anRdlISf3FM2CAB5Uah+WAKv0KYQJTsWN5d3IIBEYY1ledtdUn8PV8ywUMF6ZE6zHgw+IYsXZihXOrUvvdKSoaMv89H/rkzwMNs1/sUXiTtx+M9Kauzy31vrpcuEjwiol2qilwDPiCq1iBwo6kv54ny9S2Qj70lHhj7TE+7ajA+lovCFoTZDQknUOH97EEtui7t3HGCHVq6ywQl+49lDByqk28v5eG+erllS0iUWmkf69jBHE6NsebW9W8rsHhBrXwNp3x3tpzWF+1H68p4/I6S6vUqmbTEfkKq4wJmMsGnPdi9Y3o3AWPTP/4VXD8cL1DJZKcGB6zMvG67EI6Hi4aDji/TotH73YuZxnCVjfl9dJKjKTC60BAkAq2Rtp8YcOOj4QH5UHQMb X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1f8dc64-0764-4b16-4cf1-08db89017407 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:34.0778 (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: hN4Z4gCBY5KnxQOfy+JV7ZOmPqp0XiGFcTICamt2bNrnjsz+zEdeot5KpOKWa0fBJPATIoIc1TLVCATeqGTJjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 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 6770be51d234..9f8dac7950fe 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 Thu Jul 20 09:16:59 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: 13320209 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 BEBE7EB64DC for ; Thu, 20 Jul 2023 09:28:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229551AbjGTJ2A (ORCPT ); Thu, 20 Jul 2023 05:28:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230004AbjGTJ1l (ORCPT ); Thu, 20 Jul 2023 05:27:41 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2047.outbound.protection.outlook.com [40.107.20.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2503349E8; Thu, 20 Jul 2023 02:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GliF0/WfzoemyqGXr2xWSb9k/WF32XFVlmKNAub8pF2q8IsSuAHEzUDbX/XI8ww5rKB4fh02N/4esEp9c584vACw+/6fsJKYN88i96OQv9qvfrOlGfkL7ejptMKE12FLMhD9ait2rAMcSrLCNLGAP1qh2eOZ1NY5zCJJqXSQzCrz4BfMFJrHLFR9Y/46TyiYx6XZQEnIsrGn1mj91/yxxQ0V2HT3zEHsV+F+f+I07yUjGLRUdazOnf7a1t5Gk/32HbzHG2vQOwrdGrswo2rDfv1TUvDZULnHDYOL+IQWQmFssjOvDw3pgeBW/USbvQ5hzduirivOs3pKrdJX7XUHUg== 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=w/iHQ5PAGcOgMJAor/F/ceCn44S0Z+sRfdH1VFdu5dk=; b=Zdy4AGFtHE3Ufcb8OH9tid3IhJsAmqrbVt2kjhtoLI+bNMcBxWKcEkaSCtQEjLgdmu5/e3S2+4nJfDC+SXqQThpwCZ45KQV9pNz4m8cszqLeJeDqU3NsFgKSd61IrDteedbKmfUtRER3cyzRr0CbqSTOMJfV7Wz1/7mglm7W31/n+HEVErkvj954WHVPi3RBYCwfMUVkx0feJRiJzcdoecRjzabPnm2+EdVcLAyoj6rteIPSnV/lbDZzCp+C6QX85DwX1CqrWYRY2l8q7eUuo4AhSCYHqn7Fl5R3fUmIVNPqJWKTmESK7ALuntHbE7tjYoN9m7VnK4VecqXFcJh1NA== 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=w/iHQ5PAGcOgMJAor/F/ceCn44S0Z+sRfdH1VFdu5dk=; b=gAbWEvjRddY9ZPDrRrvhbEqFXeNt47eEj0VClVEMfjgc64klyWM9Ulu67FY77TnmtEwNhP/UwfZv4wZB4/xA7mT/3rTZrwOAzYGT77ivPb8dR0jbYkk34QvEmBm/K5u2D09xg3FYf45dENnuIxLuoKpVc5rKFEKb5X9ai3BdpVY= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:37 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12:37 +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 V2 6/8] genpd: imx: scu-pd: initialize is_off according to HW state Date: Thu, 20 Jul 2023 17:16:59 +0800 Message-Id: <20230720091701.517197-7-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: cffc4795-ff8c-483e-1c0b-08db89017616 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: mklc26hmLXDkKNW5E/Bgk0gimIw97AMzE8NYLgLWbRI7UpdWJD+AC/DT2hk6ubkAn5ulIBtmo0Snb7+QfiEQ00J2gs8KKha7O9q3IApj+ydddMqmyQ5QLnwDgMIsmfLMnydl8dpvmBxP7iM406nAg7p6WvZ29CI/JpAGU+SCUpGlYtnwtsenjVF+ZLZZbH3d9xYihbGuwX7disq6k65SMcLiAb7INvrBzidpbW9aTQ+NxE3x1kv26/wypendbFdzZKt3vI2npf/q+Id3UTLMinZXhFl44unkg+R/5B2DyPxuWpRMDlJ1NM2vspyQ2tTZi8HE+k19TQBIwp06256w++jRss/aQopz/pn6GyhTY3BoMSDfE6lLr8nv6MtIV8bGxmUkXZAwRGKEWed+LyMsuxNs24GvHJf9s27WJp+NFTFybAPSm26KF2IIov0bpK2wTZbfPRKLbfaws+T/8Ga28/FUj8ja2YHjLKT+CRz22inlqtJU+pafDKUW8/6c4o75ea8U9F03iKfx/AA7ts5GJy9JoHHyRThCM2+9Pw1NFgfUalW/X9GJorq6wyEpvmv6nNmXg6//Ff3jBqhTx3lVWNGmqxoqx6tnD5XUfpQye8pRm5ImEfNtSMIsV+DSn96J 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(2616005)(83380400001)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GFgN47Uuy54irHeimbP+26FtCsfG7m8yr/rudgIWcnUPmuzTjwbXXVZsOb4Ysmw8tTcTYd9MkOH1P/EJomUJGGb1GuVaHmdvPPSXWnGRTGs4YLbh8W2mmD3s721hMc/dFDPkuz2OY2p3OkUn+hcmr1cY0XdOK5WGY7gghr/e8vFdxhJhIDf0RLuEAVKk+rY3v41ousfNqhMCQBVWxQ9Sz7gWI7WZLLB2lSyJHL9m1FPODBRbK+GdbJkp33Xcfxp1/QTEKmMEV73nj6liitqATDBwMwvfpBia8cdBv78JjV/ulmeqyD4YQ5ab9Jmws20bGCOYnmkFfdFbTdGON/NYPrgWROfZfFWpOBB4mjycHKTvDYm+Ns9IuUtnraof8MrPU3i7/Bho9avIfHgMMmBqYL8QfuS5eb7p93dnpr7Cra2CkP9xeYDj+nxh+EJwB5yYPmtDRuu1asJ30884UTspmjlDuKQpqGpyHXwX8DFdABF6REj70dqAgvP1CPPtFgKhO93UVllDV86Arp34LycL6e/d0w32lIi8L2GZKenU2NntXi6ZHzY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Exchange-CrossTenant-Network-Message-Id: cffc4795-ff8c-483e-1c0b-08db89017616 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:37.3924 (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: WfHoeA0rK3fsricPMbl1T7kRaUCBy1Cm0u0SzbEHHNDgEW6XnUbjACGbBd6grcrLgxRikuj6X4H37Toy5JVZ5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 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 9f8dac7950fe..763af1ac454d 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 Thu Jul 20 09:17:00 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: 13320210 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 B9849EB64DA for ; Thu, 20 Jul 2023 09:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbjGTJ2C (ORCPT ); Thu, 20 Jul 2023 05:28:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbjGTJ1l (ORCPT ); Thu, 20 Jul 2023 05:27:41 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2045.outbound.protection.outlook.com [40.107.20.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8428D49E9; Thu, 20 Jul 2023 02:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g9CzFS//uJt9XS9yyrs9LbOQQcg4yGjFczoCFZbeA/UwfmOCKykR5+kVCMzxa1gkO1uHj64Z2gi7SWyP9yjGa1y6vZrq5sHjaLhz44hztahlW1W9gB/hy1AB3V+bFtrnMIbOhuUTxDjJxlftE+91A5JvfYRSe6j+q1044caN3wMXcaSJiMmWaTKKS8F/uPQOBpvNrbsg4PXEhG9ZUYtZHHqiX+8cySXseV5dUrftJ3V89UR6kCoc00hUOLNchlqNdvqn0V+nKvGUekj1RB2ieaQxyIHv4NGCXIMudjnFSb5EZgUolWaO5Q0GpWVXP1BdwTmWS5IGVJO6F92pUBZofQ== 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=xvDdV2wD3kAct/OCQawOHD6CkCKngznVXUMmhD6D4MQ=; b=I+QpUQWBWLr3cWkUQ4hNTrUZnkDAAOQZYoXuhnkHZ1I15wqAK0Q/daUQX3RL3btianXHPBJmgeQKcVoHN/Xx8UR3KKmtDaIZfQEWJWzXbJFFme3eaagPjr0R5NgsdDKBRjbxf5F8/urKbusFY8sS5GQ3xuaW3JM3USUAiNGuvB3B2VM8NHj+26jpYoVnhpyQ82dm7KBixoBhnvdWYcU0d/zLKj8beY7KV3rSc0d2pthUCgf+eCR8E95MFfsAu0Wqlx/de1a9uusu1SxWA5t3vLAosJJLoiHuaMB+J9/fgKQODMh7dd1Tei/nGOzz8QhYeUlQNts0FYXK5SAJ6AiAzg== 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=xvDdV2wD3kAct/OCQawOHD6CkCKngznVXUMmhD6D4MQ=; b=lLCVVNSi4PoZ0txo2BTI4EqhADCxe4flkAHwnv0iNfUBHp9h42s0BdVeiJ0+IVyu4iyaPhdy8Mmzw5KNl5S2DRhRYMJsDSb1V7XrPeM0kCvRakL1BPXrudTVOraFPg6yIz4160iAzMl0Yviaba1u0UIpUiP3q9pKKTTNxNfLlgg= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:40 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12:40 +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 V2 7/8] genpd: imx: scu-pd: add multi states support Date: Thu, 20 Jul 2023 17:17:00 +0800 Message-Id: <20230720091701.517197-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: 329b5d6b-9798-489c-76e3-08db8901780f 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: 3cwFRirP03Nc3evVZE4MJM632tpsn2gD4Cx0DVQCrjvgbmwTupxEg73zQtQTUuBknYTd/ePMxYRZOZl2IXGjEuOujqpDp9VMYMDCrXS5PMOfPCNcu5+Vup9H4zKAvmLK4h64K8zY0YqQKorMq0rfr8lqFuq1W7GeJSnK4fFyl106BMSSe415OH7W8q13PuhSqYsBQokJm/eFCj6D/qkVq43sxf7PG9oXfVhpzBn09ud/IjPSIk0szRM2dkwv1MiTW5Mj85JMSnFCaCWw0062XbH3jNEqJ6Zspzp28fXadJci2V8ljYS+nLGJeKTIDcR3Bz3G0D9lIXqHIoXo7Rn0x8hhCwRHXiwKFMUDlZRwnf8//6ouh+vRqFYROq/BrEgqcpbre0Uji5dLTUrCNNuVPQrDgH5btKe2j0uHSgQmf6o/hhw3IFDbxGMrWEWbrdYHorljce/bteMnrZYsMeL/jH+j4pdXZjMIgGFzM7t7KX3tIwJoanekXtlCpd1C8OXkWEiH+/s6VfXQ6A8D7rjoQXZwhltWhw98kz1p5zbq3x8+zv59rJRRXdZlQOHcnzRKvYxlsXHgsQcnqQbhQhJx1UNGaUCH1qU1OLEsDcurzDGnmmbB07aLaGVFvyVSLMie 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(2616005)(83380400001)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G2l2FJ6zMEt2pC/G53yKw9imnj0de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daf+SE9uYDq1td7Qa9HSHFKBl3PoWfi/+JulVRJZpL2r151NYibAXHhpqhFzg0OQOkfwHwwfK0vGtv/87V532vqI9ubOAB6fBHD8v8hLDsIp7lGnYQTN0O14S3I9/L8uX/zRtQrL+zQzM4j7KlzjsRcx9A/bcjOrXWdOEp1HZVjo0ug1nU8bFvT0SUdhiPTP+yNYqo13OG8AYSO2oMryXERsRisR4P0NdsW3IZgKczWP/P9jRw0qfYYjhVwvmZj07+fn7oGGYiMSf1kNREhSkzrx1AXmcTt6/fCwXBQ0Dj+r03+xQ2us3PI7eTubyMEYVZArX+zZ3Ilql1aaCdW4/VIvLU4J8wulBvLlxysmX215fNpexv3f/yFJhvVwtIW0s9TMGfwVhSN1HfbxhubfpAowaJKcwgZQYQI+YXGEbG6QrmQf4YMhQuXaHydr9Sv+36lBf4LMPeVD3fGaHaY8FV/dDBdl1e37anAhd5u X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 329b5d6b-9798-489c-76e3-08db8901780f X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:40.6981 (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: ruie3O2qQZRnB1hpko4gLKEq/w/MJrMVhXE9bmivdNjsvFLJb03dwvT28ahawDMq64J2rDq1Ox26IFPejTXXPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 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 763af1ac454d..31de56366a50 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 Thu Jul 20 09:17:01 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: 13320208 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 98ADDEB64DD for ; Thu, 20 Jul 2023 09:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbjGTJ17 (ORCPT ); Thu, 20 Jul 2023 05:27:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229972AbjGTJ1m (ORCPT ); Thu, 20 Jul 2023 05:27:42 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2047.outbound.protection.outlook.com [40.107.20.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C650849EB; Thu, 20 Jul 2023 02:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oCmDaCa9QpCXDrdNZ4HsLbgFwnSOZLCfY5j44TG6vUqs4Gmu2jSoSKCG8CIAZja4zNzSqJt0LP1aqJLoLq4czWTAkQiOUhcWEzPA+uzNJtbIC33AZX0HiLORGGQ4yqjTjcprWxp03Ts2q46xcrtyvikBMjpIqjVSj51Z1tCqUDd/qz9RZl1ebXhGANa+o5Smd/u7eTrKdnhwYm6wvOKXZ3TRGULmCC1PUzZ2qZe0JW9LV/2eBdd/Om32iN7VBhXJCqZLZpFglShBuJZ2DQnUZMQT4slCyIgjm+z22xcyKkan9OipHYMymtwHlTDenjP8q75pUsmvYH6aFDKTBuqhpg== 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=IKvqZhdPZYTL97CjZh8MmD49uWVB6bGs67335yGHmwA=; b=VOxWv7FH3xwN80I4JB05iiZhFaXCowToeNxV+sW38L042hB4qeCzHormVkgNr+rNnAWi7NrUy9/KLExeBLZAuo6RF8nGXEXuA+/BntTr5V0JJnvP5A1W4TIfJpgLAz3aBctqqyfho7qT86Cvggmxm4VN/fVpxQjouBSn4Jfm/0oIhYY0IbgPvcl4kpCznyfud8xID4GFXDNjQYUpaTrpKt1ZMLpu8Q+UvQ772Z1lRHZrP+Di6D9g5RRk6tset1a//wH4IBPnutVRG5+5XxFABPzgo3Q13smgtOF1gOrBWQOe5+UBNVQdWHx/SmiBIG8Rb1vdrVPxWzZaCbBI5M7PKg== 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=IKvqZhdPZYTL97CjZh8MmD49uWVB6bGs67335yGHmwA=; b=SwALQOsRtV7j1iIJm7f0Jtd5BV+HZybrEiPufzyWxKU24KeZQPNozhkkM1S31wnSw3iEvmQNoCtITdLIIgB9Si5DOEsJuNZaUUKoMf8q3d3ApVyt9ETxojaDAYN/i/CBGtHgFKKRE/htjcCm64y9+q8XTEYIAfr1Y022Vrm+nLc= 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 PAXPR04MB8943.eurprd04.prod.outlook.com (2603:10a6:102:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.35; Thu, 20 Jul 2023 09:12:44 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.024; Thu, 20 Jul 2023 09:12:44 +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 V2 8/8] genpd: imx: scu-pd: change init level to subsys_initcall Date: Thu, 20 Jul 2023 17:17:01 +0800 Message-Id: <20230720091701.517197-9-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230720091701.517197-1-peng.fan@oss.nxp.com> References: <20230720091701.517197-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) 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_|PAXPR04MB8943:EE_ X-MS-Office365-Filtering-Correlation-Id: 15497467-8b1e-40f9-cee8-08db89017a27 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: WLLEaTx3SHexndN36SKGhEh285+TFTQ4tsndQP2qcjQsbSP2V22Ea2tKkD31rYzczdKnII+TKmR49go85dVdPYPEkLwRymm8hJIrnby5rlyyefs7WH7SrxJ2PMaborh8iGt5ka+ancvsKaf2QxV2b7nZcvifVwc8D9+u5FyKNyttL+XNcMTgL/BsnFMR5SAXWSDjWayPPZIZ8IMYJpB+VQ3NvwVfee1fw2l6DctJ/fAGEvaqoBHTNUP4e04040Jt6ozWkIsXBWFhyihK+pjhHFCc+ovaPLP+J8d/TErlUXkQz/zyOpCgh/ie7w22OV179Wcvaa7yazAr5e8Cb69/xSxlmvyERKZ3m4sMfXyLN6V4Qt19K/KNtajzkjO0xemj9pH2tYN//HacucorrxcKmy8L2Z1FMNB72pzLFImEXeUjUHqG5aFDPzbntTiT7T5byXV9sEj78PZof63In3EuByXAcWICeWomCOE2a3QphTyL92WbGBmUXiqQOkzxyTqWywERzHkV0zVh9Ok74px/Wm29fPagKHa2groJ1Y7E+ANDv/IM1oQH+RAjN4M+5l/kySnweaNvmvQUPpC3g+PCF97ed7B5/Ym1JwSq/oB+BFTNf5n/lEXvELbJq5LBA197 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)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(66476007)(478600001)(41300700001)(26005)(186003)(1076003)(6506007)(6512007)(6486002)(6666004)(52116002)(54906003)(316002)(4326008)(5660300002)(8936002)(66946007)(66556008)(8676002)(2906002)(4744005)(2616005)(83380400001)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1ew1b+UL6AhuAnWurNUdN1e8Mx72T9TvKLWNip6p5GqSS/mkDo/+dla1jtl65dkYaXaE/j7Z4hAanMCEey2QLKlt41tfNWnLMfGXGP7r7Cz9pqd2ZwnxPChxccFozQDvgbnb/MeSRxBTqVHqNwE49/qhVgme07E0ZHXIzBVE1+ziSgU1hgUIFArNAf52fuUpRM/RI4M5N0Tvi2soGVqZNGZEvhGyzVEWMYC8IwSfGn+slaAeR4sIqGlFQku+xrKrXkoBUH/9hHlUymvi1sBkBwAUcoqHT0rQmJWcMgs1ad9/14vr72H28bf/D5UEolTAwF2ARk1Hp7kDrSqtJA4eY/cz/h0BBtWQb5R0JJ8WOLqtO4ivz7FhyWNLhSMD5j53kgVsm5jojad/KEppxGYtnGeQHe6txferBPWgITmVVt13qyI2yK179O9CBwfIVnE0ntwFKkDQ/5DQjHn9DMXXfn+2ovyru5jvGegaK9o8KHqO1ULltzRM9+eeEFdgk3bunRGIX9u9bMUwnE1+R3zSGPCN6IH+oyclXnnX4LrKGKVSmjeBbgqluISH+oZ8SMLYuKr0OsS+yrnI+JACATIU9o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017a27 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 09:12:44.3818 (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: BQUyKq3MKltBDCyblqsXzYpJ0SCKBjcjcG0yGaV4pb6uRnQVIlNyRPojOkAFBBnHtBoK+Bqeap3w/DifNXb4cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8943 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 31de56366a50..5e6dbadb43ae 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");