clean up default_vreg_init
This commit is contained in:
parent
bfe8814c90
commit
59dca22769
3 changed files with 9 additions and 5 deletions
|
@ -1,4 +1,7 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
CROSS_COMPILE := arm-linux-
|
||||
|
||||
LINKERSCRIPT := $(MC1322X)/mc1322x.lds
|
||||
LIBMC1322X := $(MC1322X)/libmc1322x
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
/* has been tested and it good */
|
||||
#include <crm.h>
|
||||
|
||||
void default_vreg_init(void) {
|
||||
volatile uint32_t i;
|
||||
*(volatile uint32_t *)(0x80003000) = 0x00000018; /* set default state */
|
||||
*(volatile uint32_t *)(0x80003048) = 0x00000f04; /* bypass the buck */
|
||||
*CRM_SYS_CNTL = 0x00000018; /* set default state */
|
||||
*CRM_VREG_CNTL = 0x00000f04; /* bypass the buck */
|
||||
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 */
|
||||
*(volatile uint32_t *)(0x80003048) = 0x00000ff8; /* start the regulators */
|
||||
*CRM_VREG_CNTL = 0x00000ff8; /* start the regulators */
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MC1322X := ..
|
||||
|
||||
TARGETS := blink-red blink-green blink-blue blink-white blink-allio uart1-loopback
|
||||
TARGETS := blink-red blink-green blink-blue blink-white blink-allio uart1-loopback nvm-read
|
||||
|
||||
include $(MC1322X)/Makefile.include
|
||||
|
||||
|
|
Loading…
Reference in a new issue