diff options
author | Gerrit <chrome-bot@google.com> | 2012-04-25 15:13:05 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2012-04-25 15:13:05 -0700 |
commit | d85fa75275ef92c05d07d57f62004f79e816b7a5 (patch) | |
tree | cc23385711ce12070bcd8cce3f3e8b00111e7b93 /chip/lm4 | |
parent | 212784b5fab0a1ba30c45e66a9329423a6d998e5 (diff) | |
parent | 9374fd2f96d5b486e5c59ebb7f0648b948bdbe4e (diff) | |
download | chrome-ec-d85fa75275ef92c05d07d57f62004f79e816b7a5.tar.gz |
Merge "Add more info to pll debug command"
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); |