clean up default_vreg_init

This commit is contained in:
Mariano Alvira 2010-02-26 07:30:53 -05:00
parent bfe8814c90
commit 59dca22769
3 changed files with 9 additions and 5 deletions

View file

@ -1,4 +1,7 @@
# -*- makefile -*- # -*- makefile -*-
CROSS_COMPILE := arm-linux-
LINKERSCRIPT := $(MC1322X)/mc1322x.lds LINKERSCRIPT := $(MC1322X)/mc1322x.lds
LIBMC1322X := $(MC1322X)/libmc1322x LIBMC1322X := $(MC1322X)/libmc1322x

View file

@ -1,9 +1,10 @@
/* has been tested and it good */ #include <crm.h>
void default_vreg_init(void) { void default_vreg_init(void) {
volatile uint32_t i; volatile uint32_t i;
*(volatile uint32_t *)(0x80003000) = 0x00000018; /* set default state */ *CRM_SYS_CNTL = 0x00000018; /* set default state */
*(volatile uint32_t *)(0x80003048) = 0x00000f04; /* bypass the buck */ *CRM_VREG_CNTL = 0x00000f04; /* bypass the buck */
for(i=0; i<0x161a8; i++) { continue; } /* wait for the bypass to take */ 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 */ // 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 */
} }

View file

@ -1,6 +1,6 @@
MC1322X := .. 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 include $(MC1322X)/Makefile.include