diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-04-25 13:34:18 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-04-25 13:35:31 -0700 |
commit | 9374fd2f96d5b486e5c59ebb7f0648b948bdbe4e (patch) | |
tree | 9769885a59eb49b666254d71ef8b7d87065a6cb1 /chip/lm4 | |
parent | 83082746a9a463ad6a964cfc2f2abd0bf08d95fb (diff) | |
download | chrome-ec-9374fd2f96d5b486e5c59ebb7f0648b948bdbe4e.tar.gz |
Add more info to pll debug command
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=pll, then pll on, then pll off
Change-Id: I9e220a20e234f5eb30009d0a2a4fc080a167c971
Diffstat (limited to 'chip/lm4')
-rw-r--r-- | chip/lm4/clock.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chip/lm4/clock.c b/chip/lm4/clock.c index 81e36c001e..5be90207e6 100644 --- a/chip/lm4/clock.c +++ b/chip/lm4/clock.c @@ -193,8 +193,20 @@ DECLARE_CONSOLE_COMMAND(sleep, command_sleep); static int command_pll(int argc, char **argv) { /* Toggle the PLL */ - clock_enable_pll(LM4_SYSTEM_RCC & LM4_SYSTEM_RCC_BYPASS ? 1 : 0); - ccprintf("Clock frequency is now %d\n", clock_get_freq()); + if (argc > 1) { + if (!strcasecmp(argv[1], "off")) + clock_enable_pll(0); + else if (!strcasecmp(argv[1], "on")) + clock_enable_pll(1); + else + ccputs("Usage: pll [off | on]\n"); + } + + /* Print current PLL state */ + ccprintf("RCC: 0x%08x\n", LM4_SYSTEM_RCC); + ccprintf("RCC2: 0x%08x\n", LM4_SYSTEM_RCC2); + ccprintf("PLLSTAT: 0x%08x\n", LM4_SYSTEM_PLLSTAT); + ccprintf("Clock: %d Hz\n", clock_get_freq()); return EC_SUCCESS; } DECLARE_CONSOLE_COMMAND(pll, command_pll); |