Skip to contentSkip to conversation

pxa2xx: move clkops definitions into a separate object file

PATCH New Philipp Zabel 1 participant 1 message Mar 16, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/4 pxa2xx: move clkops definitions into a separate object file

This avoids the layering violation discussed in Documentation/clk.txt:
static clock definitions and clk_ops implementations have to reside in separate files.

An alternative would be to move the static clock definitions out of pxa*.c, but given that there are already clock-pxa2xx.c and clock-pxa3xx.c, this seems like the more logical choice.

---
 arch/arm/mach-pxa/Makefile       |    4 +-
 arch/arm/mach-pxa/clock-pxa25x.c |  133 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-pxa/clock-pxa27x.c |  123 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-pxa/clock.h        |    8 ++
 arch/arm/mach-pxa/pxa25x.c       |  118 ---------------------------------
 arch/arm/mach-pxa/pxa27x.c       |  108 ------------------------------
 6 files changed, 266 insertions(+), 228 deletions(-)
 create mode 100644 arch/arm/mach-pxa/clock-pxa25x.c
 create mode 100644 arch/arm/mach-pxa/clock-pxa27x.c
arch/arm/mach-pxa/Makefile +2 -2
index be0f7df..0a1fc28 100644
@@ -16,8 +16,8 @@ endif
 # Generic drivers that other drivers may depend upon
 
 # SoC-specific code
-obj-$(CONFIG_PXA25x)		+= mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa25x.o
-obj-$(CONFIG_PXA27x)		+= mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa27x.o
+obj-$(CONFIG_PXA25x)		+= mfp-pxa2xx.o clock-pxa2xx.o clock-pxa25x.o pxa2xx.o pxa25x.o
+obj-$(CONFIG_PXA27x)		+= mfp-pxa2xx.o clock-pxa2xx.o clock-pxa27x.o pxa2xx.o pxa27x.o
 obj-$(CONFIG_PXA3xx)		+= mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o smemc.o pxa3xx-ulpi.o
 obj-$(CONFIG_PXA95x)		+= mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o pxa95x.o smemc.o
 obj-$(CONFIG_CPU_PXA300)	+= pxa300.o
arch/arm/mach-pxa/clock-pxa25x.c new file +133 -0

133 lines not on this page · raw message

arch/arm/mach-pxa/clock-pxa27x.c new file +123 -0

123 lines not on this page · raw message

arch/arm/mach-pxa/clock.h +8 -0
index 2946fa2..a3585a2 100644
@@ -45,6 +45,14 @@ struct clk clk_##_name = {				\
 
 extern const struct clkops clk_pxa2xx_cken_ops;
 
+extern const struct clkops clk_pxa25x_mem_ops;
+extern const struct clkops clk_pxa25x_lcd_ops;
+extern const struct clkops clk_pxa25x_gpio12_ops;
+extern const struct clkops clk_pxa25x_gpio11_ops;
+
+extern const struct clkops clk_pxa27x_mem_ops;
+extern const struct clkops clk_pxa27x_lcd_ops;
+
 void clk_pxa2xx_cken_enable(struct clk *clk);
 void clk_pxa2xx_cken_disable(struct clk *clk);
 
arch/arm/mach-pxa/pxa25x.c +0 -118

124 lines not on this page · raw message

arch/arm/mach-pxa/pxa27x.c +0 -108

114 lines not on this page · raw message

Signature · 1 line
1.7.9.1