public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/6] ARM: tegra: deduplicate MASK_BITS_xxx clock mux enum
@ 2014-01-22 20:20 Stephen Warren
  2014-01-22 20:20 ` [U-Boot] [PATCH 2/6] ARM: tegra: rename MASK_BITS_29_28 to MASK_BITS_31_28 Stephen Warren
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Stephen Warren @ 2014-01-22 20:20 UTC (permalink / raw)
  To: u-boot

From: Tom Warren <twarren.nvidia@gmail.com>

The enum used to define the set of register bits used to represent a
clock's input mux, MUX_BITS_*, is defined separately for each SoC at
present. Move this definition to a common location to ease fixing up
some issues with the definition, and the code that uses it.

Signed-off-by: Tom Warren <twarren@nvidia.com>
[swarren, extracted from a larger patch by Tom]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/cpu/tegra114-common/clock.c    | 6 ------
 arch/arm/cpu/tegra30-common/clock.c     | 6 ------
 arch/arm/include/asm/arch-tegra/clock.h | 6 ++++++
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/arm/cpu/tegra114-common/clock.c b/arch/arm/cpu/tegra114-common/clock.c
index 5c4305a418cc..47612e12d262 100644
--- a/arch/arm/cpu/tegra114-common/clock.c
+++ b/arch/arm/cpu/tegra114-common/clock.c
@@ -61,12 +61,6 @@ enum {
 	CLOCK_MAX_MUX   = 8     /* number of source options for each clock */
 };
 
-enum {
-	MASK_BITS_31_30	= 2,	/* num of bits used to specify clock source */
-	MASK_BITS_31_29,
-	MASK_BITS_29_28,
-};
-
 /*
  * Clock source mux for each clock type. This just converts our enum into
  * a list of mux sources for use by the code.
diff --git a/arch/arm/cpu/tegra30-common/clock.c b/arch/arm/cpu/tegra30-common/clock.c
index 74bd22be1aeb..89c3529c885b 100644
--- a/arch/arm/cpu/tegra30-common/clock.c
+++ b/arch/arm/cpu/tegra30-common/clock.c
@@ -60,12 +60,6 @@ enum {
 	CLOCK_MAX_MUX   = 8     /* number of source options for each clock */
 };
 
-enum {
-	MASK_BITS_31_30 = 2,    /* num of bits used to specify clock source */
-	MASK_BITS_31_29,
-	MASK_BITS_29_28,
-};
-
 /*
  * Clock source mux for each clock type. This just converts our enum into
  * a list of mux sources for use by the code.
diff --git a/arch/arm/include/asm/arch-tegra/clock.h b/arch/arm/include/asm/arch-tegra/clock.h
index e7d0fd45ee1d..052c0208b18a 100644
--- a/arch/arm/include/asm/arch-tegra/clock.h
+++ b/arch/arm/include/asm/arch-tegra/clock.h
@@ -20,6 +20,12 @@ enum clock_osc_freq {
 	CLOCK_OSC_FREQ_COUNT,
 };
 
+enum {
+	MASK_BITS_31_30	= 2,	/* num of bits used to specify clock source */
+	MASK_BITS_31_29,
+	MASK_BITS_29_28,
+};
+
 #include <asm/arch/clock-tables.h>
 /* PLL stabilization delay in usec */
 #define CLOCK_PLL_STABLE_DELAY_US 300
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-01-24 17:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 20:20 [U-Boot] [PATCH 1/6] ARM: tegra: deduplicate MASK_BITS_xxx clock mux enum Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 2/6] ARM: tegra: rename MASK_BITS_29_28 to MASK_BITS_31_28 Stephen Warren
2014-01-24 13:44   ` Thierry Reding
2014-01-24 17:08     ` Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 3/6] ARM: tegra: rename OUT_CLK_SOURCE_* Stephen Warren
2014-01-24 13:47   ` Thierry Reding
2014-01-24 17:08     ` Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 4/6] ARM: tegra: use MASK_BITS_* macros everywhere Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 5/6] ARM: tegra: MASK_BITS_ no longer needs specific values Stephen Warren
2014-01-24 13:50   ` Thierry Reding
2014-01-24 17:09     ` Stephen Warren
2014-01-22 20:20 ` [U-Boot] [PATCH 6/6] ARM: tegra: implement MASK_BITS_31_29 Stephen Warren
2014-01-22 21:35 ` [U-Boot] [PATCH 1/6] ARM: tegra: deduplicate MASK_BITS_xxx clock mux enum Tom Warren
2014-01-22 21:54   ` Stephen Warren
2014-01-22 22:05     ` Tom Warren
2014-01-24 13:54 ` Thierry Reding
2014-01-24 17:15   ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox