linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: serveralex@gmail.com (Alexander Müller)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v2 4/7] clk: meson: Copy meson8b CLKID defines to private header file
Date: Wed, 13 Jul 2016 19:49:38 +0200	[thread overview]
Message-ID: <1468432181-9550-5-git-send-email-serveralex@gmail.com> (raw)
In-Reply-To: <1468432181-9550-1-git-send-email-serveralex@gmail.com>

Only expose future CLKID constants if necessary. This patch
removes CLK_NR_CLKS from the DT bindings but leaves all previously
defined CLKIDs there to keep backward compatibility.

Signed-off-by: Alexander M?ller <serveralex@gmail.com>
---
 drivers/clk/meson/meson8b.c              |  1 -
 drivers/clk/meson/meson8b.h              | 27 +++++++++++++++++++++++++++
 include/dt-bindings/clock/meson8b-clkc.h |  2 --
 3 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 0c6e26f..9a656d9 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -21,7 +21,6 @@
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/of_address.h>
-#include <dt-bindings/clock/meson8b-clkc.h>
 #include <linux/platform_device.h>
 #include <linux/module.h>
 
diff --git a/drivers/clk/meson/meson8b.h b/drivers/clk/meson/meson8b.h
index b2f29f7..f8c6942 100644
--- a/drivers/clk/meson/meson8b.h
+++ b/drivers/clk/meson/meson8b.h
@@ -36,4 +36,31 @@
 #define HHI_SYS_PLL_CNTL		0x300 /* 0xc0 offset in data sheet */
 #define HHI_VID_PLL_CNTL		0x320 /* 0xc8 offset in data sheet */
 
+/*
+ * CLKID index values
+ *
+ * These indices are entirely contrived and do not map onto the hardware.
+ * Migrate them out of this header and into the DT header file when they need
+ * to be exposed to client nodes in DT: include/dt-bindings/clock/meson8b-clkc.h
+ */
+
+#define CLKID_UNUSED		0
+#define CLKID_XTAL		1
+#define CLKID_PLL_FIXED		2
+#define CLKID_PLL_VID		3
+#define CLKID_PLL_SYS		4
+#define CLKID_FCLK_DIV2		5
+#define CLKID_FCLK_DIV3		6
+#define CLKID_FCLK_DIV4		7
+#define CLKID_FCLK_DIV5		8
+#define CLKID_FCLK_DIV7		9
+#define CLKID_CLK81		10
+#define CLKID_MALI		11
+#define CLKID_CPUCLK		12
+#define CLKID_ZERO		13
+#define CLKID_MPEG_SEL		14
+#define CLKID_MPEG_DIV		15
+
+#define CLK_NR_CLKS		(CLKID_MPEG_DIV + 1)
+
 #endif /* __MESON8B_H */
diff --git a/include/dt-bindings/clock/meson8b-clkc.h b/include/dt-bindings/clock/meson8b-clkc.h
index 595a58d..a55ff8c 100644
--- a/include/dt-bindings/clock/meson8b-clkc.h
+++ b/include/dt-bindings/clock/meson8b-clkc.h
@@ -22,6 +22,4 @@
 #define CLKID_MPEG_SEL		14
 #define CLKID_MPEG_DIV		15
 
-#define CLK_NR_CLKS		(CLKID_MPEG_DIV + 1)
-
 #endif /* __MESON8B_CLKC_H */
-- 
2.5.0

  parent reply	other threads:[~2016-07-13 17:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 17:49 [PATCH v2 0/7] Add Amlogic meson8b clock gates Alexander Müller
2016-07-13 17:49 ` [PATCH v2 1/7] clk: meson: Rename meson8b-clkc.c to reflect gxbb naming convention Alexander Müller
2016-07-13 17:49 ` [PATCH v2 2/7] meson: clk: Move register definitions to meson8b.h Alexander Müller
2016-07-13 21:34   ` Michael Turquette
2016-07-13 17:49 ` [PATCH v2 3/7] meson: clk: Rename register names according to Amlogic datasheet Alexander Müller
2016-07-13 17:49 ` Alexander Müller [this message]
2016-07-13 17:49 ` [PATCH v2 5/7] meson: clk: Add CLKIDs for clock gates Alexander Müller
2016-07-13 21:39   ` Michael Turquette
2016-07-13 17:49 ` [PATCH v2 6/7] gxbb: clk: Move MESON_GATE macro to gxbb Alexander Müller
2016-07-13 21:32   ` Michael Turquette
2016-07-14 17:09     ` Alexander Müller
2016-07-16 20:14       ` Michael Turquette
2016-07-13 17:49 ` [PATCH v2 7/7] meson: clk: Add support for clock gates Alexander Müller
2016-07-13 21:53   ` Michael Turquette

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=1468432181-9550-5-git-send-email-serveralex@gmail.com \
    --to=serveralex@gmail.com \
    --cc=linus-amlogic@lists.infradead.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).