Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp691154ybi; Fri, 14 Jun 2019 01:36:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrM48PIsseEGTn2WHbxKUyxPQqCElfmpzNhJNABnQmc+dSmaZ7esYUAGx+eXUWaH8n2eNC X-Received: by 2002:a17:902:b682:: with SMTP id c2mr93359995pls.9.1560501412551; Fri, 14 Jun 2019 01:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560501412; cv=none; d=google.com; s=arc-20160816; b=VVNHjf67LArKaOwqD4V8S9uqQFLkR5vbktv4yv/MkInZGJu/SdLrhPWMm+Ml5ln/40 CsLbKS37D+vznXJALxLWIDDiqVfLDX1P9RctzomUwszIQrX/K1x65eEf9YB1IrDdW11X 4kzIpJjYfftRsF+rMKCUqn9m4cH0Mf2pqIPB5JxC8n+PVhhrUm8FfdTRrgMmu1eORvwy EynCQrZ04xPBehxurE6QyLUpP+Z32OgT38oGP9WiQyTctPKlRwBRE82CL1EypwjZ/Yj6 oXfuEBrbT4w6ALKypvTEpQZHLSaqOAzKkD/6PD5FgJEiOQCtnij4kxn39xnNN+FMfWkE KR3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=NWx0tnF9HpECA9yV3tnGvcOYo0fkIvcF2+TKH5stGjw=; b=o+CRxRY2DjceHKYFN7wkjAjRHHYerdt48w69Ltn2mSbT4GcXsYJCHsw5pN/2ksAwGF d2e4rnfyI6Jv1njTB+c+uD4VrX0THF1x9aTyzNqXEBLIpN06/PbJOqB8XANimVA+aeip RaRxSa8EldPP/Osk/SGQLLM/s/UVxo0XpH8/oY4gjTftB22bMgShQqdRSXgnBJKIFHBY ToYYBXBSTF/ZIaYzlipClTmBa3vk8i2U49DayD0HvCUPg4yQ5EAAEH5Bd8GGqfMNT0HH jz1u/OIDr/bKzZeqBHJDx4nsGWd0C7Ut00HqLqvq4MHxwVZNzc65W4nlAdIoMafX/arw X05g== ARC-Authentication-Results: i=1; mx.google.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=fail (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 64si1696049ply.399.2019.06.14.01.36.37; Fri, 14 Jun 2019 01:36:52 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726879AbfFNIgX (ORCPT + 99 others); Fri, 14 Jun 2019 04:36:23 -0400 Received: from inva020.nxp.com ([92.121.34.13]:59258 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbfFNIgV (ORCPT ); Fri, 14 Jun 2019 04:36:21 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CD78D1A05E9; Fri, 14 Jun 2019 10:36:19 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 544B21A05C7; Fri, 14 Jun 2019 10:36:07 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E810B4029F; Fri, 14 Jun 2019 16:35:53 +0800 (SGT) From: Anson.Huang@nxp.com To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will.deacon@arm.com, maxime.ripard@bootlin.com, horms+renesas@verge.net.au, olof@lixom.net, jagan@amarulasolutions.com, bjorn.andersson@linaro.org, leonard.crestez@nxp.com, dinguyen@kernel.org, enric.balletbo@collabora.com, aisheng.dong@nxp.com, ping.bai@nxp.com, abel.vesa@nxp.com, l.stach@pengutronix.de, peng.fan@nxp.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V5 2/5] clk: imx8mm: Make 1416X/1443X PLL macro definitions common for usage Date: Fri, 14 Jun 2019 16:37:44 +0800 Message-Id: <20190614083747.28762-2-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190614083747.28762-1-Anson.Huang@nxp.com> References: <20190614083747.28762-1-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang 1416X/1443X PLL are used on i.MX8MM and i.MX8MN and maybe other i.MX8M series SoC later, the macro definitions of these PLLs' initialization should be common for usage. Signed-off-by: Anson Huang --- No changes. --- drivers/clk/imx/clk-imx8mm.c | 17 ----------------- drivers/clk/imx/clk.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index 6b8e75d..43fa9c3 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -26,23 +26,6 @@ static u32 share_count_dcss; static u32 share_count_pdm; static u32 share_count_nand; -#define PLL_1416X_RATE(_rate, _m, _p, _s) \ - { \ - .rate = (_rate), \ - .mdiv = (_m), \ - .pdiv = (_p), \ - .sdiv = (_s), \ - } - -#define PLL_1443X_RATE(_rate, _m, _p, _s, _k) \ - { \ - .rate = (_rate), \ - .mdiv = (_m), \ - .pdiv = (_p), \ - .sdiv = (_s), \ - .kdiv = (_k), \ - } - static const struct imx_pll14xx_rate_table imx8mm_pll1416x_tbl[] = { PLL_1416X_RATE(1800000000U, 225, 3, 0), PLL_1416X_RATE(1600000000U, 200, 3, 0), diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index d94d9cb..19d7b8b 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -153,6 +153,23 @@ enum imx_pllv3_type { struct clk_hw *imx_clk_hw_pllv3(enum imx_pllv3_type type, const char *name, const char *parent_name, void __iomem *base, u32 div_mask); +#define PLL_1416X_RATE(_rate, _m, _p, _s) \ + { \ + .rate = (_rate), \ + .mdiv = (_m), \ + .pdiv = (_p), \ + .sdiv = (_s), \ + } + +#define PLL_1443X_RATE(_rate, _m, _p, _s, _k) \ + { \ + .rate = (_rate), \ + .mdiv = (_m), \ + .pdiv = (_p), \ + .sdiv = (_s), \ + .kdiv = (_k), \ + } + struct clk_hw *imx_clk_pllv4(const char *name, const char *parent_name, void __iomem *base); -- 2.7.4