summaryrefslogtreecommitdiff
path: root/arch/arm/mach-keystone/cmd_clock.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2015-07-28 08:46:48 (GMT)
committerTom Rini <trini@konsulko.com>2015-08-13 00:47:55 (GMT)
commitfe772ebd285b4c442a2406419c49a4c7e829d83a (patch)
treead6986280bb64fe2448e9431e2b194761644a0fc /arch/arm/mach-keystone/cmd_clock.c
parent7531122e5ca64fd1d5b9a1feffa25bc812a627a6 (diff)
downloadu-boot-fe772ebd285b4c442a2406419c49a4c7e829d83a.tar.xz
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 <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-keystone/cmd_clock.c')
-rw-r--r--arch/arm/mach-keystone/cmd_clock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c
index af1b701..3d5cf3f 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: