From patchwork Mon Jan 28 18:04:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156817 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3719674jaa; Mon, 28 Jan 2019 10:05:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN7tV398UoS8WbYg0JV9O0o3YinFY/c31woN7SFYrVHUthaj/6uV9KKWJptMNrCdJNhBJh7r X-Received: by 2002:a65:6094:: with SMTP id t20mr20520916pgu.285.1548698701022; Mon, 28 Jan 2019 10:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698701; cv=none; d=google.com; s=arc-20160816; b=gB0hPO35LPjcHx9XhKCVyeK2ES1fPDRG7uJnOnFl8cyaqPkFXdW9pMR+4H3kFWYuK4 M33WYLbZ2I7ZI705lPrUUdEIKlv3k+zsMHhX1Cm6N5v4ymG4xKr8eGVKixpQnJqZPaV+ sTWcTshVPohAppmNAcVkwd3ocXjn0nsJNSkp18cIf7eeP5y/K/AZkId0KT6kCkONnaE9 PHsDPqWDpAurTFma4ZEgC1sDKLTOfn3ZK6Qya6nV4UMFlSVmZ5GdS5cIdK/J8TG8ZT3Y ssWCnO7ARO54uvPSEN/NcNfAnezt5IyMOSS8b3Nvr1HYqYHvqg6ZrT5qFx32vsOWhIvp zcDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nbXfyjfqzqGpHsSm+wGVBTSI4vzKOQ2CLwSheFxJ0pY=; b=MIsHpigNSNlg2A4cJ9kCqUuj08JrCtbsTttA5wO0yiFKYs0DLqjIFgUPIp/yrEAW5N 1Nwnfml/ADJ3WWc10nxImFfPXeTi3nBkN+xI69NpsZSbTmzGdnYiE7QXHVue1K4jd4Gp Kvk7Jjllxr+iIgf5TjznBchTUaSDks8emLFIpJe1nEjEOAWBMj9YUH45TbHGRlNGt7Nn ZthHkJzeRzCjFAtczoDr1q2mUcmCP+qTUIhrpLTsVZZEL3QYDshBXMZf6i5OTfwDtxUM RP6YcezElvp3U8/qMviMiQ1seC7VbbDwaYvxRMRJp631nw6R1D1UQSW6+ekBjIw5BOZy MZGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=bLJpQmG4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m28si34638210pgn.273.2019.01.28.10.05.00; Mon, 28 Jan 2019 10:05:01 -0800 (PST) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=bLJpQmG4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727233AbfA1SE7 (ORCPT + 31 others); Mon, 28 Jan 2019 13:04:59 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33002 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbfA1SE4 (ORCPT ); Mon, 28 Jan 2019 13:04:56 -0500 Received: by mail-wr1-f66.google.com with SMTP id p7so19190403wru.0 for ; Mon, 28 Jan 2019 10:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nbXfyjfqzqGpHsSm+wGVBTSI4vzKOQ2CLwSheFxJ0pY=; b=bLJpQmG4xEa3nqZqf2uYPgGgvShCScNAnZJS/q4tIDJxY5DwMpFJZ6mdtcbmCk/HP1 3O/hdz5zfiulKkSzwA5TFEOFbS7E+gG4O4V0aVFaxQg/TUWTmnOlX+Gk8CHQN4dvuaRr SUbrk8P8HqMB2t2froBrbHPnoLt1VOso5vywumJuWHFv5OSv6pGEekrC2TMP0zm1O6P/ WPJTLq4oZmGIVhUNkKJt7UpP3pANfvFrUzdYdUc9qMG+gqsEvzdeQmmyqzLIZbgtkihu 4OZ7gqRALpFPdLOzxOIDtLt0efq3sYAqMUIjBg0lMHrIzz0iuXII0gHXWKJU+YuGPbBS 7jmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nbXfyjfqzqGpHsSm+wGVBTSI4vzKOQ2CLwSheFxJ0pY=; b=ILqS+gy4sQ7O+6uTtHAkZnB/VlgcCx+665eD1Es6IGXVIPseozKUXnYREUi/vacPQ3 6QO1mSqaivDwzha54ZqKb7s4CpVhmO2me/2XUAWfld34ul0z0heZE4YeetQJChy838CL NMQB0sPsF+miHrRiCvMmBMqesOrOhYES2CLXWNLJbtUZId7B5Zl2SSBO90VrTLZsXcA4 bS77j6SIPYcZcRaUTKJiCKnip8ddJAYSE3eK5Px9lB/M6Fb6DIm4n1m4VfX43t1QY+cz q9q2mf9Mo6mWwiemDB2MG0gBuj82VAD8l74KzBFsmbT0jAKdRJd8mBYKurZcUbI4k+G9 x+ZQ== X-Gm-Message-State: AHQUAubGmkgOBIvjkpgNk+Hst0d5nZ4kRsD9OohBNGxExcXsw5YVwJhK QmWOh6vkScYgmNC6tmzWSBjweA== X-Received: by 2002:adf:fd81:: with SMTP id d1mr15171607wrr.105.1548698693294; Mon, 28 Jan 2019 10:04:53 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id p6sm145548193wrx.50.2019.01.28.10.04.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:52 -0800 (PST) From: Jerome Brunet To: Neil Armstrong , Stephen Boyd , Michael Turquette Cc: Jerome Brunet , Kevin Hilman , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/14] clk: meson: take the mpll driver out of clkc Date: Mon, 28 Jan 2019 19:04:23 +0100 Message-Id: <20190128180430.28689-8-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190128180430.28689-1-jbrunet@baylibre.com> References: <20190128180430.28689-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Jerome Brunet --- drivers/clk/meson/axg.c | 1 + drivers/clk/meson/clk-mpll.c | 12 +++++++++++- drivers/clk/meson/clk-mpll.h | 30 ++++++++++++++++++++++++++++++ drivers/clk/meson/clkc.h | 14 -------------- drivers/clk/meson/gxbb.c | 1 + drivers/clk/meson/meson8b.c | 1 + 6 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 drivers/clk/meson/clk-mpll.h -- 2.20.1 diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 8a3896fa343f..dc973b4324f3 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -20,6 +20,7 @@ #include "clkc.h" #include "clk-regmap.h" #include "clk-pll.h" +#include "clk-mpll.h" #include "axg.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c index 650f75cc15a9..f76850d99e59 100644 --- a/drivers/clk/meson/clk-mpll.c +++ b/drivers/clk/meson/clk-mpll.c @@ -12,7 +12,11 @@ */ #include -#include "clkc.h" +#include +#include + +#include "clk-regmap.h" +#include "clk-mpll.h" #define SDM_DEN 16384 #define N2_MIN 4 @@ -138,9 +142,15 @@ const struct clk_ops meson_clk_mpll_ro_ops = { .recalc_rate = mpll_recalc_rate, .round_rate = mpll_round_rate, }; +EXPORT_SYMBOL_GPL(meson_clk_mpll_ro_ops); const struct clk_ops meson_clk_mpll_ops = { .recalc_rate = mpll_recalc_rate, .round_rate = mpll_round_rate, .set_rate = mpll_set_rate, }; +EXPORT_SYMBOL_GPL(meson_clk_mpll_ops); + +MODULE_DESCRIPTION("Amlogic MPLL driver"); +MODULE_AUTHOR("Michael Turquette "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clk-mpll.h b/drivers/clk/meson/clk-mpll.h new file mode 100644 index 000000000000..cf79340006dd --- /dev/null +++ b/drivers/clk/meson/clk-mpll.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + */ + +#ifndef __MESON_CLK_MPLL_H +#define __MESON_CLK_MPLL_H + +#include +#include + +#include "parm.h" + +struct meson_clk_mpll_data { + struct parm sdm; + struct parm sdm_en; + struct parm n2; + struct parm ssen; + struct parm misc; + spinlock_t *lock; + u8 flags; +}; + +#define CLK_MESON_MPLL_ROUND_CLOSEST BIT(0) + +extern const struct clk_ops meson_clk_mpll_ro_ops; +extern const struct clk_ops meson_clk_mpll_ops; + +#endif /* __MESON_CLK_MPLL_H */ diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 4857c8fa1ac4..32947bd76bab 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -11,18 +11,6 @@ #include "clk-regmap.h" #include "parm.h" -struct meson_clk_mpll_data { - struct parm sdm; - struct parm sdm_en; - struct parm n2; - struct parm ssen; - struct parm misc; - spinlock_t *lock; - u8 flags; -}; - -#define CLK_MESON_MPLL_ROUND_CLOSEST BIT(0) - struct meson_clk_phase_data { struct parm ph; }; @@ -54,8 +42,6 @@ struct meson_clk_dualdiv_data { /* clk_ops */ extern const struct clk_ops meson_clk_cpu_ops; -extern const struct clk_ops meson_clk_mpll_ro_ops; -extern const struct clk_ops meson_clk_mpll_ops; extern const struct clk_ops meson_clk_phase_ops; extern const struct clk_ops meson_vid_pll_div_ro_ops; extern const struct clk_ops meson_clk_dualdiv_ops; diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 813822ec5f57..6a8358f3e0ef 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -16,6 +16,7 @@ #include "gxbb.h" #include "clk-regmap.h" #include "clk-pll.h" +#include "clk-mpll.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index 9b35d5e08378..91a5306b13f6 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -20,6 +20,7 @@ #include "meson8b.h" #include "clk-regmap.h" #include "clk-pll.h" +#include "clk-mpll.h" static DEFINE_SPINLOCK(meson_clk_lock);