From fe772ebd285b4c442a2406419c49a4c7e829d83a Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Tue, 28 Jul 2015 14:16:48 +0530 Subject: ARM: keystone2: Use common definition for clk_get_rate Since all the clocks are defined common, and has the same logic to get the frequencies, use a common definition for for clk_get_rate(). Reviewed-by: Tom Rini Signed-off-by: Lokesh Vutla --- arch/arm/mach-keystone/cmd_clock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-keystone/cmd_clock.c') diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c index af1b701e826..3d5cf3f7f01 100644 --- a/arch/arm/mach-keystone/cmd_clock.c +++ b/arch/arm/mach-keystone/cmd_clock.c @@ -67,7 +67,7 @@ U_BOOT_CMD( int do_getclk_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int clk; - unsigned int freq; + unsigned long freq; if (argc != 2) goto getclk_cmd_usage; @@ -75,7 +75,10 @@ int do_getclk_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) clk = simple_strtoul(argv[1], NULL, 10); freq = clk_get_rate(clk); - printf("clock index [%d] - frequency %u\n", clk, freq); + if (freq) + printf("clock index [%d] - frequency %lu\n", clk, freq); + else + printf("clock index [%d] Not available\n", clk); return 0; getclk_cmd_usage: -- cgit v1.2.3