mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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>
This commit is contained in:
parent
ad443b7290
commit
74e53e0e9b
1 changed files with 24 additions and 0 deletions
|
@ -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",
|
||||
""
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue