Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4844525ybi; Mon, 3 Jun 2019 18:59:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIW9Bn8hBW9di/CwEon0QtbhhI96QqVXn9BufJJiUWl/YDUg8H3O21pNzWHhNAOvk40ktH X-Received: by 2002:a63:9548:: with SMTP id t8mr32229443pgn.256.1559613576221; Mon, 03 Jun 2019 18:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559613576; cv=none; d=google.com; s=arc-20160816; b=PMBIcWpqCE1YJ1PF/n8wASW2xDhRysRhZBgzxkp2gtIG6ZCXb767cDyvbjhAAksEqa gM6o0bfmEH3re9yzwY0P/33KPTGfeNKRs6O01dOd6MTD5dJZ9A942r4BSOZKlsjPqxwN DVQW5jBhtu4MbRaYWX9XZi7No6rr00w6dEzLOEdMNAmapfHLvXQiPZc2QqIEyFqJjnlm 7HbIzgeFF4JEyzAOYoQ/67POAYVtY2Lo5TvUFdLM/C+dryNTqSsQ3j54Rf+v7leXAbXa qbxERWqppaNRIK3LyTuW1uOe4dCzleHdDWqyrvWhOyzHyLG2pO/JTQr9NpmPcAosRFRU xpAw== 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=fq2Id6BXeTQkixjl18zk8W9ezihJxvMQb81BzfFPNOA=; b=A8XiCqes7zY9cd8arYeM0lYl8wtKtCMysqBLSI/P+vgPtRDkev33FJF9KIBF51gxKX dCqcsB0/+UOhLkrthSKM/L1wMQNpph3CjtL3jvqaqpCU//uC0Glhkj3mVtR5fceK3Ji7 SFZTcjSWshqm72jKA/mYdIdNGjy695hP1ZNiSL+w9eRG5cmbepjvFowpMu1pjgKK4Qnq 9jI41bV+4qbYfF4OaIQl/Gq9g798WcFYfhEr1W54AdRT2aBUD5+1vbr9A7i/he/auzfq Me07OkNz6ir3Rl3Hn4rgoN2CRTgqEoe6doElRNv3s9w8bvdEH0YTBZPVUevadrIX0pe9 QMYw== 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 n8si15412891plk.272.2019.06.03.18.59.16; Mon, 03 Jun 2019 18:59:36 -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 S1726399AbfFDB6C (ORCPT + 99 others); Mon, 3 Jun 2019 21:58:02 -0400 Received: from inva020.nxp.com ([92.121.34.13]:50952 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726076AbfFDB6C (ORCPT ); Mon, 3 Jun 2019 21:58:02 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C6B991A0592; Tue, 4 Jun 2019 03:57:59 +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 750431A0583; Tue, 4 Jun 2019 03:57:48 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id B89A7402D8; Tue, 4 Jun 2019 09:57:34 +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, 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, 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 V3 2/4] clk: imx8mm: Make 1416X/1443X PLL macro definitions common for usage Date: Tue, 4 Jun 2019 09:59:26 +0800 Message-Id: <20190604015928.23157-2-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604015928.23157-1-Anson.Huang@nxp.com> References: <20190604015928.23157-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 --- New patch. --- 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 eb9fcf0..fecb3b2 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 6dcdc91..ac8c4ae 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -81,6 +81,23 @@ enum imx_pllv3_type { IMX_PLLV3_AV_IMX7, }; +#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 *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, const char *parent_name, void __iomem *base, u32 div_mask); -- 2.7.4