From bfb0df3aba020bd53ab1fcd8aabc890d94002600 Mon Sep 17 00:00:00 2001 From: Pierre Peiffer Date: Tue, 17 Jan 2012 18:17:37 +0100 Subject: Ux500 CM: wake-up DSP before doing any bindings When we try to set up some bindings to a component instantiated on a DSP which is in retention, we need to wake it up first. ST-Ericsson ID: 406310, 406504 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: N/A Change-Id: I07dc1576cbac73bbc3b0cc057808f4e67e7ba378 Signed-off-by: Pierre Peiffer Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/45727 Reviewed-by: QABUILD --- .../staging/nmf-cm/cm/engine/communication/src/communication.c | 10 ++++++++-- .../cm/engine/executive_engine_mgt/src/executive_engine_mgt.c | 9 +++++++-- drivers/staging/nmf-cm/inc/nmf-def.h | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/staging/nmf-cm/cm/engine/communication/src/communication.c b/drivers/staging/nmf-cm/cm/engine/communication/src/communication.c index ead1e090d7c..811e9b8c1e6 100644 --- a/drivers/staging/nmf-cm/cm/engine/communication/src/communication.c +++ b/drivers/staging/nmf-cm/cm/engine/communication/src/communication.c @@ -170,11 +170,17 @@ PUBLIC void cm_COM_InitMpc(t_nmf_core_id coreId) if (localCoreId == coreId) continue; /* no coms fifo with itself ;) */ if(cm_DSP_GetState(localCoreId)->state != MPC_STATE_BOOTED) continue;/* no coms fifo initialisation with not booted MPC */ + fromNeighborsComsFifoIdSharedVar[coreId][localCoreId] = mpc2mpcComsFifoId[localCoreId][coreId]->dspAdress; toNeighborsComsFifoIdSharedVar[coreId][localCoreId] = mpc2mpcComsFifoId[coreId][localCoreId]->dspAdress; - fromNeighborsComsFifoIdSharedVar[localCoreId][coreId] = mpc2mpcComsFifoId[coreId][localCoreId]->dspAdress; - fromNeighborsComsFifoIdSharedVar[coreId][localCoreId] = mpc2mpcComsFifoId[localCoreId][coreId]->dspAdress; + LOG_INTERNAL(1, "ARM: Force Try to wake up on core id : %d\n", localCoreId, 0, 0, 0, 0, 0); + cm_EEM_ForceWakeup(localCoreId); + + fromNeighborsComsFifoIdSharedVar[localCoreId][coreId] = mpc2mpcComsFifoId[coreId][localCoreId]->dspAdress; toNeighborsComsFifoIdSharedVar[localCoreId][coreId] = mpc2mpcComsFifoId[localCoreId][coreId]->dspAdress; + + LOG_INTERNAL(1, "ARM: Force Allow sleep on core id : %d\n", localCoreId, 0, 0, 0, 0, 0); + cm_EEM_AllowSleep(localCoreId); } } diff --git a/drivers/staging/nmf-cm/cm/engine/executive_engine_mgt/src/executive_engine_mgt.c b/drivers/staging/nmf-cm/cm/engine/executive_engine_mgt/src/executive_engine_mgt.c index 4df3d7ee0f5..a00ca4c4683 100644 --- a/drivers/staging/nmf-cm/cm/engine/executive_engine_mgt/src/executive_engine_mgt.c +++ b/drivers/staging/nmf-cm/cm/engine/executive_engine_mgt/src/executive_engine_mgt.c @@ -339,7 +339,7 @@ t_cm_error cm_EEM_ForceWakeup(t_nmf_core_id coreId) { t_cm_error error; - LOG_INTERNAL(2, "ARM: Try to wake up\n", 0, 0, 0, 0, 0, 0); + LOG_INTERNAL(1, "ARM: Try to wake up on core id : %d\n", coreId, 0, 0, 0, 0, 0); if (cm_DSP_GetState(coreId)->state != MPC_STATE_BOOTED) { @@ -359,6 +359,9 @@ t_cm_error cm_EEM_ForceWakeup(t_nmf_core_id coreId) return error; } } + else + LOG_INTERNAL(1, "ARM: Not Try to wake up on core id : %d (nbOfForceWakeup = %d)\n", coreId, eeState[coreId].nbOfForceWakeup, 0, 0, 0, 0); + return CM_OK; } @@ -366,7 +369,7 @@ void cm_EEM_AllowSleep(t_nmf_core_id coreId) { if(--eeState[coreId].nbOfForceWakeup == 0) { - LOG_INTERNAL(2, "ARM: Allow sleep\n", 0, 0, 0, 0, 0, 0); + LOG_INTERNAL(1, "ARM: Allow sleep on core id : %d\n", coreId, 0, 0, 0, 0, 0); if (cm_DSP_GetState(coreId)->state != MPC_STATE_BOOTED) { @@ -376,6 +379,8 @@ void cm_EEM_AllowSleep(t_nmf_core_id coreId) ERROR("CM_MPC_NOT_RESPONDING: DSP %s can't be allow sleep'ed\n", cm_getDspName(coreId), 0, 0, 0, 0, 0); } } + else + LOG_INTERNAL(1, "ARM: Not Allow sleep on core id : %d (nbOfForceWakeup = %d)\n", coreId, eeState[coreId].nbOfForceWakeup, 0, 0, 0, 0); } /* internal api */ diff --git a/drivers/staging/nmf-cm/inc/nmf-def.h b/drivers/staging/nmf-cm/inc/nmf-def.h index 7cdea18996b..439adf8ef56 100644 --- a/drivers/staging/nmf-cm/inc/nmf-def.h +++ b/drivers/staging/nmf-cm/inc/nmf-def.h @@ -21,7 +21,7 @@ * * \ingroup NMF_VERSION */ -#define NMF_VERSION ((2 << 16) | (10 << 8) | (122)) +#define NMF_VERSION ((2 << 16) | (10 << 8) | (123)) /*! * \brief Get NMF major version corresponding to NMF version number -- cgit v1.2.3