From patchwork Wed Jun 8 14:33:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9164987 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E2A9604DB for ; Wed, 8 Jun 2016 14:56:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A40E27BE5 for ; Wed, 8 Jun 2016 14:56:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DBAC28303; Wed, 8 Jun 2016 14:56:29 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 008CE27BE5 for ; Wed, 8 Jun 2016 14:56:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757129AbcFHOy3 (ORCPT ); Wed, 8 Jun 2016 10:54:29 -0400 Received: from mail-bn1bon0054.outbound.protection.outlook.com ([157.56.111.54]:11053 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757125AbcFHOy0 (ORCPT ); Wed, 8 Jun 2016 10:54:26 -0400 X-Greylist: delayed 885 seconds by postgrey-1.27 at vger.kernel.org; Wed, 08 Jun 2016 10:54:26 EDT Received: from BY2PR03CA064.namprd03.prod.outlook.com (10.141.249.37) by SN1PR0301MB1629.namprd03.prod.outlook.com (10.162.130.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8; Wed, 8 Jun 2016 14:39:47 +0000 Received: from BL2FFO11OLC011.protection.gbl (2a01:111:f400:7c09::148) by BY2PR03CA064.outlook.office365.com (2a01:111:e400:2c5d::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.506.9 via Frontend Transport; Wed, 8 Jun 2016 14:39:47 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=none action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11OLC011.mail.protection.outlook.com (10.173.160.157) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Wed, 8 Jun 2016 14:39:46 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u58EdPaT005456; Wed, 8 Jun 2016 07:39:43 -0700 From: Dong Aisheng To: CC: , , , , , , Subject: [PATCH 07/11] clk: imx6ul: fix pll clock parents Date: Wed, 8 Jun 2016 22:33:36 +0800 Message-ID: <1465396420-27064-7-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465396420-27064-1-git-send-email-aisheng.dong@nxp.com> References: <1465396420-27064-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131098703869726615; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(77096005)(2950100001)(68736007)(2351001)(229853001)(2906002)(5003940100001)(47776003)(106466001)(48376002)(50986999)(8676002)(19580405001)(105606002)(81156014)(8666004)(69596002)(81166006)(110136002)(189998001)(19580395003)(85426001)(76176999)(92566002)(586003)(6806005)(86362001)(36756003)(8936002)(5008740100001)(33646002)(11100500001)(50466002)(104016004)(4326007)(97736004)(87936001)(50226002)(7059030)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB1629; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC011; 1:dmZn8g2XVNgo3vaJczPU9DRttqvRIcVbTC4C49yduZhdkwmPMkyAzd5+5UFUrNHTd+UZx6SOrcHmFkO725kOWoeQVTuofFIa1+M1f3P23Q6jab6BGRbxDxWg321chtsN7AnM7Rged3sOpurbkdlCvVmOxkURj02AX+Wr3up+mvofiwqShnap4At2+RmY4TCb1XrGPlFWPjpDMMG6APDF1yagzDHwG2Wm9oP3SpdkmKZEPa8TLasL3hyoHecj5uvbxYm/gxy7h4tZVmrqzXDsVg6kbdDHIfqR+svxFay0ee61D8DXRZkvrr+KTg3kSwIhsTDka9IEc8Bt2OOL3piWAeKuyqzXCUnfvbnI+lauY3kRMM2mNWNub+NI8luv0f8ZodX/RHHw9OzMAfLR7u4upO3dvCFBlvEzXwzQU9tplFXh1rVkvWFwcVeTSW8RVF6Ink66dbgvrl5ZQRo3JjJ8Bjvr/95ADaggTv5zJ/jgJ8giu0Yn40ZQaEOEVzUqS2WCVgLaRpyM32qlH5jZ2cuJDb/JP7JOHbxJLEtRUK01AvLrn8NTgT7g5iw+JRTNHiQh8BEjQ0jeJj66GITUw4e9uHxDnlbESCXwXYqFKmZJC3emjrFNUdCW1iuqcEVXoAVmayM3qjvq4zzapb2yo+0f1KPwnhFO25h165wd+vaj4BRzIDQ++oGfqbXaMCqED/p6 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 358249cc-97cb-4346-4f97-08d38faabd22 X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1629; 2:xI+kMBffsPNKOLZuvWEoU+cHzKnF/uVtPI3iLg4MzzXXxrU+PTdmO2lmOeXxsA3+Rmc8iJbsdF89dDWp0K+BaZpGbYwl6dv3mtSxBEOqpDxqIf/pKxdyB5WILfS5t9zK8KFhgf5IpUGPRB/pLXPILl6IvBvGCcjJkSM0P7VyG9aJuIc6z018nCoQOp0s3Dqq; 3:LFLtleJklLjQgDxbI/EsXmIPdRNwlLdiEIRhRKs0vR94XqXJouqms4o/q1OSB7Yca174YfmivscJ+DLQRjYNSemMudW2D92bDoHK6jEcL3K/nuI3cvs+vlCN6rJc9nlWR34B5l2fXFOBA+8s7R937qqJvPl902SC8L3WHjNxIexdArjhhuCRP4IOwHLq+IITKeMdd25nPrw7TKd/BGy8qu8NaX0Q7mKYzyCvikUYs+A= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB1629; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1629; 25:da3Yj2pcSTTzwfPuQSJdo7c0tzRmjJ14t4NePf2fBqstUXppIU1h+NYFsbDDkPUtaD17PgdG32GjHPqxkf25a2rtAll8FJ8g7bBuqccDX6duxXrl8+DxgmCAVKWNLgqE9siCrQIuqH4ptrf2HXiuFubHhNnwHNo0lko82r3R2cfbiFofU+rb1JkJr0eCmfnW18n4eJ6RzXJFvZTzDbP+zQ6ctsW0ZcY+iThGrb//KHy0o6aeggXNH7QInbQzkMaMdfMbOgE2bRNXuKHbykKg3pADEGxn66CyE2dDI2VFTJl3zh3VKFp4pzaJBhHOTUb95ISj+3tqSwgXrQ/U0TC64t/g14+WDdWToJ2RBkGLerS8m+SC7XTB628jjyKfSpHsS0+7T0ptx4aQZn1BpH5w0dSaM7htP2U5waZeDycRRkeQDovN7gg3zE5/gYlBIjr6wPDlBLEw8a8HxFNuxk1l4/HCjmNSNLwVQYdGN47g7q8P8PijB5t1BFes7eQmxjEauVvHLVgY6DfJtUowsFaB3Q0hkv/T93oOwGFHa4laCBsohmJbmhAEc5doFO0gUCkoblx+O0jOjR/RWmKxx1PPwLpHpA094N+3zkKtQAPx7pSR4EyT1VosV2/4nDemgpKv5Tk2Vvi4SHKbrpa7YhyEvd07NGxyerPI1TZIcqoQO/jNpmUscuXBQYh6KYM/ax17jliJA9uLyY0q2PtUFDAuqw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13017025)(8121501046)(5005006)(13024025)(13018025)(13023025)(3002001)(10201501046)(6055026); SRVR:SN1PR0301MB1629; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB1629; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1629; 4:zKbLiyqw27EDJUbfZQjoz2AO5GZ9KlUUyKIxKzrbkt7LRh+31Ic0HPT4ph436k12+zvRf5AEtVbsoSe05FXnCAuz9ca4EHYGqOTYw/UVFYc0FjlH25tKK7/ROg6lrjtBL6iGqEXpg54eJSohppJwFCMhhlVreQUh3yKo2cuphNHL/OfoCagQEizt4Tdy3/qKswYrpG39r+oDo14IZFEkHMhpBEzXOaUFAUDHyM702LvkbNQLu11nd1iQnFT24p9kjwXqKpZeysdNLBKPfO06RwpFZoXGyLtWqJR6YkxBKzMPPx+/HALGjZ47wyPeHiEeGBFpiahKq59Qmc2MQp0Op3z4E4zbWcMVmkwzp+Oa+cQ5ekZ/fVA5UTK88HkHvOOdPdJlgZHg5ycO1h8bs7pDRfBdow47jlkZs5esvARbP/RtQHA8+r4youRVaVV4I70orB95DQ0xMMx3DEZ1VTC9pERyVKgKgESNruNTOqda+PpCjw+vl5uadEU+Sn+6iaK6JQ4wroZBGEKG9JTKY7cPjA== X-Forefront-PRVS: 0967749BC1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0301MB1629; 23:6cS6rcLwyla93l9NR5rk3q5ZmMsMnxy6E8knBh6?= =?us-ascii?Q?aEdKASEahq7sJ3i14HRw9/SCeLFUWCLM4xsbHEZtjFO0oNIeyqG01vbYRHXS?= =?us-ascii?Q?614NNjd1wdDAN48+1ZBhomJgiPBeyrV7dScJ56yEpAn3lgpXFLhhG5bo9MUr?= =?us-ascii?Q?SFhNXZyddaYhwK+qGLd3VHuEwj0i7FkrZCraOuDgFBJUv1w2H8u+lFGnovMm?= =?us-ascii?Q?ncQmLs6JwMoN5Ripj9y/rj43dcvfIFHh4JZ6xnioupDe6PRCCgcik5JUuJ4b?= =?us-ascii?Q?w5K14d6LSI2Q5m+3+7B6GPSisQq13hU/+d2zi8zwdcSVOS/c2kuTYsCPxngW?= =?us-ascii?Q?PZf0/e/hNXEsnAznsY2g3JtfTS63SKIZLulV1T6zb7zJidgpKBOLyoxV6dCV?= =?us-ascii?Q?JDfCAFF4q90QGxG+kn898hPOeQ9DT2ytq8I2EwgWc4YIZgSxGablHIu7EO3Z?= =?us-ascii?Q?Fm8Re0HQbBJyuiYPfxQSHlfdWHhPuV5xIoJEXLz6fyicwF0zD495VAo2YS6/?= =?us-ascii?Q?xmTHxIhHF610JVhqQp9ETiAK6fNcfgJ60/q3UVRUXGLoQgEbPg0jaz4mjH6a?= =?us-ascii?Q?6RhxZQMxit5VbN0q1zzXzpFxKGp4bwPBapuHgK6DQwlgOg/J6o7syaKYkdZ5?= =?us-ascii?Q?/vuoEO7ifTFU/gqDrtPOPj+IyL0nDL4TTOB1obsPnXOLxJz56CdH8cNPMNCV?= =?us-ascii?Q?N7jJyXbKMsdNhhsninpwEUhQGFfFIo2p/f9jdH7l0/sP3F4aPM3ny7Sg9EBl?= =?us-ascii?Q?c+4Qndzteem8W51FBFIxu1M4O2/pIUQeTancPkaqjU+8aAOT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nosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2016 14:39:46.7542 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB1629 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pllx_bypass_src mux shouldn't be the parent of pllx clock since it's only valid when when pllx BYPASS bit is set. Thus it is actually one parent of pllx_bypass only. Instead, pllx parent should be fixed to osc according to reference manual. Other plls have the same issue. e.g. before fix, the pll tree is: osc 6 6 24000000 0 0 pll1_bypass_src 0 0 24000000 0 0 pll1 0 0 792000000 0 0 pll1_bypass 0 0 792000000 0 0 pll1_sys 0 0 792000000 0 0 After the fix, it's: osc 6 6 24000000 0 0 pll1 0 0 792000000 0 0 pll1_bypass 0 0 792000000 0 0 pll1_sys 0 0 792000000 0 0 Signed-off-by: Dong Aisheng --- drivers/clk/imx/clk-imx6ul.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c index 67ae3465dd37..bdf4cf807b78 100644 --- a/drivers/clk/imx/clk-imx6ul.c +++ b/drivers/clk/imx/clk-imx6ul.c @@ -130,13 +130,13 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) clks[IMX6UL_PLL6_BYPASS_SRC] = imx_clk_mux("pll6_bypass_src", base + 0xe0, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); clks[IMX6UL_PLL7_BYPASS_SRC] = imx_clk_mux("pll7_bypass_src", base + 0x20, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); - clks[IMX6UL_CLK_PLL1] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1", "pll1_bypass_src", base + 0x00, 0x7f); - clks[IMX6UL_CLK_PLL2] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2", "pll2_bypass_src", base + 0x30, 0x1); - clks[IMX6UL_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3", "pll3_bypass_src", base + 0x10, 0x3); - clks[IMX6UL_CLK_PLL4] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4", "pll4_bypass_src", base + 0x70, 0x7f); - clks[IMX6UL_CLK_PLL5] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5", "pll5_bypass_src", base + 0xa0, 0x7f); - clks[IMX6UL_CLK_PLL6] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6", "pll6_bypass_src", base + 0xe0, 0x3); - clks[IMX6UL_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7", "pll7_bypass_src", base + 0x20, 0x3); + clks[IMX6UL_CLK_PLL1] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1", "osc", base + 0x00, 0x7f); + clks[IMX6UL_CLK_PLL2] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2", "osc", base + 0x30, 0x1); + clks[IMX6UL_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3", "osc", base + 0x10, 0x3); + clks[IMX6UL_CLK_PLL4] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4", "osc", base + 0x70, 0x7f); + clks[IMX6UL_CLK_PLL5] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5", "osc", base + 0xa0, 0x7f); + clks[IMX6UL_CLK_PLL6] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6", "osc", base + 0xe0, 0x3); + clks[IMX6UL_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7", "osc", base + 0x20, 0x3); clks[IMX6UL_PLL1_BYPASS] = imx_clk_mux_flags("pll1_bypass", base + 0x00, 16, 1, pll1_bypass_sels, ARRAY_SIZE(pll1_bypass_sels), CLK_SET_RATE_PARENT); clks[IMX6UL_PLL2_BYPASS] = imx_clk_mux_flags("pll2_bypass", base + 0x30, 16, 1, pll2_bypass_sels, ARRAY_SIZE(pll2_bypass_sels), CLK_SET_RATE_PARENT);