aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Uddaraju <chandanu@quicinc.com>2009-12-14 23:24:21 -0800
committerChandan Uddaraju <chandanu@quicinc.com>2009-12-14 23:24:21 -0800
commit9650197ffa98ec0672fc3cacf67e9000ccfdc7c4 (patch)
treeb673e24349c381823b235b33ab8d3e2d921661a3
parent241205063e4aa547636e285febd87b93c653be17 (diff)
downloadlk-9650197ffa98ec0672fc3cacf67e9000ccfdc7c4.tar.gz
[platform/msm7k]: Add code to wait till the mARM is ready to initialize the clocks
Before initializing the clock, wait for the modem to be ready. This will fix the jload problem of not reaching the l4 entry point. Add code to not implement this wait while flashing the apps images.
-rwxr-xr-xplatform/msm7k/acpuclock.c7
-rw-r--r--project/msm7627_ffa_nandwrite.mk1
-rw-r--r--project/msm7627_surf_nandwrite.mk1
3 files changed, 9 insertions, 0 deletions
diff --git a/platform/msm7k/acpuclock.c b/platform/msm7k/acpuclock.c
index 938df994..0516a574 100755
--- a/platform/msm7k/acpuclock.c
+++ b/platform/msm7k/acpuclock.c
@@ -88,6 +88,13 @@ void acpu_clock_init(void)
{
unsigned i;
+#if (!ENABLE_NANDWRITE)
+ int *modem_stat_check = (MSM_SHARED_BASE + 0x14);
+
+ /* Wait for modem to be ready before clock init */
+ while (readl(modem_stat_check) != 1);
+#endif
+
/* Increase VDD level to the final value. */
writel((1 << 7) | (VDD_LEVEL << 3), VDD_SVS_PLEVEL_ADDR);
thread_sleep(1);
diff --git a/project/msm7627_ffa_nandwrite.mk b/project/msm7627_ffa_nandwrite.mk
index 64cfa3a9..db0da102 100644
--- a/project/msm7627_ffa_nandwrite.mk
+++ b/project/msm7627_ffa_nandwrite.mk
@@ -7,6 +7,7 @@ TARGET := msm7627_ffa
MODULES += app/nandwrite
DEFINES += WITH_DEBUG_JTAG=1
+DEFINES += ENABLE_NANDWRITE=1
#DEFINES += WITH_DEBUG_DCC=1
#DEFINES += WITH_DEBUG_UART=1
#DEFINES += WITH_DEBUG_FBCON=1
diff --git a/project/msm7627_surf_nandwrite.mk b/project/msm7627_surf_nandwrite.mk
index 98d365a0..7daac2c6 100644
--- a/project/msm7627_surf_nandwrite.mk
+++ b/project/msm7627_surf_nandwrite.mk
@@ -7,6 +7,7 @@ TARGET := msm7627_surf
MODULES += app/nandwrite
DEFINES += WITH_DEBUG_JTAG=1
+DEFINES += ENABLE_NANDWRITE=1
#DEFINES += WITH_DEBUG_DCC=1
#DEFINES += WITH_DEBUG_UART=1
#DEFINES += WITH_DEBUG_FBCON=1