From 59dca22769b2bcd73dbfdae48db6a3c08f97d2db Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Fri, 26 Feb 2010 07:30:53 -0500 Subject: [PATCH] clean up default_vreg_init --- Makefile.include | 3 +++ board/lowlevel.c | 9 +++++---- tests/Makefile | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile.include b/Makefile.include index 4561c1a47..1631fa113 100644 --- a/Makefile.include +++ b/Makefile.include @@ -1,4 +1,7 @@ # -*- makefile -*- + +CROSS_COMPILE := arm-linux- + LINKERSCRIPT := $(MC1322X)/mc1322x.lds LIBMC1322X := $(MC1322X)/libmc1322x diff --git a/board/lowlevel.c b/board/lowlevel.c index f6dc26ebc..c12b96dbe 100644 --- a/board/lowlevel.c +++ b/board/lowlevel.c @@ -1,9 +1,10 @@ -/* has been tested and it good */ +#include + 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 */ } diff --git a/tests/Makefile b/tests/Makefile index 0bf132d2b..8d588c7af 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -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