mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
Classic/6G: CPU frequency/voltage scaling
This patch implements HAVE_ADJUSTABLE_CPU_FREQ, it modifies the following parameters when CPU is unboosted: - s5l8702 voltage is decreased: 1.200V -> 1.050V - CPU frequency is divided by 4: 216MHz -> 54MHz - AHB frequency is divided by 2: 108MHz -> 54MHz Change-Id: I2285b83efb7e1567864ac288f2d4ba55f058f7c5
This commit is contained in:
parent
a75b5b83d4
commit
a85780bacc
6 changed files with 48 additions and 6 deletions
|
|
@ -39,13 +39,14 @@ void tick_start(unsigned int interval_in_ms)
|
|||
{
|
||||
int cycles = 10 * interval_in_ms;
|
||||
|
||||
/* configure timer for 10 kHz */
|
||||
/* configure timer for 10 kHz (external source) */
|
||||
TBCMD = (1 << 1); /* TB_CLR */
|
||||
TBPRE = 337 - 1; /* prescaler */
|
||||
TBPRE = 75 - 1; /* prescaler */ /* 12 MHz / 16 / 75 = 10 KHz */
|
||||
TBCON = (0 << 13) | /* TB_INT1_EN */
|
||||
(1 << 12) | /* TB_INT0_EN */
|
||||
(0 << 11) | /* TB_START */
|
||||
(2 << 8) | /* TB_CS = PCLK / 16 */
|
||||
(1 << 6) | /* UNKNOWN bit */ /* external 12 MHz clock (?) */
|
||||
(0 << 4); /* TB_MODE_SEL = interval mode */
|
||||
TBDATA0 = cycles; /* set interval period */
|
||||
TBCMD = (1 << 0); /* TB_EN */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue