# HG changeset patch # User Space Falcon # Date 1430497679 0 # Node ID 2768b433927518a9db266467df4d5896f44b4caf # Parent d527ac304ad5a7a6fb0abe0609d7ddde2a914a8b a flash chip init/reset function added to Application_Initialize(), see the comments in gsm-fw/bsp/flashchipinit.S diff -r d527ac304ad5 -r 2768b4339275 gsm-fw/bsp/Makefile --- a/gsm-fw/bsp/Makefile Thu Apr 30 07:40:30 2015 +0000 +++ b/gsm-fw/bsp/Makefile Fri May 01 16:27:59 2015 +0000 @@ -5,7 +5,7 @@ sinclude ../include/config.mk -IOBJS= irq_twiddle.o niq32.o +IOBJS= flashchipinit.o irq_twiddle.o niq32.o XTOBJS= armio.o clkm.o init_target.o inth.o niq.o timer.o timer1.o timer2.o ifeq (${CONFIG_INCLUDE_SIM},1) diff -r d527ac304ad5 -r 2768b4339275 gsm-fw/bsp/flashchipinit.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/bsp/flashchipinit.S Fri May 01 16:27:59 2015 +0000 @@ -0,0 +1,46 @@ +/* + * TI's TCS211 firmware is designed to autodetect the flash chip type for + * its FFS, selecting different FFS configurations depending on what flash + * chip is found. In our FreeCalypso fw we fix our FFS configuration at + * compile time instead (for us it's more a matter of either mimicking or + * working around what the previous firmwares on our target devices do), + * so we have no "proper" place for flash chip type autodetection logic in + * our fw architecture. + * + * However, the following function (to be executed out of IRAM) mimics the + * sequence of flash chip accesses performed by TCS211's flash chip type + * autodetection function. It was added in a stray hope that it might fix + * the perplexing crash behavior we see when booting on a GTA02 modem that + * is "hot", i.e., powered off and then back on without giving it a long + * time to "cool". + */ + + .code 32 + .text + + .globl flash_chip_init +flash_chip_init: + ldr r1, =0x0300AAAA + ldr r2, =0x03005555 + ldr r3, =0x03000000 +/* read ID mode sequence */ + mov r0, #0xAA + strh r0, [r1] + mov r0, #0x55 + strh r0, [r2] + mov r0, #0x90 + strh r0, [r1] +/* dummy reads */ + ldrh r0, [r3, #0] + ldrh r0, [r3, #2] +/* Intel reset command */ + mov r0, #0xFF + strh r0, [r3] +/* AMD reset sequence */ + mov r0, #0xAA + strh r0, [r1] + mov r0, #0x55 + strh r0, [r2] + mov r0, #0xF0 + strh r0, [r1] + bx lr diff -r d527ac304ad5 -r 2768b4339275 gsm-fw/sysglue/appinit.c --- a/gsm-fw/sysglue/appinit.c Thu Apr 30 07:40:30 2015 +0000 +++ b/gsm-fw/sysglue/appinit.c Fri May 01 16:27:59 2015 +0000 @@ -15,6 +15,7 @@ * of calls to other functions, so I've inlined it. */ ABB_Sem_Create(); + flash_chip_init(); /* FreeCalypso addition */ ffs_main_init(); /* * The call to pcm_init() used to be at the end of ffs_main_init(),