Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933991AbbHKJ1A (ORCPT ); Tue, 11 Aug 2015 05:27:00 -0400 Received: from mail-bn1bon0135.outbound.protection.outlook.com ([157.56.111.135]:20023 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932079AbbHKJ0z (ORCPT ); Tue, 11 Aug 2015 05:26:55 -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 1/3] ARM: imx6q: Add SPDIF_GCLK clock in clock tree Date: Tue, 11 Aug 2015 17:26:52 +0800 Message-ID: <18281cc1d1229dfe5edaf87163dc4dc140663823.1439284957.git.shengjiu.wang@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD045;1:UDKGERzhma9GJTjAEwN7g6pjbe2pCBA+gbmqvSrT7eycOfetBfzYpopd/u27SEpS7PVaC3cbdocG4NmLkl9dGZqdfcjYfBxqmglap73PfTQl0jYTrtK012zrFUw8IzbK+IRtZUgaicAyZV5AjbFI2Ttcs57S0pWJjoii4YSJHSgdUavPVx5vzjuThKxKth9a4yBDTTF6oj4SwsEMsgY91eb88ledlWekd0TOajb4+iHGS4C/zayhlVVo8V0P9HQ3ecJkN5CoZ8wKW/v1gNi0C3fba/0jqmyZ5w2We6fp7Uk9I/fi6FBvzGBGdZqusWc2kHANmQuKjcKuGDeV3/NQOwgpGPTSRZnvu+77T7cGaMRIZ/nE+ob+s8OH3BQrlEdB X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(189002)(199003)(5001960100002)(5001770100001)(77156002)(5001830100001)(6806004)(118296001)(62966003)(50986999)(4001540100001)(92566002)(2950100001)(36756003)(5001860100001)(5003940100001)(76176999)(97736004)(229853001)(46102003)(19580395003)(50226001)(47776003)(69596002)(105606002)(81156007)(5001920100001)(85426001)(106466001)(2201001)(68736005)(19580405001)(64706001)(104016003)(50466002)(87936001)(48376002)(33646002)(86362001)(189998001)(77096005)(921003)(32563001)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB482;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;BL2PR03MB482;2:E/P48FSVDPKPWanXoz4qJYejPiexKfxrQRbe3dNTX0SgItuYHi1rpZ8ZWSKn4rdxB8OOmab8ff08MEsex7Bvfk0N77+A5xQZVmeEAoCMyf8DQOIFCiGCE0T7GkRCsaVhq6nMbQQvycWXzd769M0/va/A9HQGa+DQHwlAGb0ni2s=;3:+Ckduoonkahryx2KDBWTcAWKbY9gYYN81YTHvH6rKxfKhL1IXZFRvnOf4Vm5lWdAa5gmgWCwdx0nVMORHbfPezRAE8tCPayAeh7tWFtkk4SfOdmssnXiIsULhAOQ+8J3DrjRdSu9E5TetZy/bsHho5W8qGnXZzVNEN6UXCynPPG4Iv9mUgnG8Mo/ZQxzqIw/IFkRL47YwbFsZrsBQp6GOZPwXk/p1LqmYpkVqgfbK7I=;25:oAWbG0MiczpAFkwORBpIW+ABk8F8adiPgmgUTvIDaucLA2tC55OWWxXxdzDzCNQ+GT9tTLF1yXE32zxgjskhtwpDVvUwOJ6E8mwLYorG+yYFVHWqcTFVIbqSs7KjFrLYUoeUI5gCFwtWgb6wvKds6rwgAjcApzPhSEjgJimCJ3IvCL0oFIM7DDk7Y+zVd3meVZWSGkbVXc7X9uZpqePuzALPaNf+oAiCKTS4t0KmFC0elbSbKlKDsgB+41h8Rz2XN0ak+FAzzm1ZlyXEU8JYmw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB482;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB483; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB482;20:AJmxoQe/ZHuWSxabF4naIEq/j3tCUFQfsugobrYXBCHVfpz1DaBchQMSvLAplZkIzqKRM3aKiRVOsSvhaOxDB24ocE9315MfwvpBVVl8iYSYMOoT0FcowC2JgV6ScDLNy1IJqZ1zafPNObbctRMxNjIXFXfzxT2N4F/qhBK9HjOG6aEskzY5omFTtXlou9Vh5rgqq9XNji6hW+Y3Tb1jWL/oyW4ywt1WyRJwFhB64SWds9gKFtU/5vOB0Zlvk1jkVLaijkPiOnpOQBctuxhbktKkHHgWRYma+TX+sfrnkGMXvPBjdm6tyNVELgSVqjOAjOu1TbgzHK0mIwV9xU93/NLpoGmHVMl65otVfEiGZR0=;4:702dVj6dxUyC7j1aKZS6q8wu9jIr1Tp9GbFZvYyy+k6cJ6VwuMSd37e49fK6z2UUomk+3ZCsLEgwnJULMNWluyB9sRfQaGq5usEEmU10nq3bZ1U8COHuGyMXz4Ua5zCs/CUhJXPoi1/w/2L6wwCZoO26kNpGdXP0SaziPZmbZTBrbspFuUQ9rdBcIiUTnumlEXx9kQF28NP9AT2e1XFOLPm2DhPKbCV1dfxs48fwU6unL9oeRtT3pnqButvuKSGJEw1+fNFxRShWnNFBoqa8xOgKY29kXYbdQ/R5RJ3F+f4= 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:BL2PR03MB482;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB482; X-Forefront-PRVS: 066517B35B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB482;23:u13YPJDWE4kWNQXrfxtsPa+MgfHsF/yvPtXYGCxV/C?= =?us-ascii?Q?K0VFcJwQYsHsy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kkYsGeqVo?= =?us-ascii?Q?X/Vc1zel+4+I9xsXv6gxRsnnWzgAM52A2ti3r8mD1/BgU2YJS6wQiZ6BxQSs?= =?us-ascii?Q?/60DBzcLOO0w2FCEBI93toqE3b2pKgM4DBUXtlc+4+4/hFXJS6FQ77oeHhG0?= =?us-ascii?Q?Gab8ZAfWUjNBgea1ir+A/5ODZ4H+5WmwH8nYINqCcYHoQcj3zF+6J4fFBxD6?= =?us-ascii?Q?hQyx7yAcKNSQ9+HEuzu9XVJAqOH4dpxFnDuI4q/nG1BxlD9DXrcQvqLQR8qQ?= =?us-ascii?Q?1WLfNZ8JT7DpnYmYYB0295Nsu6rWTFUbgSxC0VgbwMRmSBWOgP+yMwNusnha?= =?us-ascii?Q?iwcHA6rfpjuIDohlqp5+UYR6d5xiO6w23J/wf8?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB482;5:pOF4VU8vnRVjV1/mau14JrpgoW8geCbWnIKquvDYtsozNvvElh8grRuinOsJa4weBPjK1xWDqPU16LMvpAfsyqBWb4VXcEU96D+NKS8y4x/RQcT3mFYH92B5tar76F7zfcTX4Ci3bTFYFcAz27Al3A==;24:CO206yOcf8kXeZOzK5lxhnfE9vxuUteunFZRlruYgsuy84BvQIcJpS8bE6fOwP0g9ZxAJ/KyLdTmQAzF1XsKm+E57xU0oAwtaSX/TS1hyfU=;20:TYv8S47Ib/qKBGn9Eia1+FvlicadHTBszr5GbIE0AHNQOKuhbTQ4Uzj9ns0UEE7pA4LUb5EuJnw78rq4xA5QhQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2015 09:26:51.4758 (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: BL2PR03MB482 X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB483;2:dbtqaNEVhOOnpAJSrKtVnrOPHS3xVQm7nFEgZauP7zJy4L+9qHaK2IAxus0/6+sj/eFwf62m0Ma4vl95tYfs1DPEdw4PqK7iKuneuQ5TD+vcVUukGWSJ8+BX2buo3dpgkyAI0dRu/FFQm2BrRKtQFm+3Dt3CShqdRmQNWZ7P/jk=;3:g1YC4ild4HU0HvrX3e+AMegNBiiiaqfwtwQ+gA8AepZjTfSH28AuEKVDSxfrweFyKiGCnpdUA4ZN02iGxw82Dcsu9i1+FWsxXbbqwsS/2lRAMsBkQsXFxAZL0e+BISJ49gH+JteABWD1yAMgY2f2/0AyDjLoX3F8qB4MOahLvDHH5fpO6XsXwdPb3DYrFHcVYTyghpEuFvUdPN0Bl4rqqbMRur1ji32m9D9vJLyxafQ=;25:/T57+hFsRLvc+o4OwejsUt0QWZ0oYAMqk9qJP6maNxa/C5ExDR5PgwSMRVME9k1YoMGDDeLHAQNuOWAsg5am301hUWgiNDm8Q5g+ygnLbypyf7PqhBL9wskt1Iwx4jgMtlDEmOnZhj1TbwUuhP45QBgphPQlo1dCPMk6mY0M7nDOKhPklxsWcv2Hz/G0ZUIyXRmTN6Q9xyx+m9y4zwkdmCtcvdGwRew+Jj1qInbm3xt6mXFItSALPOJO6OhDm9bJvrtZBwG+5Xo/7bEAWdi1BA==;23:5xitOnnxiMuuef2fnGdXZRB56bMuaN+LLMloVu0/685spGKP/sWK6eyJqU0Cb1RLtkC1zzEewH1ciHLkJ7O/sWcfRkEE/pmak6LZKCIY02ADPod0gUkEGTspp40qf1+rMGXDyKLPvqEfGXOrgJ53lwB8c7XXPUyQw1MzVfauzI5B83+4Xpd347jgvIeTo/Hv X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3592 Lines: 71 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 cam be fixed. Signed-off-by: Shengjiu Wang --- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- drivers/clk/imx/clk-imx6q.c | 4 +++- include/dt-bindings/clock/imx6qdl-clock.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 03858d7..66913ef 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -218,7 +218,7 @@ dmas = <&sdma 14 18 0>, <&sdma 15 18 0>; dma-names = "rx", "tx"; - clocks = <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_OSC>, + clocks = <&clks IMX6QDL_CLK_SPDIF_GCLK>, <&clks IMX6QDL_CLK_OSC>, <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_DUMMY>, diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c index c507bca..2487cf1 100644 --- a/drivers/clk/imx/clk-imx6q.c +++ b/drivers/clk/imx/clk-imx6q.c @@ -119,6 +119,7 @@ static unsigned int share_count_ssi1; static unsigned int share_count_ssi2; static unsigned int share_count_ssi3; static unsigned int share_count_mipi_core_cfg; +static unsigned int share_count_spdif; static inline int clk_on_imx6q(void) { @@ -453,7 +454,8 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk[IMX6QDL_CLK_SATA] = imx_clk_gate2("sata", "ahb", base + 0x7c, 4); clk[IMX6QDL_CLK_SDMA] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); clk[IMX6QDL_CLK_SPBA] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); - clk[IMX6QDL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14); + clk[IMX6QDL_CLK_SPDIF] = imx_clk_gate2_shared("spdif", "spdif_podf", base + 0x7c, 14, &share_count_spdif); + clk[IMX6QDL_CLK_SPDIF_GCLK] = imx_clk_gate2_shared("spdif_gclk", "ipg", base + 0x7c, 14, &share_count_spdif); clk[IMX6QDL_CLK_SSI1_IPG] = imx_clk_gate2_shared("ssi1_ipg", "ipg", base + 0x7c, 18, &share_count_ssi1); clk[IMX6QDL_CLK_SSI2_IPG] = imx_clk_gate2_shared("ssi2_ipg", "ipg", base + 0x7c, 20, &share_count_ssi2); clk[IMX6QDL_CLK_SSI3_IPG] = imx_clk_gate2_shared("ssi3_ipg", "ipg", base + 0x7c, 22, &share_count_ssi3); diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h index 8780868..bc3ad90 100644 --- a/include/dt-bindings/clock/imx6qdl-clock.h +++ b/include/dt-bindings/clock/imx6qdl-clock.h @@ -251,6 +251,7 @@ #define IMX6QDL_CLK_VIDEO_27M 238 #define IMX6QDL_CLK_MIPI_CORE_CFG 239 #define IMX6QDL_CLK_MIPI_IPG 240 -#define IMX6QDL_CLK_END 241 +#define IMX6QDL_CLK_SPDIF_GCLK 241 +#define IMX6QDL_CLK_END 242 #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_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/