Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934018AbbHKJ1K (ORCPT ); Tue, 11 Aug 2015 05:27:10 -0400 Received: from mail-bn1on0112.outbound.protection.outlook.com ([157.56.110.112]:33520 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932079AbbHKJ1D (ORCPT ); Tue, 11 Aug 2015 05:27:03 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; From: Shengjiu Wang To: , , , , , , , , , CC: , , , Subject: [PATCH V1 3/3] ARM: imx6sx: Add SPDIF_GCLK clock in clock tree Date: Tue, 11 Aug 2015 17:26:54 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD032;1:n2mzoy8+DbrcgcMOSU7hE/dkgUgQx3+Ub0+6Jg9kXzaj8KJWIh1FnOtNxPMftH7g6oUu2RQxvikW5W07ilhsD2rmmJAjB+dzzWrH776bLhMSb1WRwLxs/SeU7piu+2Lxou1suLU9KmfFBua86Qh2/OmdkunLSxempNM7dNYsTcZrUKq9UM8vij72ACpwGfhhCrD5ZuTyGdj/2RlWq63FfxkiUnEpKS7/T1FgMBOfgMZnOfov2v14D7YpUJND8QfnMvTy3kmS1Hp9Mcyg4yAF66kQTJW48o4jadUmTjw6MerumvbdhLIXzfbXoB27s0158YAHs25krjRhCmtFiNNFCqVKnqGlM/R2HEj6hSpsVKoyEDJVldrlJjRPJXVoaN09 X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(3050300001)(189002)(199003)(77096005)(46102003)(69596002)(48376002)(50466002)(86362001)(189998001)(19580395003)(33646002)(68736005)(6806004)(104016003)(2201001)(5001770100001)(81156007)(5003940100001)(97736004)(229853001)(19580405001)(87936001)(105606002)(5001830100001)(106466001)(5001960100002)(5001860100001)(36756003)(76176999)(92566002)(85426001)(4001540100001)(62966003)(77156002)(64706001)(47776003)(50226001)(2950100001)(50986999)(118296001)(921003)(32563001)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR03MB494;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB494;2:GY2k8crj06W/acRQ3Jpa8pLkQAYc0R/QdvKte52Z9CCnAhIZxPMhrBBCgOpiDGs21ivHGDabzI24NjQF/5UQGeYjpiQJ8L89tmII4565dq/fPSrX/Lwa/kkeq00fpuUgcRuUnYNFXVQfCOMVFgmLyIko3uY5p+sYJ0G2M7p4Dm8=;3:5C1W36PCQnhVBPsWZZaWVVX+KYd235E0ZLAdMeVIQ25eVLk8fvW2zl7UtKUqbaTMXj1qW6Gesq9OcGjuk9HzxpP5CCmmo03h9Q3Z+dWK6DJZZA61gkqwKlbyNpKjWDY/0WwEQapvYZ3XX83yyKp9tEzLMATxXuPZP6fB3dv8tAN8MMxZvMiSmMV0KpuHEJiyHtgwvlLblcoORRtpD8LQakh9KWsvi4U1H1zZTXk+Zsg=;25:5ros6DJyOhIzYM7QCdoM7DHjMleZoyDT8zGV39c5HX07j3TQedYmyn07ib3SgX6+c1fQHCQpLkZsW/E0feVg6dUswtjZ1Eb+81bm53hbfZxk1i8gRylGZz1nEz2UvTpesuDIreWXsN1UGX9ovGu4YRzkZoCJY84dm5hs7LrtgZUHuCpgc2qZ8chO/yYs2onq3XR1AM6VSIqCd1P/HswwFw8V1nRYvDP/W+FrNwU4A1xzQPogivLeBEMwU78VHN8sqoB/wITvA6cSGkkA25273A== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB494; X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB494;20:NXVgMN7FybEvXI4L8q5epFtAlPxNm5v3RfMAgkKxOk2Tuh/3fvB91GDimETYjoZlk5dZeMQRp88Ee00OK90zc7FpUW/giGdt0fzmYVk9GxBxFH0M39uH/wABAbkDV+BNNiGn6GiqRBcwo6ct9te0FxKgy8PcAu2ynvIwJH5541cAzs3Xv46yWGWAtRllq+qY/PUH+AEq8eZD8g+s7pZwWksU4jdij2bj+lcAnUB+DhCI6c29NIxRL7i0yo1nkivKXlt/5F49m2e/0vDGk6zn7iONKQaS6/SlTzidVwszHpBS6tCdvix12XWg7KFoNJZn+6OqHK9/BtGHX8sMruHOUr8BF9YJ3+eQJlP7g+BxPtM=;4:9sxwDYQ2B3iOrRVlpBMklBdDyiQnyAbU60h4TzmsZN4qKda2wRGVUd2id1sqlW1V8sQccEKRGWbWTS030Cl5PkdMfzes3bTiCuaahAaRuqj1toHuC1P7OO36m8+tiIDsrLAA21yEWSRTL13oqFbPuNqmNGymW2VJJrul7y6kMaBiH5/oHyhgCLX/smy42aFqLf1b/aJLUPYZ3TnPGFNDdOhAj1hj4AXwCz6xbHuOrGhDtPGyt4dq01GpjuMAj8UlDQHVwKsvrweAu3249k6OztsyNOBn2Bze7UJe05++o/k= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DM2PR03MB494;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB494; X-Forefront-PRVS: 066517B35B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR03MB494;23:1xZGSvT+vRqiz2Q99PoRA3rSHC97dBiYlAV0oT0Q3M?= =?us-ascii?Q?RPHTjgcJIkXKjshlV/zSvK9OClUL8TrXDbOCV/VefPyp9/NPFYgMKPhMI5bm?= =?us-ascii?Q?4nfiODgI9n2DvYcUk3S26hGU3dp58XfdBeNnz4RXXJbFd3sxkYxK2501OX/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o2Bt9ulfjny0yG582H4bRkaDFmJce3?= =?us-ascii?Q?ohgwaiTREN/vzAReoq2eOeWsI6toCxT31IILhA7HPXh9nHegG1xFF7ZbAAJL?= =?us-ascii?Q?3hEHagbSifce/a4z8HI9CKgZhTk8GsLMCUZHiVdjj4sKGEn+j8oowCH2clgZ?= =?us-ascii?Q?6BTZxu3wjpNw5458bhrm9RXzn9ksaWZYCDVe6RcO/Eq9BgAI0/NAkTiCbHLQ?= =?us-ascii?Q?OhokGQVmOREKJGOP0=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB494;5:le2DMDP6VMnxGOdhGexiqwpVnArueoslFKE20iTNdN0bqdBvGAWi9pysWmAe7wqNMts7XbXK1vD9z8KWm1wYwkDqmVBCR+ahqafof8fabxffAU1gmVikQ1IRDvIjJgMAt78bhyZ2EpKJ5MVcMHv0qw==;24:T9K1H1hAejoxKHYJqa1GaWQqo3dVn2RKw5b8pT7yqVkh+cb79zUFVYUdLIC/irEk8cQeYf0G8y4E9FMjxlcxyk762oSPJrHjprpA837AMXc=;20:WRswiNrbjb4l5317kDUGJB7Pp6SsJq5cz1WQ+sBvxGGMSZex0okZDUPqV6ry1aZ01mH7gU4WKoPGeyoWV5EgIQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2015 09:26:59.0187 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB494 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2984 Lines: 61 As spdif driver will register SPDIF clock to regmap, regmap will do clk_prepare in init function, so SPDIF clock is prepared in probe, then its root clock (pll clock) is prepared also, which cause the arm can't enter low power mode. Add SPDIF_GCLK in clock tree which share same gate bits with SPDIF clock. Its root clock is ipg clock, and register it to regmap, then the issue can be fixed. Signed-off-by: Shengjiu Wang --- arch/arm/boot/dts/imx6sx.dtsi | 2 +- drivers/clk/imx/clk-imx6sx.c | 1 + include/dt-bindings/clock/imx6sx-clock.h | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index e391d63..af9c28e 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -211,7 +211,7 @@ dmas = <&sdma 14 18 0>, <&sdma 15 18 0>; dma-names = "rx", "tx"; - clocks = <&clks IMX6SX_CLK_SPDIF>, + clocks = <&clks IMX6SX_CLK_SPDIF_GCLK>, <&clks IMX6SX_CLK_OSC>, <&clks IMX6SX_CLK_SPDIF>, <&clks 0>, <&clks 0>, <&clks 0>, diff --git a/drivers/clk/imx/clk-imx6sx.c b/drivers/clk/imx/clk-imx6sx.c index 5b95c2c..f2bc511 100644 --- a/drivers/clk/imx/clk-imx6sx.c +++ b/drivers/clk/imx/clk-imx6sx.c @@ -454,6 +454,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) clks[IMX6SX_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); clks[IMX6SX_CLK_AUDIO] = imx_clk_gate2_shared("audio", "audio_podf", base + 0x7c, 14, &share_count_audio); clks[IMX6SX_CLK_SPDIF] = imx_clk_gate2_shared("spdif", "spdif_podf", base + 0x7c, 14, &share_count_audio); + clks[IMX6SX_CLK_SPDIF_GCLK] = imx_clk_gate2_shared("spdif_gclk", "ipg", base + 0x7c, 14, &share_count_audio); clks[IMX6SX_CLK_SSI1_IPG] = imx_clk_gate2_shared("ssi1_ipg", "ipg", base + 0x7c, 18, &share_count_ssi1); clks[IMX6SX_CLK_SSI2_IPG] = imx_clk_gate2_shared("ssi2_ipg", "ipg", base + 0x7c, 20, &share_count_ssi2); clks[IMX6SX_CLK_SSI3_IPG] = imx_clk_gate2_shared("ssi3_ipg", "ipg", base + 0x7c, 22, &share_count_ssi3); diff --git a/include/dt-bindings/clock/imx6sx-clock.h b/include/dt-bindings/clock/imx6sx-clock.h index 9957091..36f0324 100644 --- a/include/dt-bindings/clock/imx6sx-clock.h +++ b/include/dt-bindings/clock/imx6sx-clock.h @@ -274,6 +274,7 @@ #define IMX6SX_PLL5_BYPASS 261 #define IMX6SX_PLL6_BYPASS 262 #define IMX6SX_PLL7_BYPASS 263 -#define IMX6SX_CLK_CLK_END 264 +#define IMX6SX_CLK_SPDIF_GCLK 264 +#define IMX6SX_CLK_CLK_END 265 #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */ -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/