From: Jerome Brunet <jbrunet@baylibre.com>
To: Neil Armstrong <narmstrong@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>,
linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>
Subject: [PATCH 07/14] clk: meson: take the mpll driver out of clkc
Date: Mon, 28 Jan 2019 19:04:23 +0100 [thread overview]
Message-ID: <20190128180430.28689-8-jbrunet@baylibre.com> (raw)
In-Reply-To: <20190128180430.28689-1-jbrunet@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
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
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 <linux/clk-provider.h>
-#include "clkc.h"
+#include <linux/module.h>
+#include <linux/spinlock.h>
+
+#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 <mturquette@baylibre.com>");
+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 <jbrunet@baylibre.com>
+ */
+
+#ifndef __MESON_CLK_MPLL_H
+#define __MESON_CLK_MPLL_H
+
+#include <linux/clk-provider.h>
+#include <linux/spinlock.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)
+
+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);
--
2.20.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2019-01-28 18:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 18:04 [PATCH 00/14] clk: meson: rework drivers dependencies Jerome Brunet
2019-01-28 18:04 ` [PATCH 01/14] clk: export some clk_hw function symbols for module drivers Jerome Brunet
2019-01-29 18:05 ` Stephen Boyd
2019-01-28 18:04 ` [PATCH 02/14] clk: meson: use CONFIG_ARCH_MESON to enter meson clk directory Jerome Brunet
2019-01-29 18:05 ` Stephen Boyd
2019-01-28 18:04 ` [PATCH 03/14] clk: meson: axg-audio does not require syscon Jerome Brunet
2019-01-28 18:04 ` [PATCH 04/14] clk: meson: move MESON_GATE to clk-regmap.h Jerome Brunet
2019-01-29 18:04 ` Stephen Boyd
2019-01-29 18:07 ` Jerome Brunet
2019-01-28 18:04 ` [PATCH 05/14] clk: meson: move parm out of clkc Jerome Brunet
2019-01-29 18:06 ` Stephen Boyd
2019-01-28 18:04 ` [PATCH 06/14] clk: meson: take the pll driver " Jerome Brunet
2019-01-28 18:04 ` Jerome Brunet [this message]
2019-01-28 18:04 ` [PATCH 08/14] clk: meson: merge phase driver and remove from clkc Jerome Brunet
2019-01-28 18:04 ` [PATCH 09/14] clk: meson: take vid-pll-div out of clkc Jerome Brunet
2019-01-28 18:04 ` [PATCH 10/14] clk: meson: take dualdiv " Jerome Brunet
2019-01-28 18:04 ` [PATCH 11/14] clk: meson: take clk-input " Jerome Brunet
2019-01-28 18:04 ` [PATCH 12/14] clk: meson: clkc must die Jerome Brunet
2019-01-28 18:04 ` [PATCH 13/14] clk: meson: move sclk-div out of clkc-audio Jerome Brunet
2019-01-28 18:04 ` [PATCH 14/14] clk: meson: rework and clean drivers dependencies Jerome Brunet
2019-01-29 18:09 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190128180430.28689-8-jbrunet@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=narmstrong@baylibre.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).