3 * Sascha Hauer, Pengutronix
5 * (C) Copyright 2009 Freescale Semiconductor, Inc.
7 * See file CREDITS for list of people who contributed to this
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 #include <asm/errno.h>
29 #include <asm/arch/imx-regs.h>
30 #include <asm/arch/crm_regs.h>
31 #include <asm/arch/clock.h>
33 #include <asm/arch/sys_proto.h>
45 struct mxc_pll_reg *mxc_plls[PLL_CLOCKS] = {
46 [PLL1_CLOCK] = (struct mxc_pll_reg *)PLL1_BASE_ADDR,
47 [PLL2_CLOCK] = (struct mxc_pll_reg *)PLL2_BASE_ADDR,
48 [PLL3_CLOCK] = (struct mxc_pll_reg *)PLL3_BASE_ADDR,
50 [PLL4_CLOCK] = (struct mxc_pll_reg *)PLL4_BASE_ADDR,
54 #define AHB_CLK_ROOT 133333333
55 #define SZ_DEC_1M 1000000
56 #define PLL_PD_MAX 16 /* Actual pd+1 */
57 #define PLL_MFI_MAX 15
65 #define MX5_CBCMR 0x00015154
66 #define MX5_CBCDR 0x02888945
68 struct fixed_pll_mfd {
73 const struct fixed_pll_mfd fixed_mfd[] = {
84 #define PLL_FREQ_MAX(ref_clk) (4 * (ref_clk) * PLL_MFI_MAX)
85 #define PLL_FREQ_MIN(ref_clk) \
86 ((2 * (ref_clk) * (PLL_MFI_MIN - 1)) / PLL_PD_MAX)
87 #define MAX_DDR_CLK 420000000
88 #define NFC_CLK_MAX 34000000
90 struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)MXC_CCM_BASE;
92 void set_usboh3_clk(void)
94 clrsetbits_le32(&mxc_ccm->cscmr1,
95 MXC_CCM_CSCMR1_USBOH3_CLK_SEL_MASK,
96 MXC_CCM_CSCMR1_USBOH3_CLK_SEL(1));
97 clrsetbits_le32(&mxc_ccm->cscdr1,
98 MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK |
99 MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK,
100 MXC_CCM_CSCDR1_USBOH3_CLK_PRED(4) |
101 MXC_CCM_CSCDR1_USBOH3_CLK_PODF(1));
104 void enable_usboh3_clk(unsigned char enable)
106 unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF;
108 clrsetbits_le32(&mxc_ccm->CCGR2,
109 MXC_CCM_CCGR2_USBOH3_60M(MXC_CCM_CCGR_CG_MASK),
110 MXC_CCM_CCGR2_USBOH3_60M(cg));
113 #ifdef CONFIG_I2C_MXC
114 /* i2c_num can be from 0 - 2 */
115 int enable_i2c_clk(unsigned char enable, unsigned i2c_num)
121 mask = MXC_CCM_CCGR_CG_MASK <<
122 (MXC_CCM_CCGR1_I2C1_OFFSET + (i2c_num << 1));
124 setbits_le32(&mxc_ccm->CCGR1, mask);
126 clrbits_le32(&mxc_ccm->CCGR1, mask);
131 void set_usb_phy_clk(void)
133 clrbits_le32(&mxc_ccm->cscmr1, MXC_CCM_CSCMR1_USB_PHY_CLK_SEL);
136 #if defined(CONFIG_MX51)
137 void enable_usb_phy1_clk(unsigned char enable)
139 unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF;
141 clrsetbits_le32(&mxc_ccm->CCGR2,
142 MXC_CCM_CCGR2_USB_PHY(MXC_CCM_CCGR_CG_MASK),
143 MXC_CCM_CCGR2_USB_PHY(cg));
146 void enable_usb_phy2_clk(unsigned char enable)
148 /* i.MX51 has a single USB PHY clock, so do nothing here. */
150 #elif defined(CONFIG_MX53)
151 void enable_usb_phy1_clk(unsigned char enable)
153 unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF;
155 clrsetbits_le32(&mxc_ccm->CCGR4,
156 MXC_CCM_CCGR4_USB_PHY1(MXC_CCM_CCGR_CG_MASK),
157 MXC_CCM_CCGR4_USB_PHY1(cg));
160 void enable_usb_phy2_clk(unsigned char enable)
162 unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF;
164 clrsetbits_le32(&mxc_ccm->CCGR4,
165 MXC_CCM_CCGR4_USB_PHY2(MXC_CCM_CCGR_CG_MASK),
166 MXC_CCM_CCGR4_USB_PHY2(cg));
171 * Calculate the frequency of PLLn.
173 static uint32_t decode_pll(struct mxc_pll_reg *pll, uint32_t infreq)
175 uint32_t ctrl, op, mfd, mfn, mfi, pdf, ret;
176 uint64_t refclk, temp;
179 ctrl = readl(&pll->ctrl);
181 if (ctrl & MXC_DPLLC_CTL_HFSM) {
182 mfn = readl(&pll->hfs_mfn);
183 mfd = readl(&pll->hfs_mfd);
184 op = readl(&pll->hfs_op);
186 mfn = readl(&pll->mfn);
187 mfd = readl(&pll->mfd);
188 op = readl(&pll->op);
191 mfd &= MXC_DPLLC_MFD_MFD_MASK;
192 mfn &= MXC_DPLLC_MFN_MFN_MASK;
193 pdf = op & MXC_DPLLC_OP_PDF_MASK;
194 mfi = MXC_DPLLC_OP_MFI_RD(op);
201 if (mfn >= 0x04000000) {
208 if (ctrl & MXC_DPLLC_CTL_DPDCK0_2_EN)
211 do_div(refclk, pdf + 1);
212 temp = refclk * mfn_abs;
213 do_div(temp, mfd + 1);
226 * This function returns the Frequency Pre-Multiplier clock.
228 static u32 get_fpm(void)
231 u32 ccr = readl(&mxc_ccm->ccr);
233 if (ccr & MXC_CCM_CCR_FPM_MULT)
238 return MXC_CLK32 * mult;
243 * This function returns the low power audio clock.
245 static u32 get_lp_apm(void)
248 u32 ccsr = readl(&mxc_ccm->ccsr);
250 if (ccsr & MXC_CCM_CCSR_LP_APM)
251 #if defined(CONFIG_MX51)
253 #elif defined(CONFIG_MX53)
254 ret_val = decode_pll(mxc_plls[PLL4_CLOCK], MXC_HCLK);
265 u32 get_mcu_main_clk(void)
269 reg = MXC_CCM_CACRR_ARM_PODF_RD(readl(&mxc_ccm->cacrr));
270 freq = decode_pll(mxc_plls[PLL1_CLOCK], MXC_HCLK);
271 return freq / (reg + 1);
275 * Get the rate of peripheral's root clock.
277 u32 get_periph_clk(void)
281 reg = readl(&mxc_ccm->cbcdr);
282 if (!(reg & MXC_CCM_CBCDR_PERIPH_CLK_SEL))
283 return decode_pll(mxc_plls[PLL2_CLOCK], MXC_HCLK);
284 reg = readl(&mxc_ccm->cbcmr);
285 switch (MXC_CCM_CBCMR_PERIPH_CLK_SEL_RD(reg)) {
287 return decode_pll(mxc_plls[PLL1_CLOCK], MXC_HCLK);
289 return decode_pll(mxc_plls[PLL3_CLOCK], MXC_HCLK);
299 * Get the rate of ipg clock.
301 static u32 get_ipg_clk(void)
303 uint32_t freq, reg, div;
305 freq = get_ahb_clk();
307 reg = readl(&mxc_ccm->cbcdr);
308 div = MXC_CCM_CBCDR_IPG_PODF_RD(reg) + 1;
314 * Get the rate of ipg_per clock.
316 static u32 get_ipg_per_clk(void)
318 u32 freq, pred1, pred2, podf;
320 if (readl(&mxc_ccm->cbcmr) & MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL)
321 return get_ipg_clk();
323 if (readl(&mxc_ccm->cbcmr) & MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL)
326 freq = get_periph_clk();
327 podf = readl(&mxc_ccm->cbcdr);
328 pred1 = MXC_CCM_CBCDR_PERCLK_PRED1_RD(podf);
329 pred2 = MXC_CCM_CBCDR_PERCLK_PRED2_RD(podf);
330 podf = MXC_CCM_CBCDR_PERCLK_PODF_RD(podf);
331 return freq / ((pred1 + 1) * (pred2 + 1) * (podf + 1));
335 * Get the rate of uart clk.
337 static u32 get_uart_clk(void)
339 unsigned int freq, reg, pred, podf;
341 reg = readl(&mxc_ccm->cscmr1);
342 switch (MXC_CCM_CSCMR1_UART_CLK_SEL_RD(reg)) {
344 freq = decode_pll(mxc_plls[PLL1_CLOCK], MXC_HCLK);
347 freq = decode_pll(mxc_plls[PLL2_CLOCK], MXC_HCLK);
350 freq = decode_pll(mxc_plls[PLL3_CLOCK], MXC_HCLK);
356 reg = readl(&mxc_ccm->cscdr1);
357 pred = MXC_CCM_CSCDR1_UART_CLK_PRED_RD(reg);
358 podf = MXC_CCM_CSCDR1_UART_CLK_PODF_RD(reg);
359 freq /= (pred + 1) * (podf + 1);
365 * get cspi clock rate.
367 static u32 imx_get_cspiclk(void)
369 u32 ret_val = 0, pdf, pre_pdf, clk_sel;
370 u32 cscmr1 = readl(&mxc_ccm->cscmr1);
371 u32 cscdr2 = readl(&mxc_ccm->cscdr2);
373 pre_pdf = MXC_CCM_CSCDR2_CSPI_CLK_PRED_RD(cscdr2);
374 pdf = MXC_CCM_CSCDR2_CSPI_CLK_PODF_RD(cscdr2);
375 clk_sel = MXC_CCM_CSCMR1_CSPI_CLK_SEL_RD(cscmr1);
379 ret_val = decode_pll(mxc_plls[PLL1_CLOCK], MXC_HCLK) /
380 ((pre_pdf + 1) * (pdf + 1));
383 ret_val = decode_pll(mxc_plls[PLL2_CLOCK], MXC_HCLK) /
384 ((pre_pdf + 1) * (pdf + 1));
387 ret_val = decode_pll(mxc_plls[PLL3_CLOCK], MXC_HCLK) /
388 ((pre_pdf + 1) * (pdf + 1));
391 ret_val = get_lp_apm() / ((pre_pdf + 1) * (pdf + 1));
398 static u32 get_axi_a_clk(void)
400 u32 cbcdr = readl(&mxc_ccm->cbcdr);
401 u32 pdf = MXC_CCM_CBCDR_AXI_A_PODF_RD(cbcdr);
403 return get_periph_clk() / (pdf + 1);
406 static u32 get_axi_b_clk(void)
408 u32 cbcdr = readl(&mxc_ccm->cbcdr);
409 u32 pdf = MXC_CCM_CBCDR_AXI_B_PODF_RD(cbcdr);
411 return get_periph_clk() / (pdf + 1);
414 static u32 get_emi_slow_clk(void)
416 u32 cbcdr = readl(&mxc_ccm->cbcdr);
417 u32 emi_clk_sel = cbcdr & MXC_CCM_CBCDR_EMI_CLK_SEL;
418 u32 pdf = MXC_CCM_CBCDR_EMI_PODF_RD(cbcdr);
421 return get_ahb_clk() / (pdf + 1);
423 return get_periph_clk() / (pdf + 1);
426 static u32 get_ddr_clk(void)
429 u32 cbcmr = readl(&mxc_ccm->cbcmr);
430 u32 ddr_clk_sel = MXC_CCM_CBCMR_DDR_CLK_SEL_RD(cbcmr);
432 u32 cbcdr = readl(&mxc_ccm->cbcdr);
433 if (cbcdr & MXC_CCM_CBCDR_DDR_HIFREQ_SEL) {
434 u32 ddr_clk_podf = MXC_CCM_CBCDR_DDR_PODF_RD(cbcdr);
436 ret_val = decode_pll(mxc_plls[PLL1_CLOCK], MXC_HCLK);
437 ret_val /= ddr_clk_podf + 1;
442 switch (ddr_clk_sel) {
444 ret_val = get_axi_a_clk();
447 ret_val = get_axi_b_clk();
450 ret_val = get_emi_slow_clk();
453 ret_val = get_ahb_clk();
463 * The API of get mxc clocks.
465 unsigned int mxc_get_clock(enum mxc_clock clk)
469 return get_mcu_main_clk();
471 return get_ahb_clk();
473 return get_ipg_clk();
476 return get_ipg_per_clk();
478 return get_uart_clk();
480 return imx_get_cspiclk();
482 return decode_pll(mxc_plls[PLL1_CLOCK], MXC_HCLK);
484 return get_ahb_clk();
486 return get_ddr_clk();
493 u32 imx_get_uartclk(void)
495 return get_uart_clk();
499 u32 imx_get_fecclk(void)
501 return mxc_get_clock(MXC_IPG_CLK);
504 static int gcd(int m, int n)
519 * This is to calculate various parameters based on reference clock and
520 * targeted clock based on the equation:
521 * t_clk = 2*ref_freq*(mfi + mfn/(mfd+1))/(pd+1)
522 * This calculation is based on a fixed MFD value for simplicity.
524 static int calc_pll_params(u32 ref, u32 target, struct pll_param *pll)
526 u64 pd, mfi = 1, mfn, mfd, t1;
527 u32 n_target = target;
531 * Make sure targeted freq is in the valid range.
532 * Otherwise the following calculation might be wrong!!!
534 if (n_target < PLL_FREQ_MIN(ref) ||
535 n_target > PLL_FREQ_MAX(ref)) {
536 printf("Targeted peripheral clock should be"
537 "within [%d - %d]\n",
538 PLL_FREQ_MIN(ref) / SZ_DEC_1M,
539 PLL_FREQ_MAX(ref) / SZ_DEC_1M);
543 for (i = 0; i < ARRAY_SIZE(fixed_mfd); i++) {
544 if (fixed_mfd[i].ref_clk_hz == ref) {
545 mfd = fixed_mfd[i].mfd;
550 if (i == ARRAY_SIZE(fixed_mfd))
553 /* Use n_target and n_ref to avoid overflow */
554 for (pd = 1; pd <= PLL_PD_MAX; pd++) {
556 do_div(t1, (4 * n_ref));
558 if (mfi > PLL_MFI_MAX)
565 * Now got pd and mfi already
567 * mfn = (((n_target * pd) / 4 - n_ref * mfi) * mfd) / n_ref;
575 debug("ref=%d, target=%d, pd=%d," "mfi=%d,mfn=%d, mfd=%d\n",
576 ref, n_target, (u32)pd, (u32)mfi, (u32)mfn, (u32)mfd);
590 #define calc_div(tgt_clk, src_clk, limit) ({ \
592 if (((src_clk) % (tgt_clk)) <= 100) \
593 v = (src_clk) / (tgt_clk); \
595 v = ((src_clk) / (tgt_clk)) + 1;\
601 #define CHANGE_PLL_SETTINGS(pll, pd, fi, fn, fd) \
603 writel(0x1232, &pll->ctrl); \
604 writel(0x2, &pll->config); \
605 writel((((pd) - 1) << 0) | ((fi) << 4), \
607 writel(fn, &(pll->mfn)); \
608 writel((fd) - 1, &pll->mfd); \
609 writel((((pd) - 1) << 0) | ((fi) << 4), \
611 writel(fn, &pll->hfs_mfn); \
612 writel((fd) - 1, &pll->hfs_mfd); \
613 writel(0x1232, &pll->ctrl); \
614 while (!readl(&pll->ctrl) & 0x1) \
618 static int config_pll_clk(enum pll_clocks index, struct pll_param *pll_param)
620 u32 ccsr = readl(&mxc_ccm->ccsr);
621 struct mxc_pll_reg *pll = mxc_plls[index];
625 /* Switch ARM to PLL2 clock */
626 writel(ccsr | MXC_CCM_CCSR_PLL1_SW_CLK_SEL,
628 CHANGE_PLL_SETTINGS(pll, pll_param->pd,
629 pll_param->mfi, pll_param->mfn,
632 writel(ccsr & ~MXC_CCM_CCSR_PLL1_SW_CLK_SEL,
636 /* Switch to pll2 bypass clock */
637 writel(ccsr | MXC_CCM_CCSR_PLL2_SW_CLK_SEL,
639 CHANGE_PLL_SETTINGS(pll, pll_param->pd,
640 pll_param->mfi, pll_param->mfn,
643 writel(ccsr & ~MXC_CCM_CCSR_PLL2_SW_CLK_SEL,
647 /* Switch to pll3 bypass clock */
648 writel(ccsr | MXC_CCM_CCSR_PLL3_SW_CLK_SEL,
650 CHANGE_PLL_SETTINGS(pll, pll_param->pd,
651 pll_param->mfi, pll_param->mfn,
654 writel(ccsr & ~MXC_CCM_CCSR_PLL3_SW_CLK_SEL,
659 /* Switch to pll4 bypass clock */
660 writel(ccsr | MXC_CCM_CCSR_PLL4_SW_CLK_SEL,
662 CHANGE_PLL_SETTINGS(pll, pll_param->pd,
663 pll_param->mfi, pll_param->mfn,
666 writel(ccsr & ~MXC_CCM_CCSR_PLL4_SW_CLK_SEL,
677 /* Config CPU clock */
678 static int config_core_clk(u32 ref, u32 freq)
681 struct pll_param pll_param;
683 memset(&pll_param, 0, sizeof(struct pll_param));
685 /* The case that periph uses PLL1 is not considered here */
686 ret = calc_pll_params(ref, freq, &pll_param);
688 printf("Error:Can't find pll parameters: %d\n", ret);
692 return config_pll_clk(PLL1_CLOCK, &pll_param);
695 static int config_nfc_clk(u32 nfc_clk)
697 u32 parent_rate = get_emi_slow_clk();
698 u32 div = parent_rate / nfc_clk;
704 if (parent_rate / div > NFC_CLK_MAX)
706 clrsetbits_le32(&mxc_ccm->cbcdr,
707 MXC_CCM_CBCDR_NFC_PODF_MASK,
708 MXC_CCM_CBCDR_NFC_PODF(div - 1));
709 while (readl(&mxc_ccm->cdhipr) != 0)
714 /* Config main_bus_clock for periphs */
715 static int config_periph_clk(u32 ref, u32 freq)
718 struct pll_param pll_param;
720 memset(&pll_param, 0, sizeof(struct pll_param));
722 if (readl(&mxc_ccm->cbcdr) & MXC_CCM_CBCDR_PERIPH_CLK_SEL) {
723 ret = calc_pll_params(ref, freq, &pll_param);
725 printf("Error:Can't find pll parameters: %d\n",
729 switch (MXC_CCM_CBCMR_PERIPH_CLK_SEL_RD(
730 readl(&mxc_ccm->cbcmr))) {
732 return config_pll_clk(PLL1_CLOCK, &pll_param);
735 return config_pll_clk(PLL3_CLOCK, &pll_param);
745 static int config_ddr_clk(u32 emi_clk)
748 s32 shift = 0, clk_sel, div = 1;
749 u32 cbcmr = readl(&mxc_ccm->cbcmr);
751 if (emi_clk > MAX_DDR_CLK) {
752 printf("Warning:DDR clock should not exceed %d MHz\n",
753 MAX_DDR_CLK / SZ_DEC_1M);
754 emi_clk = MAX_DDR_CLK;
757 clk_src = get_periph_clk();
758 /* Find DDR clock input */
759 clk_sel = MXC_CCM_CBCMR_DDR_CLK_SEL_RD(cbcmr);
777 if ((clk_src % emi_clk) < 10000000)
778 div = clk_src / emi_clk;
780 div = (clk_src / emi_clk) + 1;
784 clrsetbits_le32(&mxc_ccm->cbcdr, 0x7 << shift, (div - 1) << shift);
785 while (readl(&mxc_ccm->cdhipr) != 0)
787 writel(0x0, &mxc_ccm->ccdr);
793 * This function assumes the expected core clock has to be changed by
794 * modifying the PLL. This is NOT true always but for most of the times,
795 * it is. So it assumes the PLL output freq is the same as the expected
796 * core clock (presc=1) unless the core clock is less than PLL_FREQ_MIN.
797 * In the latter case, it will try to increase the presc value until
798 * (presc*core_clk) is greater than PLL_FREQ_MIN. It then makes call to
799 * calc_pll_params() and obtains the values of PD, MFI,MFN, MFD based
800 * on the targeted PLL and reference input clock to the PLL. Lastly,
801 * it sets the register based on these values along with the dividers.
802 * Note 1) There is no value checking for the passed-in divider values
803 * so the caller has to make sure those values are sensible.
804 * 2) Also adjust the NFC divider such that the NFC clock doesn't
805 * exceed NFC_CLK_MAX.
806 * 3) IPU HSP clock is independent of AHB clock. Even it can go up to
807 * 177MHz for higher voltage, this function fixes the max to 133MHz.
808 * 4) This function should not have allowed diag_printf() calls since
809 * the serial driver has been stoped. But leave then here to allow
810 * easy debugging by NOT calling the cyg_hal_plf_serial_stop().
812 int mxc_set_clock(u32 ref, u32 freq, enum mxc_clock clk)
818 if (config_core_clk(ref, freq))
822 if (config_periph_clk(ref, freq))
826 if (config_ddr_clk(freq))
830 if (config_nfc_clk(freq))
834 printf("Warning:Unsupported or invalid clock type\n");
842 * The clock for the external interface can be set to use internal clock
843 * if fuse bank 4, row 3, bit 2 is set.
844 * This is an undocumented feature and it was confirmed by Freescale's support:
845 * Fuses (but not pins) may be used to configure SATA clocks.
846 * Particularly the i.MX53 Fuse_Map contains the next information
847 * about configuring SATA clocks : SATA_ALT_REF_CLK[1:0] (offset 0x180C)
848 * '00' - 100MHz (External)
849 * '01' - 50MHz (External)
850 * '10' - 120MHz, internal (USB PHY)
853 void mxc_set_sata_internal_clock(void)
856 (u32 *)(IIM_BASE_ADDR + 0x180c);
860 clrsetbits_le32(tmp_base, 0x6, 0x4);
865 * Dump some core clockes.
867 int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
871 freq = decode_pll(mxc_plls[PLL1_CLOCK], MXC_HCLK);
872 printf("PLL1 %8d MHz\n", freq / 1000000);
873 freq = decode_pll(mxc_plls[PLL2_CLOCK], MXC_HCLK);
874 printf("PLL2 %8d MHz\n", freq / 1000000);
875 freq = decode_pll(mxc_plls[PLL3_CLOCK], MXC_HCLK);
876 printf("PLL3 %8d MHz\n", freq / 1000000);
878 freq = decode_pll(mxc_plls[PLL4_CLOCK], MXC_HCLK);
879 printf("PLL4 %8d MHz\n", freq / 1000000);
883 printf("AHB %8d kHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000);
884 printf("IPG %8d kHz\n", mxc_get_clock(MXC_IPG_CLK) / 1000);
885 printf("IPG PERCLK %8d kHz\n", mxc_get_clock(MXC_IPG_PERCLK) / 1000);
886 printf("DDR %8d kHz\n", mxc_get_clock(MXC_DDR_CLK) / 1000);
891 /***************************************************/
894 clocks, CONFIG_SYS_MAXARGS, 1, do_mx5_showclocks,