From 9ef0863e8bd5eba9243b4f5e84b75806b1d4c889 Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Wed, 12 May 2010 22:47:31 +0800 Subject: ENGR00123418: Add peripheral clock setup support Add peripheral clock setup support. Signed-off-by: Terry Lv --- common/cmd_clk.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common/cmd_clk.c') 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 - Setup/Display core clock\n" + "clk periph -" + "Setup/Display peripheral clock\n" "clk ddr - 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"); -- cgit v1.1