diff options
author | Terry Lv <r65388@freescale.com> | 2010-05-12 22:47:31 +0800 |
---|---|---|
committer | Terry Lv <r65388@freescale.com> | 2010-05-14 15:35:52 +0800 |
commit | 9ef0863e8bd5eba9243b4f5e84b75806b1d4c889 (patch) | |
tree | 8017fe12dc3a1ff770a09230ca55e51a9f8c66d9 /common/cmd_clk.c | |
parent | 9667c8061fcfe407b2fa2055b09e0509dc7cc041 (diff) | |
download | u-boot-imx-9ef0863e8bd5eba9243b4f5e84b75806b1d4c889.zip u-boot-imx-9ef0863e8bd5eba9243b4f5e84b75806b1d4c889.tar.gz u-boot-imx-9ef0863e8bd5eba9243b4f5e84b75806b1d4c889.tar.bz2 |
ENGR00123418: Add peripheral clock setup support
Add peripheral clock setup support.
Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'common/cmd_clk.c')
-rw-r--r-- | common/cmd_clk.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/cmd_clk.c b/common/cmd_clk.c index 2f81492..0d6123e 100644 --- a/common/cmd_clk.c +++ b/common/cmd_clk.c @@ -38,6 +38,8 @@ int do_clkops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) case 2: if (strcmp(argv[1], "core") == 0) clk_info(CPU_CLK); + else if (strcmp(argv[1], "periph") == 0) + clk_info(PERIPH_CLK); else if (strcmp(argv[1], "ddr") == 0) clk_info(DDR_CLK); else @@ -47,6 +49,8 @@ int do_clkops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) freq = simple_strtoul(argv[2], NULL, 10); if (strcmp(argv[1], "core") == 0) clk_config(CONFIG_REF_CLK_FREQ, freq, CPU_CLK); + else if (strcmp(argv[1], "periph") == 0) + clk_config(CONFIG_REF_CLK_FREQ, freq, PERIPH_CLK); else if (strcmp(argv[1], "ddr") == 0) clk_config(CONFIG_REF_CLK_FREQ, freq, DDR_CLK); else @@ -68,9 +72,12 @@ U_BOOT_CMD( "Setup/Display clock\n" "clk - Display all clocks\n" "clk core <core clock in MHz> - Setup/Display core clock\n" + "clk periph <peripheral clock in MHz> -" + "Setup/Display peripheral clock\n" "clk ddr <DDR clock in MHz> - Setup/Display DDR clock\n" "Example:\n" "clk - Show various clocks\n" "clk core 665 - Set core clock to 665MHz\n" + "clk periph 600 - Set peripheral clock to 600MHz\n" "clk ddr 166 - Set DDR clock to 166MHz"); |