summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-rockchip
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-21 19:45:07 -0700
committerSimon Glass <sjg@chromium.org>2016-01-21 20:42:36 -0700
commit74e53e0e9b7cf78a7e896cf6626f0ca607da5872 (patch)
tree3393dedc2ddec5f9988b17328094de1ec946db06 /arch/arm/mach-rockchip
parentad443b72909c4c68be4131f8b7af49fd7a89d793 (diff)
downloadtalos-obmc-uboot-74e53e0e9b7cf78a7e896cf6626f0ca607da5872.tar.gz
talos-obmc-uboot-74e53e0e9b7cf78a7e896cf6626f0ca607da5872.zip
rockchip: Add a simple 'clock' command
Add a command that displays the PLLs and their current rate. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/mach-rockchip')
-rw-r--r--arch/arm/mach-rockchip/board.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 380aa91a28..133d66341b 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <clk.h>
#include <dm.h>
#include <ram.h>
#include <asm/io.h>
@@ -49,3 +50,26 @@ void enable_caches(void)
void lowlevel_init(void)
{
}
+
+static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ struct udevice *dev;
+
+ for (uclass_first_device(UCLASS_CLK, &dev);
+ dev;
+ uclass_next_device(&dev)) {
+ ulong rate;
+
+ rate = clk_get_rate(dev);
+ printf("%s: %lu\n", dev->name, rate);
+ }
+
+ return 0;
+}
+
+U_BOOT_CMD(
+ clock, 2, 1, do_clock,
+ "display information about clocks",
+ ""
+);
OpenPOWER on IntegriCloud