summaryrefslogtreecommitdiff
path: root/chip/lm4/registers.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-04-06 09:33:41 -0700
committerRandall Spangler <rspangler@chromium.org>2012-04-09 10:33:35 -0700
commite9328ac4f63351b4282916034270aa86b7e74922 (patch)
treed0fde5840594c33709927a5a4d1fabfe0f858c26 /chip/lm4/registers.h
parent1a9a415cf68c6e8e3b31972c072c81ed886290ab (diff)
downloadchrome-ec-e9328ac4f63351b4282916034270aa86b7e74922.tar.gz
Support dynamically changing the system clock
Add nopll command to turn off the PLL, reducing the system clock to 16Mhz. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:8798 TEST=manual boot system press power button to boot x86 temps // should print all temperatures timerinfo timerinfo timerinfo // convince yourself this is counting up at about 1MHz nopll // this drops the system clock to 16MHz temps // should still print all temperatures timerinfo timerinfo timerinfo // should still be counting up at about 1MHz Change-Id: Ie29ceb17af348148bffadf63d60c1b731f4c3f6d
Diffstat (limited to 'chip/lm4/registers.h')
-rw-r--r--chip/lm4/registers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/chip/lm4/registers.h b/chip/lm4/registers.h
index a572e763ed..1617e97cd4 100644
--- a/chip/lm4/registers.h
+++ b/chip/lm4/registers.h
@@ -191,7 +191,17 @@ static inline int lm4_fan_addr(int ch, int offset)
#define LM4_SYSTEM_MISC LM4REG(0x400fe058)
#define LM4_SYSTEM_RESC LM4REG(0x400fe05c)
#define LM4_SYSTEM_RCC LM4REG(0x400fe060)
+#define LM4_SYSTEM_RCC_SYSDIV(x) (((x) & 0xf) << 23)
+#define LM4_SYSTEM_RCC_USESYSDIV (1 << 22)
+#define LM4_SYSTEM_RCC_PWRDN (1 << 13)
+#define LM4_SYSTEM_RCC_BYPASS (1 << 11)
+#define LM4_SYSTEM_RCC_XTAL(x) (((x) & 0x1f) << 6)
+#define LM4_SYSTEM_RCC_OSCSRC(x) (((x) & 0x3) << 4)
+#define LM4_SYSTEM_RCC_IOSCDIS (1 << 1)
+#define LM4_SYSTEM_RCC_MOSCDIS (1 << 0)
#define LM4_SYSTEM_RCC2 LM4REG(0x400fe070)
+#define LM4_SYSTEM_RCC2_USERCC2 (1 << 31)
+#define LM4_SYSTEM_MOSCCTL LM4REG(0x400fe07c)
#define LM4_SYSTEM_PIOSCCAL LM4REG(0x400fe150)
#define LM4_SYSTEM_PIOSCSTAT LM4REG(0x400fe154)
#define LM4_SYSTEM_PLLSTAT LM4REG(0x400fe168)