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