summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2011-09-26 12:32:07 +0200
committerRobert Marklund <robert.marklund@stericsson.com>2011-10-05 13:01:25 +0200
commitd387a60ced0bd84e9f5cc9ff514953ad09f51a50 (patch)
tree7c17716f31f31980f91d302e00df7b07995c2a91
parent99cfe899accbcc9ad3b651185550378fe627b13e (diff)
ux500: clocks: move common macros to clock.h
Change-Id: Iae6b959e8232f318d4ae379f1b8499c7ca4a1272 Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32145 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/clock-db5500.c11
-rw-r--r--arch/arm/mach-ux500/clock-db8500.c3
-rw-r--r--arch/arm/mach-ux500/clock.h11
3 files changed, 11 insertions, 14 deletions
diff --git a/arch/arm/mach-ux500/clock-db5500.c b/arch/arm/mach-ux500/clock-db5500.c
index 9856f8ce1fe..2609d23ee01 100644
--- a/arch/arm/mach-ux500/clock-db5500.c
+++ b/arch/arm/mach-ux500/clock-db5500.c
@@ -225,14 +225,6 @@ static struct clkops clkout1_ops = {
#define DEF_PER6_KCLK(_cg_bit, _name, _parent) \
DEF_PRCC_KCLK(_name, U5500_CLKRST6_BASE, _cg_bit, _parent, &per6clk)
-#define DEF_MTU_CLK(_cg_sel, _name, _bus_parent) \
- struct clk _name = { \
- .name = #_name, \
- .ops = &mtu_clk_ops, \
- .cg_sel = _cg_sel, \
- .bus_parent = _bus_parent, \
- }
-
/* Clock sources. */
static struct clk soc0_pll = {
@@ -584,9 +576,6 @@ static struct clk *db5500_dbg_clks[] __initdata = {
&rtc_clk1,
};
-#define CLK_LOOKUP(_clk, _dev_id, _con_id) \
- { .dev_id = _dev_id, .con_id = _con_id, .clk = &_clk }
-
static struct clk_lookup u8500_common_clock_sources[] = {
CLK_LOOKUP(soc0_pll, NULL, "soc0_pll"),
CLK_LOOKUP(soc1_pll, NULL, "soc1_pll"),
diff --git a/arch/arm/mach-ux500/clock-db8500.c b/arch/arm/mach-ux500/clock-db8500.c
index e2c9924d9cc..925975383f3 100644
--- a/arch/arm/mach-ux500/clock-db8500.c
+++ b/arch/arm/mach-ux500/clock-db8500.c
@@ -976,9 +976,6 @@ module_exit(clk_debug_exit);
* when all drivers use the clk API.
*/
-#define CLK_LOOKUP(_clk, _dev_id, _con_id) \
- { .dev_id = _dev_id, .con_id = _con_id, .clk = &_clk }
-
static struct clk_lookup u8500_clocks[] = {
CLK_LOOKUP(soc0_pll, NULL, "soc0_pll"),
CLK_LOOKUP(soc1_pll, NULL, "soc1_pll"),
diff --git a/arch/arm/mach-ux500/clock.h b/arch/arm/mach-ux500/clock.h
index c4a66540c0e..b2f17e8fac6 100644
--- a/arch/arm/mach-ux500/clock.h
+++ b/arch/arm/mach-ux500/clock.h
@@ -78,6 +78,9 @@ extern struct clkops prcc_pclk_ops;
extern struct clkops prcc_kclk_ops;
extern struct clkops sga_clk_ops;
+#define CLK_LOOKUP(_clk, _dev_id, _con_id) \
+ { .dev_id = _dev_id, .con_id = _con_id, .clk = &_clk }
+
/* Define PRCMU Clock */
#define DEF_PRCMU_CLK(_name, _cg_sel, _rate) \
struct clk _name = { \
@@ -131,6 +134,14 @@ extern struct clkops sga_clk_ops;
.bus_parent = _bus_parent, \
}
+#define DEF_MTU_CLK(_cg_sel, _name, _bus_parent) \
+ struct clk _name = { \
+ .name = #_name, \
+ .ops = &mtu_clk_ops, \
+ .cg_sel = _cg_sel, \
+ .bus_parent = _bus_parent, \
+ }
+
/* Functions defined in clock.c */
int __init clk_init(void);
void clks_register(struct clk_lookup *clks, size_t num);