mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
rk27xx: substitute magic constants with meaningful names for clock gating
Change-Id: I6c66c7496db3db78e5c959414464826134dbe200
This commit is contained in:
parent
1fa406dc21
commit
2b6dfdb34e
9 changed files with 66 additions and 35 deletions
|
|
@ -31,7 +31,7 @@ unsigned short adc_read(int channel)
|
|||
unsigned short result;
|
||||
|
||||
/* ungate lsadc clocks */
|
||||
SCU_CLKCFG &= ~(3<<23);
|
||||
SCU_CLKCFG &= ~(CLKCFG_LSADC|CLKCFG_PCLK_LSADC);
|
||||
|
||||
/* wait a bit for clock to stabilize */
|
||||
udelay(10);
|
||||
|
|
@ -51,7 +51,7 @@ unsigned short adc_read(int channel)
|
|||
result = (ADC_DATA & 0x3ff);
|
||||
|
||||
/* turn off lsadc clock when not in use */
|
||||
SCU_CLKCFG |= (3<<23);
|
||||
SCU_CLKCFG |= (CLKCFG_LSADC|CLKCFG_PCLK_LSADC);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue