Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp707174ybp; Wed, 9 Oct 2019 03:01:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmA8Wmun5guqX4GIJ50YJPM7yYlhrNW6hie0iBSpTQltIVAq9F+s/dspQIZ8K40Q/FK2NQ X-Received: by 2002:a05:6402:128c:: with SMTP id w12mr2159208edv.284.1570615263986; Wed, 09 Oct 2019 03:01:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570615263; cv=pass; d=google.com; s=arc-20160816; b=Il7S0ivlSwsZpryxGOOD1C3T9ZsmvrofSWUdTRWRkc+UD+tLJ+tT1t1CqpmBzcjAG8 5gKusH72UaE86XCDwRyCOT/40ng9zkHMNvqsMIRpi3/IkXZMDIEEbA5QgHXedq1c+9/y q65Cp4aI6K1jsuupbYQNxM804lkYYkSHOL5gH2zvu8HSBdliBG6zAsqWwOVFVuZVZf39 9/ItRmTA/qak2LiIV+zqyC+VDWoCeNoX0rkC9MOzJk7XcRUW1dW3sEkayKF1+smchkh6 8WhH5+o8zHC/0yaTDs16weBaTSDYgnPt6k5xHnFoSq3Fh41WZ9XLXBtGbstrfInlplEk ZI6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=cx6xQhBeT3miQSSHXDt3BkM19Wlt/qX9j5PSxDmP5Wg=; b=Th+c1Z+q+OjiEgV01CMfIhABaB8HU5N00afbI5OlEWRws7yWZrW0tYLXkaPamnrbkg 9H96TokWw403q68jAUd+ixo9RAVyNGn8hHT9XrguguEUDr2Cp8TFkNhI6xvY6LVEU+6L XxFOeDIadUpEKElTPt7t6yHRIg8Q6Xnh46jUzm4fV8Zz0OMsDMPO8vKXdZOmLdzcW4rs AaeIKTFw94ZvNm+3vfxYDme4uPpijeXUboohi49ezzfQAkpME/8CZLAn6Qwn1PgoTsGF BAUbJEppVEKj8GWFdZUg1Ieop6qN5la5kAGjtl5jVtLKc1P/8Oa5g+AU/DxmFxJ587u4 CaUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=YdXczMdQ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pv13si823317ejb.79.2019.10.09.03.00.39; Wed, 09 Oct 2019 03:01:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=YdXczMdQ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730766AbfJIJ6Y (ORCPT + 99 others); Wed, 9 Oct 2019 05:58:24 -0400 Received: from mail-eopbgr00042.outbound.protection.outlook.com ([40.107.0.42]:59204 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726765AbfJIJ6Y (ORCPT ); Wed, 9 Oct 2019 05:58:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nDvyTiVyzRYesn69J5Wg6XmOlRJilxC0jUQrCI7cv7n2lnlqtiS4puZiF/ByjqqktqmK70bmdEcGrpgMVzyswLOUZlGtWiLo+i8pwhCxKcR8nfvSB7S/BLODpL6nuTd6viJ7meSY3NqnVmUjYs8NUn9CKkW5eNUu/bXbx62efVWaUyO0lUbVQYtggqkD47y3c3RyOVl5RFIC64uPVWClAdQ7Uqz612iyshdEVCHf6NS3hzcGRUe6oWHKwryBwtw2kiZfYRlPYAZ7cpg1E80CJgjdxBy64iLDozzc/Nq208FkxjL46gSNa/QPCOLMBsKi1RFjPfH00+3vk3dWOEwH+w== 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-SenderADCheck; bh=cx6xQhBeT3miQSSHXDt3BkM19Wlt/qX9j5PSxDmP5Wg=; b=J9PkazD6+Kg3bwtQh5PPqmkcvc6s7Wq+cRZpo3lam7IhnuqSrAH6SvZCjedjbjzOf+yWx6t09LbdcKSbun9phJYtE3sFMIrrF98TrtUiXuYehnmXNz3TiekXAQfFmSe8H/DTTUKol6PrEHtJGEyAp8FmjUpqzebCO6UH14hZon4ynL4SCx9dCOxIn3V8kWxPyoykxIBW/5h1ME0OMaOCagcmEcFAk8HLKZDJ9BNXb1cmuQzbB9W78ZVNjLR8m9wqg/cYvaaDEOgBp0FEs0Ih0iwJ75H0g1bCix4zqufAJTIxrWeaWo02HEJvcRSvA0iNYqWKCjZiJzUK2Rk7Ot1ksA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cx6xQhBeT3miQSSHXDt3BkM19Wlt/qX9j5PSxDmP5Wg=; b=YdXczMdQeOPRcfeuvVV2GbMwpIGc9NqptAK5MUf1IoSsNTEul8Wics7UJ7x0Vyu3SKjeU6b3HCsjynmBT9mHxwmTzCG0JqBO8BVgh7BdGfNX+W2g5Ot6kJxw0hXGISTeV+nPleQsPkxIHwzesd4JOAiaNCEyzl+XEglbqMZyIjk= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB4177.eurprd04.prod.outlook.com (52.134.92.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Wed, 9 Oct 2019 09:58:20 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::843c:e722:27cb:74e1]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::843c:e722:27cb:74e1%5]) with mapi id 15.20.2327.026; Wed, 9 Oct 2019 09:58:20 +0000 From: Peng Fan To: "mturquette@baylibre.com" , "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" CC: "kernel@pengutronix.de" , dl-linux-imx , Anson Huang , Jacky Bai , Abel Vesa , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Leonard Crestez , Peng Fan Subject: [PATCH 2/3] clk: imx: imx8mn: mark sys_pll1/2 as fixed clock Thread-Topic: [PATCH 2/3] clk: imx: imx8mn: mark sys_pll1/2 as fixed clock Thread-Index: AQHVfogUuHLKbUNJ2kqpC4SQkCQqqg== Date: Wed, 9 Oct 2019 09:58:19 +0000 Message-ID: <1570614940-17239-2-git-send-email-peng.fan@nxp.com> References: <1570614940-17239-1-git-send-email-peng.fan@nxp.com> In-Reply-To: <1570614940-17239-1-git-send-email-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR01CA0007.apcprd01.prod.exchangelabs.com (2603:1096:203:92::19) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 863e8bd9-88e8-499b-53d7-08d74c9f36a6 x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: AM0PR04MB4177:|AM0PR04MB4177: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2399; x-forefront-prvs: 018577E36E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(189003)(199004)(476003)(64756008)(478600001)(8676002)(14454004)(81166006)(81156014)(4326008)(446003)(11346002)(5660300002)(66556008)(2906002)(36756003)(66446008)(66476007)(256004)(3846002)(186003)(66946007)(486006)(26005)(6116002)(6486002)(2616005)(305945005)(25786009)(7736002)(316002)(110136005)(66066001)(54906003)(2201001)(6436002)(52116002)(99286004)(6512007)(44832011)(50226002)(102836004)(71190400001)(71200400001)(76176011)(8936002)(2501003)(86362001)(386003)(6506007)(32563001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4177;H:AM0PR04MB4481.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: BCL:0; x-microsoft-antispam-message-info: aDUobCPoukW1j5n1XsxFiqOFl0a3gqw1qvZv4NEdEZLYuNeNv9/Zvdub3jFWAGwsoU/NBm00c4RB5xdj0NsNx0+0IxxiShbqdUE3UOo+Htczgv2p8bFK+AfxvtAxhlYikKj9kr5czHY/lPuuD6SrgvbXCez38F9PxZflEvdHabI641AUlGVdSBHyZ0bI5rBallJTR3jPnb0Yra7riET/p2te3+Pn+hl11+4AqtqmZQhuG21dSW58nsicCUdgg+4nX4cAQ6yaapem12eI/90Rz6wtRSAj8qQJrg6lwixToz4RBMclHp979b4hH/p1Gi7rQx3l+ThpTqXNELWt7xNfAfb9UpHRtoAJGmJNsOV8DxeUlqxKbney2+wd9RHtnk3DwiChfObrSAUzZysYxSueUUtvDiudv3aVgGaMEEHiYh0= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 863e8bd9-88e8-499b-53d7-08d74c9f36a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2019 09:58:19.8724 (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: Jt8eKTFlDviLA5f1cmjtaX3VViosV7ZbWTE6QDEZREfQsf1x6e28nQ070vOSf6vUdBlMGrVkj2EEaHxMocoQpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4177 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan According Architecture definition guide, SYS_PLL1 is fixed at 800MHz, SYS_PLL2 is fixed at 1000MHz, so let's use imx_clk_fixed to register the clocks and drop code that could change the rate. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mn.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 7a5590b967d5..28467db10c69 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -47,8 +47,6 @@ static const char * const dram_pll_bypass_sels[] =3D {"dr= am_pll", "dram_pll_ref_se static const char * const gpu_pll_bypass_sels[] =3D {"gpu_pll", "gpu_pll_r= ef_sel", }; static const char * const vpu_pll_bypass_sels[] =3D {"vpu_pll", "vpu_pll_r= ef_sel", }; static const char * const arm_pll_bypass_sels[] =3D {"arm_pll", "arm_pll_r= ef_sel", }; -static const char * const sys_pll1_bypass_sels[] =3D {"sys_pll1", "sys_pll= 1_ref_sel", }; -static const char * const sys_pll2_bypass_sels[] =3D {"sys_pll2", "sys_pll= 2_ref_sel", }; static const char * const sys_pll3_bypass_sels[] =3D {"sys_pll3", "sys_pll= 3_ref_sel", }; =20 static const char * const imx8mn_a53_sels[] =3D {"osc_24m", "arm_pll_out",= "sys_pll2_500m", @@ -336,8 +334,6 @@ static int imx8mn_clocks_probe(struct platform_device *= pdev) clks[IMX8MN_GPU_PLL_REF_SEL] =3D imx_clk_mux("gpu_pll_ref_sel", base + 0x= 64, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); clks[IMX8MN_VPU_PLL_REF_SEL] =3D imx_clk_mux("vpu_pll_ref_sel", base + 0x= 74, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); clks[IMX8MN_ARM_PLL_REF_SEL] =3D imx_clk_mux("arm_pll_ref_sel", base + 0x= 84, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - clks[IMX8MN_SYS_PLL1_REF_SEL] =3D imx_clk_mux("sys_pll1_ref_sel", base + = 0x94, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - clks[IMX8MN_SYS_PLL2_REF_SEL] =3D imx_clk_mux("sys_pll2_ref_sel", base + = 0x104, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); clks[IMX8MN_SYS_PLL3_REF_SEL] =3D imx_clk_mux("sys_pll3_ref_sel", base + = 0x114, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); =20 clks[IMX8MN_AUDIO_PLL1] =3D imx_clk_pll14xx("audio_pll1", "audio_pll1_ref= _sel", base, &imx_1443x_pll); @@ -347,8 +343,8 @@ static int imx8mn_clocks_probe(struct platform_device *= pdev) clks[IMX8MN_GPU_PLL] =3D imx_clk_pll14xx("gpu_pll", "gpu_pll_ref_sel", ba= se + 0x64, &imx_1416x_pll); clks[IMX8MN_VPU_PLL] =3D imx_clk_pll14xx("vpu_pll", "vpu_pll_ref_sel", ba= se + 0x74, &imx_1416x_pll); clks[IMX8MN_ARM_PLL] =3D imx_clk_pll14xx("arm_pll", "arm_pll_ref_sel", ba= se + 0x84, &imx_1416x_pll); - clks[IMX8MN_SYS_PLL1] =3D imx_clk_pll14xx("sys_pll1", "sys_pll1_ref_sel",= base + 0x94, &imx_1416x_pll); - clks[IMX8MN_SYS_PLL2] =3D imx_clk_pll14xx("sys_pll2", "sys_pll2_ref_sel",= base + 0x104, &imx_1416x_pll); + clks[IMX8MN_SYS_PLL1] =3D imx_clk_fixed("sys_pll1", 800000000); + clks[IMX8MN_SYS_PLL2] =3D imx_clk_fixed("sys_pll2", 1000000000); clks[IMX8MN_SYS_PLL3] =3D imx_clk_pll14xx("sys_pll3", "sys_pll3_ref_sel",= base + 0x114, &imx_1416x_pll); =20 /* PLL bypass out */ @@ -359,8 +355,6 @@ static int imx8mn_clocks_probe(struct platform_device *= pdev) clks[IMX8MN_GPU_PLL_BYPASS] =3D imx_clk_mux_flags("gpu_pll_bypass", base = + 0x64, 28, 1, gpu_pll_bypass_sels, ARRAY_SIZE(gpu_pll_bypass_sels), CLK_SE= T_RATE_PARENT); clks[IMX8MN_VPU_PLL_BYPASS] =3D imx_clk_mux_flags("vpu_pll_bypass", base = + 0x74, 28, 1, vpu_pll_bypass_sels, ARRAY_SIZE(vpu_pll_bypass_sels), CLK_SE= T_RATE_PARENT); clks[IMX8MN_ARM_PLL_BYPASS] =3D imx_clk_mux_flags("arm_pll_bypass", base = + 0x84, 28, 1, arm_pll_bypass_sels, ARRAY_SIZE(arm_pll_bypass_sels), CLK_SE= T_RATE_PARENT); - clks[IMX8MN_SYS_PLL1_BYPASS] =3D imx_clk_mux_flags("sys_pll1_bypass", bas= e + 0x94, 28, 1, sys_pll1_bypass_sels, ARRAY_SIZE(sys_pll1_bypass_sels), CL= K_SET_RATE_PARENT); - clks[IMX8MN_SYS_PLL2_BYPASS] =3D imx_clk_mux_flags("sys_pll2_bypass", bas= e + 0x104, 28, 1, sys_pll2_bypass_sels, ARRAY_SIZE(sys_pll2_bypass_sels), C= LK_SET_RATE_PARENT); clks[IMX8MN_SYS_PLL3_BYPASS] =3D imx_clk_mux_flags("sys_pll3_bypass", bas= e + 0x114, 28, 1, sys_pll3_bypass_sels, ARRAY_SIZE(sys_pll3_bypass_sels), C= LK_SET_RATE_PARENT); =20 /* PLL out gate */ @@ -371,8 +365,8 @@ static int imx8mn_clocks_probe(struct platform_device *= pdev) clks[IMX8MN_GPU_PLL_OUT] =3D imx_clk_gate("gpu_pll_out", "gpu_pll_bypass"= , base + 0x64, 11); clks[IMX8MN_VPU_PLL_OUT] =3D imx_clk_gate("vpu_pll_out", "vpu_pll_bypass"= , base + 0x74, 11); clks[IMX8MN_ARM_PLL_OUT] =3D imx_clk_gate("arm_pll_out", "arm_pll_bypass"= , base + 0x84, 11); - clks[IMX8MN_SYS_PLL1_OUT] =3D imx_clk_gate("sys_pll1_out", "sys_pll1_bypa= ss", base + 0x94, 11); - clks[IMX8MN_SYS_PLL2_OUT] =3D imx_clk_gate("sys_pll2_out", "sys_pll2_bypa= ss", base + 0x104, 11); + clks[IMX8MN_SYS_PLL1_OUT] =3D imx_clk_gate("sys_pll1_out", "sys_pll1", ba= se + 0x94, 11); + clks[IMX8MN_SYS_PLL2_OUT] =3D imx_clk_gate("sys_pll2_out", "sys_pll2", ba= se + 0x104, 11); clks[IMX8MN_SYS_PLL3_OUT] =3D imx_clk_gate("sys_pll3_out", "sys_pll3_bypa= ss", base + 0x114, 11); =20 /* SYS PLL fixed output */ --=20 2.16.4