From patchwork Wed Feb 20 14:38:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10822231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4FE891399 for ; Wed, 20 Feb 2019 14:40:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 156992E69F for ; Wed, 20 Feb 2019 14:40:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA4B82E5E9; Wed, 20 Feb 2019 14:40:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D89292E6C1 for ; Wed, 20 Feb 2019 14:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725853AbfBTOkN (ORCPT ); Wed, 20 Feb 2019 09:40:13 -0500 Received: from mail-eopbgr60058.outbound.protection.outlook.com ([40.107.6.58]:1196 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726191AbfBTOkM (ORCPT ); Wed, 20 Feb 2019 09:40:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ImlPL++Ze5JgeXO94Xnqh8KZLVcQxh57Jqg+8PMw3AY=; b=vVsGzdKI9ERgwZArtni4COP+YsYdjvfJZpkf5sVrm1pnIgFUDuk4d511c7yoo0Z0eSIS9ChqxCEMXCPdoPiEwRYHykXqDmKyz//iDCoGSsuOr9jGcmhJwBdH66Nt5ADnSSRETiFtBSPyG9pt/2LfV+WfmSFCxU21qMMQjUi+zkA= Received: from AM6PR04MB4215.eurprd04.prod.outlook.com (52.135.168.141) by AM6PR04MB5975.eurprd04.prod.outlook.com (20.178.94.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Wed, 20 Feb 2019 14:38:28 +0000 Received: from AM6PR04MB4215.eurprd04.prod.outlook.com ([fe80::e944:6749:3ee6:4e08]) by AM6PR04MB4215.eurprd04.prod.outlook.com ([fe80::e944:6749:3ee6:4e08%5]) with mapi id 15.20.1622.020; Wed, 20 Feb 2019 14:38:28 +0000 From: Aisheng Dong To: "linux-arm-kernel@lists.infradead.org" CC: "dongas86@gmail.com" , "kernel@pengutronix.de" , "shawnguo@kernel.org" , Fabio Estevam , dl-linux-imx , "rjw@rjwysocki.net" , "ulf.hansson@linaro.org" , "khilman@kernel.org" , "linux-pm@vger.kernel.org" , Aisheng Dong Subject: [PATCH 1/3] firmware: imx: scu-pd: use bool to set postfix Thread-Topic: [PATCH 1/3] firmware: imx: scu-pd: use bool to set postfix Thread-Index: AQHUySnxVCOrqemBmEKJcTp5KCZLeg== Date: Wed, 20 Feb 2019 14:38:27 +0000 Message-ID: <1550673013-21462-2-git-send-email-aisheng.dong@nxp.com> References: <1550673013-21462-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1550673013-21462-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0074.apcprd03.prod.outlook.com (2603:1096:203:72::14) To AM6PR04MB4215.eurprd04.prod.outlook.com (2603:10a6:209:4f::13) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9dd5250f-3caf-4286-bd5b-08d697411392 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB5975; x-ms-traffictypediagnostic: AM6PR04MB5975: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM6PR04MB5975=3B23=3Agf?= =?iso-8859-1?q?bW8dVSRGDBuGi3zTcXfGAxBrkI/Aw4/Igjk27L8Ys8oDwmheInvkCHo3f5GK?= =?iso-8859-1?q?N6iS32FTt6ILHmnjMCX0+/WuNPt/JMdRjdcKUXEtxsXl/8lkZKDqGHGDHeLZ?= =?iso-8859-1?q?mm2gXM0sbk+yeSObqK528jNFZyiMRiF/YAexZvjcJEu1hlMDHkE4fwv60sdb?= =?iso-8859-1?q?W1H0VCF4xNslWjATknQm674tjU1NP5ZhxGKqrxpqEj9QniLsechrpXtTj0YU?= =?iso-8859-1?q?SiRmxtAwHY1K2VynUfQ7qF1KrIBzlJQOzJdda1WmHM5irhetEJwhgo3j+pk0?= =?iso-8859-1?q?gypgthO45CLM4X3UhMYkduRkeQM21+4L/OIwbk/KLBcPSK/a6GpjBxEN9aZ6?= =?iso-8859-1?q?nXJbiUDruMPSVjvBOCTA62MJIq5sQaVa9JViQTMRaxCrQL5ncXJKnaMIaGcG?= =?iso-8859-1?q?3bTd2NrcPgGiQ45wXkIADZSFoyinxlMeQFGgE3b/fBo05Pw1IHcrIUfnj+Si?= =?iso-8859-1?q?HhnJ3dSKZlrRIL7eJ4L5hVevoJuq4VJH9kd4f2kg2AIF5Yie80G8SEyxHy4c?= =?iso-8859-1?q?Dn9sZ708VWw6f1Z2/WJHRpq8uKmPzVwK3ioKktQR2t4jT+DqCKO9HqDmLsmW?= =?iso-8859-1?q?pZs1rlzBPUTPIZrGbcMDJZ4tCPiOkJjz29/rfAv8gYKIh3SBuEwkKqrr52kg?= =?iso-8859-1?q?aMKdPWrnmjFUFeObCNNH1LR+Pygfa7M5lQH5TGUNNk3jO8QP+rNUJUUNQU1x?= =?iso-8859-1?q?ucQ2yigT0gx0xwbGN3PumWGw2xMLUuRT8DZs/drkNTZB51TizpTScWXTDl4R?= =?iso-8859-1?q?zGYdHbMXiun6+v7VJctj288sx8ji0lW6T7chxYV+Cl27ERmSxi+kgTA/gDrC?= =?iso-8859-1?q?WWFznX0WdjVDlqTrzTEIOoMNvMQWQatxx1jCeQzec0x2nt2Z0bk3mwEpQ36K?= =?iso-8859-1?q?PrF5u/Dc1m4j9UlDpT9zkNfIISpwmY+/TGCQAuGcgbfSjwrU6K1aR+wMhao2?= =?iso-8859-1?q?OQi16/wVhvK6i+xeiwS950doRFUyP4AMPWUDU90ereOiKt4u+ouj87jhyAsq?= =?iso-8859-1?q?jtFrSJrJ6sR8ZI6leo7e2xn/wBxmEFiRdE6x7XjN+eqC+AY58pTBmQVFhNzo?= =?iso-8859-1?q?BrMB8YNyuhlwfLRd6BTjmZgKLgoiasn68WR66wh9RfbpDyt5RMPyvt4n5E9z?= =?iso-8859-1?q?U6vvYpZQLY4+JAyqTNRhlA/55NV85jJsZfOlg+OqemXiPk9gwgw3aG6OE9nn?= =?iso-8859-1?q?PPlMDkkT65BzIKzbnd23S6NfvD1r1DH3x6S5QKFO5su0cJ9O8F9LinDjbcLN?= =?iso-8859-1?q?Wlq76UqfUP2foBLVRP?= x-microsoft-antispam-prvs: x-forefront-prvs: 0954EE4910 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(366004)(39860400002)(136003)(396003)(189003)(199004)(14454004)(4326008)(81166006)(476003)(81156014)(6916009)(25786009)(186003)(2616005)(105586002)(8936002)(102836004)(66066001)(86362001)(71200400001)(446003)(11346002)(3846002)(2501003)(54906003)(71190400001)(68736007)(6116002)(52116002)(6486002)(106356001)(486006)(6436002)(386003)(316002)(305945005)(478600001)(50226002)(6506007)(7736002)(5640700003)(8676002)(256004)(6512007)(2906002)(53936002)(26005)(99286004)(44832011)(76176011)(5660300002)(36756003)(97736004)(2351001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB5975;H:AM6PR04MB4215.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8K9eryVmMg6iDC7etoOPAovGThFZYKYHN/UxVNBzu3NfGzifL21cayip0s/fGV1QUDae3FxJe9deLxTFvImTilAQZOGWlM7GFHczWzfv1mUIROAlHuaUL5siQNSTS9CYB6n2V5d5EUKkdX4v9K3juXRbDhZnZx3fGpYwpeyn7Vg57U5KIFpbNaWCMCFRBKTcajSsLfBVya0xxg/MzkXIENo6Bd3f9VrmDFLyec1Bk1I/Y5Y+HJD2d8dr3TumlpvSA92O7JMop+c/ttOtGMr5kA7+O/VuSBCDDGtHQRZhBbs9ce5CiDJYfAwmq2V4GKubeNT3ttV46MxN3mY1qxsFoNxpTFe++Fh6Z9LS5UZom1Crj8/btjiaB/8PKfsu8ARIwHO0mmvYigDECZIWgmU3es2bXMGxSUfpraKDmkVlqvk= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9dd5250f-3caf-4286-bd5b-08d697411392 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2019 14:38:24.1861 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5975 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Using bool instead 0/1 to indicate whether adding a postfix for domain names which can improve the code readability and less confusing. Cc: Ulf Hansson Cc: Shawn Guo Cc: Sascha Hauer Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: linux-pm@vger.kernel.org Signed-off-by: Dong Aisheng --- drivers/firmware/imx/scu-pd.c | 102 +++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c index 407245f..d1d39d9 100644 --- a/drivers/firmware/imx/scu-pd.c +++ b/drivers/firmware/imx/scu-pd.c @@ -84,71 +84,71 @@ struct imx_sc_pd_soc { static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { /* LSIO SS */ - { "lsio-pwm", IMX_SC_R_PWM_0, 8, 1 }, - { "lsio-gpio", IMX_SC_R_GPIO_0, 8, 1 }, - { "lsio-gpt", IMX_SC_R_GPT_0, 5, 1 }, - { "lsio-kpp", IMX_SC_R_KPP, 1, 0 }, - { "lsio-fspi", IMX_SC_R_FSPI_0, 2, 1 }, - { "lsio-mu", IMX_SC_R_MU_0A, 14, 1 }, + { "lsio-pwm", IMX_SC_R_PWM_0, 8, true }, + { "lsio-gpio", IMX_SC_R_GPIO_0, 8, true }, + { "lsio-gpt", IMX_SC_R_GPT_0, 5, true }, + { "lsio-kpp", IMX_SC_R_KPP, 1, false }, + { "lsio-fspi", IMX_SC_R_FSPI_0, 2, true }, + { "lsio-mu", IMX_SC_R_MU_0A, 14, true }, /* CONN SS */ - { "con-usb", IMX_SC_R_USB_0, 2, 1 }, - { "con-usb0phy", IMX_SC_R_USB_0_PHY, 1, 0 }, - { "con-usb2", IMX_SC_R_USB_2, 1, 0 }, - { "con-usb2phy", IMX_SC_R_USB_2_PHY, 1, 0 }, - { "con-sdhc", IMX_SC_R_SDHC_0, 3, 1 }, - { "con-enet", IMX_SC_R_ENET_0, 2, 1 }, - { "con-nand", IMX_SC_R_NAND, 1, 0 }, - { "con-mlb", IMX_SC_R_MLB_0, 1, 1 }, + { "con-usb", IMX_SC_R_USB_0, 2, true }, + { "con-usb0phy", IMX_SC_R_USB_0_PHY, 1, false }, + { "con-usb2", IMX_SC_R_USB_2, 1, false }, + { "con-usb2phy", IMX_SC_R_USB_2_PHY, 1, false }, + { "con-sdhc", IMX_SC_R_SDHC_0, 3, true }, + { "con-enet", IMX_SC_R_ENET_0, 2, true }, + { "con-nand", IMX_SC_R_NAND, 1, false }, + { "con-mlb", IMX_SC_R_MLB_0, 1, true }, /* Audio DMA SS */ - { "adma-audio-pll0", IMX_SC_R_AUDIO_PLL_0, 1, 0 }, - { "adma-audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, 0 }, - { "adma-audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, 0 }, - { "adma-dma0-ch", IMX_SC_R_DMA_0_CH0, 16, 1 }, - { "adma-dma1-ch", IMX_SC_R_DMA_1_CH0, 16, 1 }, - { "adma-dma2-ch", IMX_SC_R_DMA_2_CH0, 5, 1 }, - { "adma-asrc0", IMX_SC_R_ASRC_0, 1, 0 }, - { "adma-asrc1", IMX_SC_R_ASRC_1, 1, 0 }, - { "adma-esai0", IMX_SC_R_ESAI_0, 1, 0 }, - { "adma-spdif0", IMX_SC_R_SPDIF_0, 1, 0 }, - { "adma-sai", IMX_SC_R_SAI_0, 3, 1 }, - { "adma-amix", IMX_SC_R_AMIX, 1, 0 }, - { "adma-mqs0", IMX_SC_R_MQS_0, 1, 0 }, - { "adma-dsp", IMX_SC_R_DSP, 1, 0 }, - { "adma-dsp-ram", IMX_SC_R_DSP_RAM, 1, 0 }, - { "adma-can", IMX_SC_R_CAN_0, 3, 1 }, - { "adma-ftm", IMX_SC_R_FTM_0, 2, 1 }, - { "adma-lpi2c", IMX_SC_R_I2C_0, 4, 1 }, - { "adma-adc", IMX_SC_R_ADC_0, 1, 1 }, - { "adma-lcd", IMX_SC_R_LCD_0, 1, 1 }, - { "adma-lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, 1 }, - { "adma-lpuart", IMX_SC_R_UART_0, 4, 1 }, - { "adma-lpspi", IMX_SC_R_SPI_0, 4, 1 }, + { "adma-audio-pll0", IMX_SC_R_AUDIO_PLL_0, 1, false }, + { "adma-audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false }, + { "adma-audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false }, + { "adma-dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true }, + { "adma-dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true }, + { "adma-dma2-ch", IMX_SC_R_DMA_2_CH0, 5, true }, + { "adma-asrc0", IMX_SC_R_ASRC_0, 1, false }, + { "adma-asrc1", IMX_SC_R_ASRC_1, 1, false }, + { "adma-esai0", IMX_SC_R_ESAI_0, 1, false }, + { "adma-spdif0", IMX_SC_R_SPDIF_0, 1, false }, + { "adma-sai", IMX_SC_R_SAI_0, 3, true }, + { "adma-amix", IMX_SC_R_AMIX, 1, false }, + { "adma-mqs0", IMX_SC_R_MQS_0, 1, false }, + { "adma-dsp", IMX_SC_R_DSP, 1, false }, + { "adma-dsp-ram", IMX_SC_R_DSP_RAM, 1, false }, + { "adma-can", IMX_SC_R_CAN_0, 3, true }, + { "adma-ftm", IMX_SC_R_FTM_0, 2, true }, + { "adma-lpi2c", IMX_SC_R_I2C_0, 4, true }, + { "adma-adc", IMX_SC_R_ADC_0, 1, true }, + { "adma-lcd", IMX_SC_R_LCD_0, 1, true }, + { "adma-lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, true }, + { "adma-lpuart", IMX_SC_R_UART_0, 4, true }, + { "adma-lpspi", IMX_SC_R_SPI_0, 4, true }, /* VPU SS */ - { "vpu", IMX_SC_R_VPU, 1, 0 }, - { "vpu-pid", IMX_SC_R_VPU_PID0, 8, 1 }, - { "vpu-dec0", IMX_SC_R_VPU_DEC_0, 1, 0 }, - { "vpu-enc0", IMX_SC_R_VPU_ENC_0, 1, 0 }, + { "vpu", IMX_SC_R_VPU, 1, false }, + { "vpu-pid", IMX_SC_R_VPU_PID0, 8, true }, + { "vpu-dec0", IMX_SC_R_VPU_DEC_0, 1, false }, + { "vpu-enc0", IMX_SC_R_VPU_ENC_0, 1, false }, /* GPU SS */ - { "gpu0-pid", IMX_SC_R_GPU_0_PID0, 4, 1 }, + { "gpu0-pid", IMX_SC_R_GPU_0_PID0, 4, true }, /* HSIO SS */ - { "hsio-pcie-b", IMX_SC_R_PCIE_B, 1, 0 }, - { "hsio-serdes-1", IMX_SC_R_SERDES_1, 1, 0 }, - { "hsio-gpio", IMX_SC_R_HSIO_GPIO, 1, 0 }, + { "hsio-pcie-b", IMX_SC_R_PCIE_B, 1, false }, + { "hsio-serdes-1", IMX_SC_R_SERDES_1, 1, false }, + { "hsio-gpio", IMX_SC_R_HSIO_GPIO, 1, false }, /* MIPI/LVDS SS */ - { "mipi0", IMX_SC_R_MIPI_0, 1, 0 }, - { "mipi0-pwm0", IMX_SC_R_MIPI_0_PWM_0, 1, 0 }, - { "mipi0-i2c", IMX_SC_R_MIPI_0_I2C_0, 2, 1 }, - { "lvds0", IMX_SC_R_LVDS_0, 1, 0 }, + { "mipi0", IMX_SC_R_MIPI_0, 1, false }, + { "mipi0-pwm0", IMX_SC_R_MIPI_0_PWM_0, 1, false }, + { "mipi0-i2c", IMX_SC_R_MIPI_0_I2C_0, 2, true }, + { "lvds0", IMX_SC_R_LVDS_0, 1, false }, /* DC SS */ - { "dc0", IMX_SC_R_DC_0, 1, 0 }, - { "dc0-pll", IMX_SC_R_DC_0_PLL_0, 2, 1 }, + { "dc0", IMX_SC_R_DC_0, 1, false }, + { "dc0-pll", IMX_SC_R_DC_0_PLL_0, 2, true }, }; static const struct imx_sc_pd_soc imx8qxp_scu_pd = { From patchwork Wed Feb 20 14:38:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10822223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86BA817E9 for ; Wed, 20 Feb 2019 14:38:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B7692E4A0 for ; Wed, 20 Feb 2019 14:38:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C1D92E683; Wed, 20 Feb 2019 14:38:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A90DD2E4A0 for ; Wed, 20 Feb 2019 14:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726030AbfBTOin (ORCPT ); Wed, 20 Feb 2019 09:38:43 -0500 Received: from mail-eopbgr70085.outbound.protection.outlook.com ([40.107.7.85]:14784 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726285AbfBTOin (ORCPT ); Wed, 20 Feb 2019 09:38:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ak0QI4FLDmz+3K3gAafFknYubcu67aygP29laHcERRI=; b=XxmOpcnEju6ySY82U38YXaIhnDT0q6q/Tn9eMSnnWMZbKyR/FBEA/XcHaM0Xbr5y99pJnDCnOjl0Z+rN8AtCDjAQ1OYJjnyCCXRuAg2h4D6o/i4fCHwA0TjArkTtNJ4+s5UcCUaeDGcf3zD6xHFyQiE1qtc1ilBM6nyKA0FHVFk= Received: from AM6PR04MB4215.eurprd04.prod.outlook.com (52.135.168.141) by AM6PR04MB4917.eurprd04.prod.outlook.com (20.177.33.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.21; Wed, 20 Feb 2019 14:38:32 +0000 Received: from AM6PR04MB4215.eurprd04.prod.outlook.com ([fe80::e944:6749:3ee6:4e08]) by AM6PR04MB4215.eurprd04.prod.outlook.com ([fe80::e944:6749:3ee6:4e08%5]) with mapi id 15.20.1622.020; Wed, 20 Feb 2019 14:38:32 +0000 From: Aisheng Dong To: "linux-arm-kernel@lists.infradead.org" CC: "dongas86@gmail.com" , "kernel@pengutronix.de" , "shawnguo@kernel.org" , Fabio Estevam , dl-linux-imx , "rjw@rjwysocki.net" , "ulf.hansson@linaro.org" , "khilman@kernel.org" , "linux-pm@vger.kernel.org" , Aisheng Dong Subject: [PATCH 2/3] firmware: imx: scu-pd: add specifying the base of domain name index support Thread-Topic: [PATCH 2/3] firmware: imx: scu-pd: add specifying the base of domain name index support Thread-Index: AQHUySnzT3LuEyPLMk+uBr46yFYt2Q== Date: Wed, 20 Feb 2019 14:38:32 +0000 Message-ID: <1550673013-21462-3-git-send-email-aisheng.dong@nxp.com> References: <1550673013-21462-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1550673013-21462-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0074.apcprd03.prod.outlook.com (2603:1096:203:72::14) To AM6PR04MB4215.eurprd04.prod.outlook.com (2603:10a6:209:4f::13) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dc9a5663-8058-4c5a-f6bb-08d697411602 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB4917; x-ms-traffictypediagnostic: AM6PR04MB4917: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM6PR04MB4917=3B23=3Af7?= =?iso-8859-1?q?ai5DYNf+/XIU9CWXWldulaNYG8KhIGNfxCmaO9Gf1b5PlT+AUHyCwPdaF5NV?= =?iso-8859-1?q?X1uYTFbA6jJYB8d5evujQD2CxIiCBmMTNcnyuHia5I2LRvsCgKE71koJrmT5?= =?iso-8859-1?q?ISxrR+P2bwMv8c3GfO1Rp9JyX++XfQrzqOxBwPHjNRLQIkJrBw84f86bMv1r?= =?iso-8859-1?q?0bneRGTBlstMuU+SAvQdGRUIMZOJhuRVSFLcHla6DpMwZmawzcPoTs60GPdC?= =?iso-8859-1?q?iwTazwaIe7OBPkmJwAeAeGnqECE+x0hkeETJE9baZJRJ9/UVYS/iyQkxFV/B?= =?iso-8859-1?q?YjEHwF8KXrkbvJroe5pqfJkLg1RZamt054lG7mHCyOfriTMuNHP1wnTHsUy3?= =?iso-8859-1?q?hM6C7hhr36PiFzXe7LH3KBIzHnqfp1W9WY6P0F366ORrJkGNo9geDwDWNVl/?= =?iso-8859-1?q?lxKpfABn4z5qevhIYtKYpAzrwGcd1vxUughYHBUKeghMVq926MZBaD5aUANu?= =?iso-8859-1?q?NhUDT1gsl2MAUQ6VEz0pUQTJPU8AnlRpWEbmOxsHzb4w2/n4NxLG6WoZM2X9?= =?iso-8859-1?q?CC4hbRsmUX2lczCgFFCWo3ZXLnUgs3LisTJDGDPe0Wql0YJ0Szb0K1KEPDgf?= =?iso-8859-1?q?kt2gh+qG967UJ7clGGiyNQXxmRif4CRx4nP1VEIZVgpnXjnAIxw1FzK92lGi?= =?iso-8859-1?q?LmjGqTWLW202FiHPQzagaueN8UKcW3JisJWsR9DjkxQTC+tVs+4F9GwKN59L?= =?iso-8859-1?q?m6s0y+fP8idZITPmfdfdy+JDnHwLKrMlrAfupoBeD6ku/X0Df918nEhTaFdD?= =?iso-8859-1?q?ztzYE6RDQ64B06W0POoOgeRQM8d1Pg2hWTYWSuYQ9h/J4zkkflXruIXoLo4X?= =?iso-8859-1?q?pbptlH8Iszv4kgy3JlrBKFhhfF7XVcrEk2+U/Qa1KLfJgh2kEC3ebrTE19KD?= =?iso-8859-1?q?qXvEEt9JE6k6+/tLCLuDVCP7WfBajWLn2olrS7OXF30dhAVt0KHIy8ub7Bf+?= =?iso-8859-1?q?dSfJvzmue99r1pWA9FcylPD7OCosSvgfdKBJKFtTmd2r8E8wfKRn/B+NvKVA?= =?iso-8859-1?q?7k2QmfGRuUCjeNRb4ihLDl1++r9vSryZyYlQl0sEDSILe5ErSVmBNEL/k//M?= =?iso-8859-1?q?JNzGaX5Wi05/cIq9PRUqNSccMqK6lAFH9COgR8SyNUFwie8yh/t1LYx039E0?= =?iso-8859-1?q?DVmsEtrF0p6QrXWnVquS+OKcqQ1skQdX+hRM9diDRmSNJRt+Zy4KIx+AXeJP?= =?iso-8859-1?q?xFXB/m4DnDdzxHUCM/eosrYH/MMpdOTDM0ezShxeKXvvnZZ89vWxx1iK/tX6?= =?iso-8859-1?q?Cvg+mvm0e4k0vxaC8Z?= x-microsoft-antispam-prvs: x-forefront-prvs: 0954EE4910 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(136003)(346002)(366004)(39860400002)(189003)(199004)(8676002)(305945005)(97736004)(71190400001)(7736002)(14454004)(81166006)(8936002)(256004)(52116002)(2906002)(81156014)(2501003)(478600001)(6512007)(50226002)(5660300002)(71200400001)(53936002)(68736007)(316002)(54906003)(6486002)(6506007)(6436002)(106356001)(44832011)(86362001)(36756003)(5640700003)(2616005)(486006)(6916009)(186003)(3846002)(476003)(4326008)(25786009)(6116002)(26005)(99286004)(102836004)(2351001)(446003)(11346002)(386003)(105586002)(66066001)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB4917;H:AM6PR04MB4215.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /C6bTEAhdNO9hy2kv8daxTjKLl2NXhGl7JzLz7FGo4xFzO9wnFcwmHV53NswuHkGUA/Kgh82DCnp6cikGX2rTPXVr5TyH26hkfgZCAB4Zvssje1AORRE9xQ7UG4gDxvlaS3GQ1A2PTEsvSNrM3OkAxLiI7gTTc11rsZUwGc1SU9iEKC1rJ05MV274NKupMQeG9mRM3g5SzLxs9S5WwgEBfBNgzZQw1W/grpftrrT+NVnnieAYed+hkzYMNjIBOS+0ZI5FakqQvrZJ7yU70kf6b4ql//7VlkHK6BuRYBt1XPaANAAFqIRlAK0Nva1tpIocvDHdfiv5id4onhPvmM9fpvDrRYTTRZTqJDcGFowXSSbv9ECYd0SoMoU1m0dnMUhXZ6bhVAHlKeMt/o6dZYMWwDnFGNcJSFwLAktE7Yi3r0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc9a5663-8058-4c5a-f6bb-08d697411602 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2019 14:38:28.2280 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4917 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As the domain resource id in the same type may not be continuous, so it's hard to describe all such power domains with current struct imx_sc_pd_range. Adding the optional base for domain name index to address this issue. Then we can add the discrete domains easily later. Cc: Ulf Hansson Cc: Shawn Guo Cc: Sascha Hauer Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: linux-pm@vger.kernel.org Signed-off-by: Dong Aisheng --- drivers/firmware/imx/scu-pd.c | 107 ++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c index d1d39d9..48f49f8 100644 --- a/drivers/firmware/imx/scu-pd.c +++ b/drivers/firmware/imx/scu-pd.c @@ -74,7 +74,10 @@ struct imx_sc_pd_range { char *name; u32 rsrc; u8 num; + + /* add domain index */ bool postfix; + u8 start_from; }; struct imx_sc_pd_soc { @@ -84,71 +87,71 @@ struct imx_sc_pd_soc { static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { /* LSIO SS */ - { "lsio-pwm", IMX_SC_R_PWM_0, 8, true }, - { "lsio-gpio", IMX_SC_R_GPIO_0, 8, true }, - { "lsio-gpt", IMX_SC_R_GPT_0, 5, true }, - { "lsio-kpp", IMX_SC_R_KPP, 1, false }, - { "lsio-fspi", IMX_SC_R_FSPI_0, 2, true }, - { "lsio-mu", IMX_SC_R_MU_0A, 14, true }, + { "lsio-pwm", IMX_SC_R_PWM_0, 8, true, 0 }, + { "lsio-gpio", IMX_SC_R_GPIO_0, 8, true, 0 }, + { "lsio-gpt", IMX_SC_R_GPT_0, 5, true, 0 }, + { "lsio-kpp", IMX_SC_R_KPP, 1, false, 0 }, + { "lsio-fspi", IMX_SC_R_FSPI_0, 2, true, 0 }, + { "lsio-mu", IMX_SC_R_MU_0A, 14, true, 0 }, /* CONN SS */ - { "con-usb", IMX_SC_R_USB_0, 2, true }, - { "con-usb0phy", IMX_SC_R_USB_0_PHY, 1, false }, - { "con-usb2", IMX_SC_R_USB_2, 1, false }, - { "con-usb2phy", IMX_SC_R_USB_2_PHY, 1, false }, - { "con-sdhc", IMX_SC_R_SDHC_0, 3, true }, - { "con-enet", IMX_SC_R_ENET_0, 2, true }, - { "con-nand", IMX_SC_R_NAND, 1, false }, - { "con-mlb", IMX_SC_R_MLB_0, 1, true }, + { "con-usb", IMX_SC_R_USB_0, 2, true, 0 }, + { "con-usb0phy", IMX_SC_R_USB_0_PHY, 1, false, 0 }, + { "con-usb2", IMX_SC_R_USB_2, 1, false, 0 }, + { "con-usb2phy", IMX_SC_R_USB_2_PHY, 1, false, 0 }, + { "con-sdhc", IMX_SC_R_SDHC_0, 3, true, 0 }, + { "con-enet", IMX_SC_R_ENET_0, 2, true, 0 }, + { "con-nand", IMX_SC_R_NAND, 1, false, 0 }, + { "con-mlb", IMX_SC_R_MLB_0, 1, true, 0 }, /* Audio DMA SS */ - { "adma-audio-pll0", IMX_SC_R_AUDIO_PLL_0, 1, false }, - { "adma-audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false }, - { "adma-audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false }, - { "adma-dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true }, - { "adma-dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true }, - { "adma-dma2-ch", IMX_SC_R_DMA_2_CH0, 5, true }, - { "adma-asrc0", IMX_SC_R_ASRC_0, 1, false }, - { "adma-asrc1", IMX_SC_R_ASRC_1, 1, false }, - { "adma-esai0", IMX_SC_R_ESAI_0, 1, false }, - { "adma-spdif0", IMX_SC_R_SPDIF_0, 1, false }, - { "adma-sai", IMX_SC_R_SAI_0, 3, true }, - { "adma-amix", IMX_SC_R_AMIX, 1, false }, - { "adma-mqs0", IMX_SC_R_MQS_0, 1, false }, - { "adma-dsp", IMX_SC_R_DSP, 1, false }, - { "adma-dsp-ram", IMX_SC_R_DSP_RAM, 1, false }, - { "adma-can", IMX_SC_R_CAN_0, 3, true }, - { "adma-ftm", IMX_SC_R_FTM_0, 2, true }, - { "adma-lpi2c", IMX_SC_R_I2C_0, 4, true }, - { "adma-adc", IMX_SC_R_ADC_0, 1, true }, - { "adma-lcd", IMX_SC_R_LCD_0, 1, true }, - { "adma-lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, true }, - { "adma-lpuart", IMX_SC_R_UART_0, 4, true }, - { "adma-lpspi", IMX_SC_R_SPI_0, 4, true }, + { "adma-audio-pll0", IMX_SC_R_AUDIO_PLL_0, 1, false, 0 }, + { "adma-audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false, 0 }, + { "adma-audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false, 0 }, + { "adma-dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true, 0 }, + { "adma-dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true, 0 }, + { "adma-dma2-ch", IMX_SC_R_DMA_2_CH0, 5, true, 0 }, + { "adma-asrc0", IMX_SC_R_ASRC_0, 1, false, 0 }, + { "adma-asrc1", IMX_SC_R_ASRC_1, 1, false, 0 }, + { "adma-esai0", IMX_SC_R_ESAI_0, 1, false, 0 }, + { "adma-spdif0", IMX_SC_R_SPDIF_0, 1, false, 0 }, + { "adma-sai", IMX_SC_R_SAI_0, 3, true, 0 }, + { "adma-amix", IMX_SC_R_AMIX, 1, false, 0 }, + { "adma-mqs0", IMX_SC_R_MQS_0, 1, false, 0 }, + { "adma-dsp", IMX_SC_R_DSP, 1, false, 0 }, + { "adma-dsp-ram", IMX_SC_R_DSP_RAM, 1, false, 0 }, + { "adma-can", IMX_SC_R_CAN_0, 3, true, 0 }, + { "adma-ftm", IMX_SC_R_FTM_0, 2, true, 0 }, + { "adma-lpi2c", IMX_SC_R_I2C_0, 4, true, 0 }, + { "adma-adc", IMX_SC_R_ADC_0, 1, true, 0 }, + { "adma-lcd", IMX_SC_R_LCD_0, 1, true, 0 }, + { "adma-lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, true, 0 }, + { "adma-lpuart", IMX_SC_R_UART_0, 4, true, 0 }, + { "adma-lpspi", IMX_SC_R_SPI_0, 4, true, 0 }, /* VPU SS */ - { "vpu", IMX_SC_R_VPU, 1, false }, - { "vpu-pid", IMX_SC_R_VPU_PID0, 8, true }, - { "vpu-dec0", IMX_SC_R_VPU_DEC_0, 1, false }, - { "vpu-enc0", IMX_SC_R_VPU_ENC_0, 1, false }, + { "vpu", IMX_SC_R_VPU, 1, false, 0 }, + { "vpu-pid", IMX_SC_R_VPU_PID0, 8, true, 0 }, + { "vpu-dec0", IMX_SC_R_VPU_DEC_0, 1, false, 0 }, + { "vpu-enc0", IMX_SC_R_VPU_ENC_0, 1, false, 0 }, /* GPU SS */ - { "gpu0-pid", IMX_SC_R_GPU_0_PID0, 4, true }, + { "gpu0-pid", IMX_SC_R_GPU_0_PID0, 4, true, 0 }, /* HSIO SS */ - { "hsio-pcie-b", IMX_SC_R_PCIE_B, 1, false }, - { "hsio-serdes-1", IMX_SC_R_SERDES_1, 1, false }, - { "hsio-gpio", IMX_SC_R_HSIO_GPIO, 1, false }, + { "hsio-pcie-b", IMX_SC_R_PCIE_B, 1, false, 0 }, + { "hsio-serdes-1", IMX_SC_R_SERDES_1, 1, false, 0 }, + { "hsio-gpio", IMX_SC_R_HSIO_GPIO, 1, false, 0 }, /* MIPI/LVDS SS */ - { "mipi0", IMX_SC_R_MIPI_0, 1, false }, - { "mipi0-pwm0", IMX_SC_R_MIPI_0_PWM_0, 1, false }, - { "mipi0-i2c", IMX_SC_R_MIPI_0_I2C_0, 2, true }, - { "lvds0", IMX_SC_R_LVDS_0, 1, false }, + { "mipi0", IMX_SC_R_MIPI_0, 1, false, 0 }, + { "mipi0-pwm0", IMX_SC_R_MIPI_0_PWM_0, 1, false, 0 }, + { "mipi0-i2c", IMX_SC_R_MIPI_0_I2C_0, 2, true, 0 }, + { "lvds0", IMX_SC_R_LVDS_0, 1, false, 0 }, /* DC SS */ - { "dc0", IMX_SC_R_DC_0, 1, false }, - { "dc0-pll", IMX_SC_R_DC_0_PLL_0, 2, true }, + { "dc0", IMX_SC_R_DC_0, 1, false, 0 }, + { "dc0-pll", IMX_SC_R_DC_0_PLL_0, 2, true, 0 }, }; static const struct imx_sc_pd_soc imx8qxp_scu_pd = { @@ -236,7 +239,7 @@ imx_scu_add_pm_domain(struct device *dev, int idx, if (pd_ranges->postfix) snprintf(sc_pd->name, sizeof(sc_pd->name), - "%s%i", pd_ranges->name, idx); + "%s%i", pd_ranges->name, pd_ranges->start_from + idx); else snprintf(sc_pd->name, sizeof(sc_pd->name), "%s", pd_ranges->name); From patchwork Wed Feb 20 14:38:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10822233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29BD817E9 for ; Wed, 20 Feb 2019 14:40:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 144602E58F for ; Wed, 20 Feb 2019 14:40:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 125A92E5A8; Wed, 20 Feb 2019 14:40:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53A5E2E6BE for ; Wed, 20 Feb 2019 14:40:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726516AbfBTOkZ (ORCPT ); Wed, 20 Feb 2019 09:40:25 -0500 Received: from mail-eopbgr70085.outbound.protection.outlook.com ([40.107.7.85]:14784 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726219AbfBTOkZ (ORCPT ); Wed, 20 Feb 2019 09:40:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rDhpSEnggYlC4rAniuU47I3jqCrYlqv1+iNpmmAMQCU=; b=MVoegQ3YrjtBihRJ0CnhbJB+FpTUAYz8q+tUPtioUXf1EI556UvS4Ae7P8MTy9RGEwq+9btY3QlTkYGcRkjz7t9mkKq6UavySD2hoeAXAG/Aj+dpioxVsx2d/+p0GiRq7qJnipKvi3dUUqIYvNod7XYhDdvNPnVNXSznOkhlkf0= Received: from AM6PR04MB4215.eurprd04.prod.outlook.com (52.135.168.141) by AM6PR04MB4917.eurprd04.prod.outlook.com (20.177.33.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.21; Wed, 20 Feb 2019 14:38:36 +0000 Received: from AM6PR04MB4215.eurprd04.prod.outlook.com ([fe80::e944:6749:3ee6:4e08]) by AM6PR04MB4215.eurprd04.prod.outlook.com ([fe80::e944:6749:3ee6:4e08%5]) with mapi id 15.20.1622.020; Wed, 20 Feb 2019 14:38:36 +0000 From: Aisheng Dong To: "linux-arm-kernel@lists.infradead.org" CC: "dongas86@gmail.com" , "kernel@pengutronix.de" , "shawnguo@kernel.org" , Fabio Estevam , dl-linux-imx , "rjw@rjwysocki.net" , "ulf.hansson@linaro.org" , "khilman@kernel.org" , "linux-pm@vger.kernel.org" , Aisheng Dong Subject: [PATCH 3/3] firmware: imx: scu-pd: decouple the SS information from domain names Thread-Topic: [PATCH 3/3] firmware: imx: scu-pd: decouple the SS information from domain names Thread-Index: AQHUySn2+FLHWnHhe0qpwYe4cxsiAA== Date: Wed, 20 Feb 2019 14:38:36 +0000 Message-ID: <1550673013-21462-4-git-send-email-aisheng.dong@nxp.com> References: <1550673013-21462-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1550673013-21462-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0074.apcprd03.prod.outlook.com (2603:1096:203:72::14) To AM6PR04MB4215.eurprd04.prod.outlook.com (2603:10a6:209:4f::13) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8d49c6de-a761-450d-1255-08d697411897 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB4917; x-ms-traffictypediagnostic: AM6PR04MB4917: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM6PR04MB4917=3B23=3ANB?= =?iso-8859-1?q?RuCZ/yxqn+58FGUJIQYL4GmzZBBHIDV2zmuqf/cAEnZo9hIQeWqxKgI+NUeV?= =?iso-8859-1?q?olwXljrgcmHcvnu8AYn2bltqsJ95kTUyLDekVwY0KHBoQeRvQJgtNP9E3jly?= =?iso-8859-1?q?YemABT0YVnYx97vKTqyUkqERc/6eGxiL6FGGITvKkGSPHJj5JMJR2Pb15DAW?= =?iso-8859-1?q?49PbZ83AqZzQcNBGoZqzkGyo3EE0L3ICUsD3itt5q7Psmih1XbjEKj2MPKzu?= =?iso-8859-1?q?WGrU/L8pasjGL3br7dp8xpNvt1Oe5K5fssQ5nDsLcR81u+cr0arEzVYb9mA0?= =?iso-8859-1?q?2aSW8CEa8bAbxHbzgBcFeeUfRYtAgyX9LZp9t9UnB3CiZAUZlrvmc3FzPNZk?= =?iso-8859-1?q?PuVbw7j5YuoJVKHnAW/YQf1Zi3s7WF+4pr5hdEiJU8248nXDD6ffKsZi/UJP?= =?iso-8859-1?q?PstOHN7vPXoa8tR4JP6zMe3NmNCEwB3CuvHb864FPezCdbaOzGtccWeIw/C+?= =?iso-8859-1?q?Fto6epoKawUJMv1z6DfroTEbBz48dP4u4VffbziUHMmdTtiHyt5dGyBF1kU3?= =?iso-8859-1?q?2qFl+MmCDpnCCA7qK4V+R/puzuGC9HLIOMFQddEZBeiVkkOFnkGePUneGY7F?= =?iso-8859-1?q?cpQM23JiQ4zSuwU5nXNtlTwYdiM+uiLUrB2kUbm/WkKULXBSrfGN77/cTz83?= =?iso-8859-1?q?uKVRrn9nmXNnavOKqTBlsHWGNnG2YwILro/MGC6JQt7UH6r6F/HHDAATIE+4?= =?iso-8859-1?q?H78C13Pe0wa/IVnKsWJdrwNmqD+H6q7hbkAcn4uT/Der0nw21EkPUvIeIWEV?= =?iso-8859-1?q?ZhtI6YTJkfPlDRlVW4vxXWtTpMrxaTiTDfdzacjtGwKUM1M+bndqOJtYeZA4?= =?iso-8859-1?q?ZF05pFrHY3MFrtV59qacmxjW7hSFTpmqMJORoR5wDCro0eX5qOYR7btvYuc4?= =?iso-8859-1?q?UFV1ZO9xE/VEdh0LdhELxe1KeaARwi/OBOYxBRRCkdFdgKdUm5UvK+HHYH+L?= =?iso-8859-1?q?JUuVmZZUPL80KanceHT71AXkoPtlH76IdWp8DQE6bG25xYWdKXaCMd4LdlXe?= =?iso-8859-1?q?HL71NpMIT3Dx3ieFOmEZl1fMf0l7GFK4OA4ZwzIG7tBcUVF6dgjw7HFAtxd+?= =?iso-8859-1?q?rTBNiU/UwA/0bRebu2uxts1WVNwEEeHY975XLvPW1reN5EtTIN2+MGE9dhUu?= =?iso-8859-1?q?PbcHbyNkHsSw7DotlrXUJ17ap40rDfor8B7UZhMDYu5IMSPaEo2yqDG8O+5B?= =?iso-8859-1?q?KYtUOGOLXAZ9JdC5kp19kVbtgUGM3h+cUCMgtNy3tQz7GRtjH53+IjvY2tjB?= =?iso-8859-1?q?2wT5FHBgw1hPbCcCgu?= x-microsoft-antispam-prvs: x-forefront-prvs: 0954EE4910 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(136003)(346002)(366004)(39860400002)(189003)(199004)(8676002)(305945005)(97736004)(71190400001)(7736002)(14454004)(81166006)(8936002)(256004)(52116002)(2906002)(81156014)(2501003)(478600001)(6512007)(50226002)(5660300002)(71200400001)(53936002)(68736007)(316002)(54906003)(6486002)(6506007)(6436002)(106356001)(44832011)(86362001)(36756003)(5640700003)(2616005)(486006)(6916009)(186003)(3846002)(476003)(4326008)(25786009)(6116002)(26005)(99286004)(102836004)(2351001)(446003)(11346002)(386003)(105586002)(66066001)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB4917;H:AM6PR04MB4215.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: kffireKtF0YuodszUh3QrxhnweAXS/5rIemMk8eoI8M62swxREBd/+TM1KUYT8oT39+C5U/YYzpAgqzD5faSK+Zoy/gD0osZINloywuGadPsghgF8kM4YEWsmQE25FIbQ0ygFVozTEpv2J/oRB/ZQZijVmqAuCBorNX0NoBakG6yG1RhT9+yttZ+YhV4ZJAsKv9nO9gJsT0euF/6sLtgG+FLg3fRjzhn2PaswZCKVmIooecJbQOzs/ZUD2bpjjBus8EOR11MmrqmYqFyovoMjAwQb+4MHyd8mW4ouTHb/pP75H5ulr/OlVISVeYk1D0Q0yl+1yHeSrZTJEBSid+UCYnYK001SQpyCZFtbn+kZD39zRyifQkqGdGCUlBavmzZevlvTKC6DpZ0dQ2gZjwjNO/R3MXa/8IHIF+iVNQGd7Q= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d49c6de-a761-450d-1255-08d697411897 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2019 14:38:32.6031 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4917 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As resource power domain service is provided by SCU firmware, no SS information required. So we can remove the SS indicator from the domain names, then the domains defined can be better shared among different SCU based platforms. Cc: Ulf Hansson Cc: Shawn Guo Cc: Sascha Hauer Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: linux-pm@vger.kernel.org Signed-off-by: Dong Aisheng --- drivers/firmware/imx/scu-pd.c | 92 ++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c index 48f49f8..cd745b9 100644 --- a/drivers/firmware/imx/scu-pd.c +++ b/drivers/firmware/imx/scu-pd.c @@ -87,49 +87,51 @@ struct imx_sc_pd_soc { static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { /* LSIO SS */ - { "lsio-pwm", IMX_SC_R_PWM_0, 8, true, 0 }, - { "lsio-gpio", IMX_SC_R_GPIO_0, 8, true, 0 }, - { "lsio-gpt", IMX_SC_R_GPT_0, 5, true, 0 }, - { "lsio-kpp", IMX_SC_R_KPP, 1, false, 0 }, - { "lsio-fspi", IMX_SC_R_FSPI_0, 2, true, 0 }, - { "lsio-mu", IMX_SC_R_MU_0A, 14, true, 0 }, + { "pwm", IMX_SC_R_PWM_0, 8, true, 0 }, + { "gpio", IMX_SC_R_GPIO_0, 8, true, 0 }, + { "gpt", IMX_SC_R_GPT_0, 5, true, 0 }, + { "kpp", IMX_SC_R_KPP, 1, false, 0 }, + { "fspi", IMX_SC_R_FSPI_0, 2, true, 0 }, + { "mu", IMX_SC_R_MU_0A, 14, true, 0 }, /* CONN SS */ - { "con-usb", IMX_SC_R_USB_0, 2, true, 0 }, - { "con-usb0phy", IMX_SC_R_USB_0_PHY, 1, false, 0 }, - { "con-usb2", IMX_SC_R_USB_2, 1, false, 0 }, - { "con-usb2phy", IMX_SC_R_USB_2_PHY, 1, false, 0 }, - { "con-sdhc", IMX_SC_R_SDHC_0, 3, true, 0 }, - { "con-enet", IMX_SC_R_ENET_0, 2, true, 0 }, - { "con-nand", IMX_SC_R_NAND, 1, false, 0 }, - { "con-mlb", IMX_SC_R_MLB_0, 1, true, 0 }, - - /* Audio DMA SS */ - { "adma-audio-pll0", IMX_SC_R_AUDIO_PLL_0, 1, false, 0 }, - { "adma-audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false, 0 }, - { "adma-audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false, 0 }, - { "adma-dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true, 0 }, - { "adma-dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true, 0 }, - { "adma-dma2-ch", IMX_SC_R_DMA_2_CH0, 5, true, 0 }, - { "adma-asrc0", IMX_SC_R_ASRC_0, 1, false, 0 }, - { "adma-asrc1", IMX_SC_R_ASRC_1, 1, false, 0 }, - { "adma-esai0", IMX_SC_R_ESAI_0, 1, false, 0 }, - { "adma-spdif0", IMX_SC_R_SPDIF_0, 1, false, 0 }, - { "adma-sai", IMX_SC_R_SAI_0, 3, true, 0 }, - { "adma-amix", IMX_SC_R_AMIX, 1, false, 0 }, - { "adma-mqs0", IMX_SC_R_MQS_0, 1, false, 0 }, - { "adma-dsp", IMX_SC_R_DSP, 1, false, 0 }, - { "adma-dsp-ram", IMX_SC_R_DSP_RAM, 1, false, 0 }, - { "adma-can", IMX_SC_R_CAN_0, 3, true, 0 }, - { "adma-ftm", IMX_SC_R_FTM_0, 2, true, 0 }, - { "adma-lpi2c", IMX_SC_R_I2C_0, 4, true, 0 }, - { "adma-adc", IMX_SC_R_ADC_0, 1, true, 0 }, - { "adma-lcd", IMX_SC_R_LCD_0, 1, true, 0 }, - { "adma-lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, true, 0 }, - { "adma-lpuart", IMX_SC_R_UART_0, 4, true, 0 }, - { "adma-lpspi", IMX_SC_R_SPI_0, 4, true, 0 }, - - /* VPU SS */ + { "usb", IMX_SC_R_USB_0, 2, true, 0 }, + { "usb0phy", IMX_SC_R_USB_0_PHY, 1, false, 0 }, + { "usb2", IMX_SC_R_USB_2, 1, false, 0 }, + { "usb2phy", IMX_SC_R_USB_2_PHY, 1, false, 0 }, + { "sdhc", IMX_SC_R_SDHC_0, 3, true, 0 }, + { "enet", IMX_SC_R_ENET_0, 2, true, 0 }, + { "nand", IMX_SC_R_NAND, 1, false, 0 }, + { "mlb", IMX_SC_R_MLB_0, 1, true, 0 }, + + /* AUDIO SS */ + { "audio-pll0", IMX_SC_R_AUDIO_PLL_0, 1, false, 0 }, + { "audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false, 0 }, + { "audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false, 0 }, + { "dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true, 0 }, + { "dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true, 0 }, + { "dma2-ch", IMX_SC_R_DMA_2_CH0, 5, 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 }, + { "spdif0", IMX_SC_R_SPDIF_0, 1, false, 0 }, + { "sai", IMX_SC_R_SAI_0, 3, true, 0 }, + { "amix", IMX_SC_R_AMIX, 1, false, 0 }, + { "mqs0", IMX_SC_R_MQS_0, 1, false, 0 }, + { "dsp", IMX_SC_R_DSP, 1, false, 0 }, + { "dsp-ram", IMX_SC_R_DSP_RAM, 1, false, 0 }, + + /* 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 }, + { "adc", IMX_SC_R_ADC_0, 1, 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 }, + { "lpspi", IMX_SC_R_SPI_0, 4, true, 0 }, + + /* VPU SS */ { "vpu", IMX_SC_R_VPU, 1, false, 0 }, { "vpu-pid", IMX_SC_R_VPU_PID0, 8, true, 0 }, { "vpu-dec0", IMX_SC_R_VPU_DEC_0, 1, false, 0 }, @@ -139,14 +141,16 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = { { "gpu0-pid", IMX_SC_R_GPU_0_PID0, 4, true, 0 }, /* HSIO SS */ - { "hsio-pcie-b", IMX_SC_R_PCIE_B, 1, false, 0 }, - { "hsio-serdes-1", IMX_SC_R_SERDES_1, 1, false, 0 }, + { "pcie-b", IMX_SC_R_PCIE_B, 1, false, 0 }, + { "serdes-1", IMX_SC_R_SERDES_1, 1, false, 0 }, { "hsio-gpio", IMX_SC_R_HSIO_GPIO, 1, false, 0 }, - /* MIPI/LVDS SS */ + /* MIPI SS */ { "mipi0", IMX_SC_R_MIPI_0, 1, false, 0 }, { "mipi0-pwm0", IMX_SC_R_MIPI_0_PWM_0, 1, false, 0 }, { "mipi0-i2c", IMX_SC_R_MIPI_0_I2C_0, 2, true, 0 }, + + /* LVDS SS */ { "lvds0", IMX_SC_R_LVDS_0, 1, false, 0 }, /* DC SS */