Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp286651ybi; Tue, 18 Jun 2019 22:52:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+WXo4ks94kBe7QHuQS+zW5O9K1v4Yo8rwDcwymHud01yqLHKq9dVZkxqQUVlv7mG7hRzD X-Received: by 2002:a63:455c:: with SMTP id u28mr6340216pgk.416.1560923534065; Tue, 18 Jun 2019 22:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560923534; cv=none; d=google.com; s=arc-20160816; b=d7Fk8Z3cm9DWedKlewmw6HvfanhaFtbIToiyif1F4sT1BrSX4vaF3w8JHghSn5m/Ei 3uIcqNreOEV/yqP3AKwtkeqcHlvSzJgD4iLP5l/nurCkatYdm2ef9Lcs+eB4+mBMDEOu NnJhFUAcGNyZSRs8vOZJj2LVRTuYVMxKx6N95sR55awi65iczS5uAIT/IqrQcGBk00AB erOGbuVCROHLGgHaPHcrymDfynTk4c6xgbWysqyX4TW4TiG8y8sLLv8ZTy3vfUKJUlEx QZB8nzgcfeEe7pESiE3+N66bOyvxdrs40JA2Sl+ofLcl+a/PkKceXX49YIha+qHa7Psm VyEg== 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=c7H8Dg4IEuRoWKrpOP2CY8y6FxL3n0uPtWOaIi6P5YGUsHFfT3UGQfF7IsWneMOgjW PAtJDc2KUl8iLJH9nKGJGB7YEeqp4+MMYBoPk6OKj0wBapDivZ2cTUKZUGNBp5fpCW0k AAhRXn6xWkxJ/tJVXLsg7PPsmAaig/1I2PRdXSSeoqvTFxetvASFIfrWPknS9aBLjU8y EjN8KJIdgRpEmj++KtRCYVjAaIMav8fDUTgYa8JQXbfBrZQDYbB3Ls9T+S/B0QMJQ+Gr e5KKd4i/IVpAuxmq8eC+HAYidPw1U9qKwql4JODLpdDRHABHBQsq1TIqjbJi+3Ajt5Gb supw== 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 g10si2209042pgh.472.2019.06.18.22.51.58; Tue, 18 Jun 2019 22:52:14 -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 S1730899AbfFSFv0 (ORCPT + 99 others); Wed, 19 Jun 2019 01:51:26 -0400 Received: from inva021.nxp.com ([92.121.34.21]:47436 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbfFSFvX (ORCPT ); Wed, 19 Jun 2019 01:51:23 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 80763200E3F; Wed, 19 Jun 2019 07:51:21 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 32330200166; Wed, 19 Jun 2019 07:51:09 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id AC33E402F2; Wed, 19 Jun 2019 13:50:54 +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, olof@lixom.net, horms+renesas@verge.net.au, jagan@amarulasolutions.com, leonard.crestez@nxp.com, bjorn.andersson@linaro.org, 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: Wed, 19 Jun 2019 13:52:44 +0800 Message-Id: <20190619055247.35771-2-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190619055247.35771-1-Anson.Huang@nxp.com> References: <20190619055247.35771-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