aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-mx5/clock-mx51-mx53.c25
-rw-r--r--arch/arm/mach-mx5/crm_regs.h4
2 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
index ba9432c8f843..b21bc47d4827 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -127,7 +127,7 @@ static inline u32 _get_mux(struct clk *parent, struct clk *m0,
127 return -EINVAL; 127 return -EINVAL;
128} 128}
129 129
130static inline void __iomem *_get_pll_base(struct clk *pll) 130static inline void __iomem *_mx51_get_pll_base(struct clk *pll)
131{ 131{
132 if (pll == &pll1_main_clk) 132 if (pll == &pll1_main_clk)
133 return MX51_DPLL1_BASE; 133 return MX51_DPLL1_BASE;
@@ -135,6 +135,20 @@ static inline void __iomem *_get_pll_base(struct clk *pll)
135 return MX51_DPLL2_BASE; 135 return MX51_DPLL2_BASE;
136 else if (pll == &pll3_sw_clk) 136 else if (pll == &pll3_sw_clk)
137 return MX51_DPLL3_BASE; 137 return MX51_DPLL3_BASE;
138 else
139 BUG();
140
141 return NULL;
142}
143
144static inline void __iomem *_mx53_get_pll_base(struct clk *pll)
145{
146 if (pll == &pll1_main_clk)
147 return MX53_DPLL1_BASE;
148 else if (pll == &pll2_sw_clk)
149 return MX53_DPLL2_BASE;
150 else if (pll == &pll3_sw_clk)
151 return MX53_DPLL3_BASE;
138 else if (pll == &mx53_pll4_sw_clk) 152 else if (pll == &mx53_pll4_sw_clk)
139 return MX53_DPLL4_BASE; 153 return MX53_DPLL4_BASE;
140 else 154 else
@@ -143,6 +157,14 @@ static inline void __iomem *_get_pll_base(struct clk *pll)
143 return NULL; 157 return NULL;
144} 158}
145 159
160static inline void __iomem *_get_pll_base(struct clk *pll)
161{
162 if (cpu_is_mx51())
163 return _mx51_get_pll_base(pll);
164 else
165 return _mx53_get_pll_base(pll);
166}
167
146static unsigned long clk_pll_get_rate(struct clk *clk) 168static unsigned long clk_pll_get_rate(struct clk *clk)
147{ 169{
148 long mfi, mfn, mfd, pdf, ref_clk, mfn_abs; 170 long mfi, mfn, mfd, pdf, ref_clk, mfn_abs;
@@ -1341,6 +1363,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
1341 1363
1342 clk_tree_init(); 1364 clk_tree_init();
1343 1365
1366 clk_set_parent(&uart_root_clk, &pll3_sw_clk);
1344 clk_enable(&cpu_clk); 1367 clk_enable(&cpu_clk);
1345 clk_enable(&main_bus_clk); 1368 clk_enable(&main_bus_clk);
1346 1369
diff --git a/arch/arm/mach-mx5/crm_regs.h b/arch/arm/mach-mx5/crm_regs.h
index 51ff9bb02379..b462c22f53d8 100644
--- a/arch/arm/mach-mx5/crm_regs.h
+++ b/arch/arm/mach-mx5/crm_regs.h
@@ -19,6 +19,10 @@
19#define MX51_GPC_BASE MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR) 19#define MX51_GPC_BASE MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR)
20 20
21/*MX53*/ 21/*MX53*/
22#define MX53_CCM_BASE MX53_IO_ADDRESS(MX53_CCM_BASE_ADDR)
23#define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR)
24#define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR)
25#define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)
22#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) 26#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)
23 27
24/* PLL Register Offsets */ 28/* PLL Register Offsets */