2010-02-26 13:30:53 +01:00
|
|
|
#include <crm.h>
|
|
|
|
|
2010-02-25 00:47:53 +01:00
|
|
|
void default_vreg_init(void) {
|
|
|
|
volatile uint32_t i;
|
2010-02-26 13:30:53 +01:00
|
|
|
*CRM_SYS_CNTL = 0x00000018; /* set default state */
|
|
|
|
*CRM_VREG_CNTL = 0x00000f04; /* bypass the buck */
|
2010-02-25 00:47:53 +01:00
|
|
|
for(i=0; i<0x161a8; i++) { continue; } /* wait for the bypass to take */
|
|
|
|
// while((((*(volatile uint32_t *)(0x80003018))>>17) & 1) !=1) { continue; } /* wait for the bypass to take */
|
2010-02-26 13:30:53 +01:00
|
|
|
*CRM_VREG_CNTL = 0x00000ff8; /* start the regulators */
|
2010-02-25 00:47:53 +01:00
|
|
|
}
|