FreeCalypso > hg > fc-tourmaline
comparison src/g23m-aci/aci/aci_pei.c @ 223:740a8e8fc9d7
startup sync logic rework for the new PWON button boot scheme
Previously we added logic to the MMI task to hold off PEI init until
R2D is running, and then extended that condition to wait for FCHG
init too. However, the dependencies of MMI upon R2D and FCHG don't
start until mmiInit(), and that call is driven by Switch_ON() code,
hence the wait for R2D and FCHG init can be made in that code path
instead of the MMI task. Furthermore, with our new way of signaling
PWON button boot to MMI, we need a new wait to ensure that the MMI
task is up - previously this assurance was provided by the wait for
Kp pointers to be set.
Solution: revert our previous PEI init hold-off additions to MMI,
add a new flag indicating MMI task init done, and put the combined
wait for all needed conditions into our new PWON button boot code
in power.c.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 27 Apr 2021 06:24:52 +0000 |
parents | 032a561fab2b |
children |
comparison
equal
deleted
inserted
replaced
222:c336ed5691a5 | 223:740a8e8fc9d7 |
---|---|
152 #endif | 152 #endif |
153 #endif | 153 #endif |
154 | 154 |
155 extern const char firmware_version_str[]; | 155 extern const char firmware_version_str[]; |
156 | 156 |
157 #if (MMI != 0) | 157 int mmi_task_init_done; |
158 extern int fchg_is_running, r2d_is_running; | |
159 #endif | |
160 | 158 |
161 | 159 |
162 /*==== DEFINE =====================================================*/ | 160 /*==== DEFINE =====================================================*/ |
163 | 161 |
164 /*==== EXPORT =====================================================*/ | 162 /*==== EXPORT =====================================================*/ |
1386 return PEI_ERROR; | 1384 return PEI_ERROR; |
1387 } | 1385 } |
1388 | 1386 |
1389 #endif /* TI_PS_HCOMM_CHANGE */ | 1387 #endif /* TI_PS_HCOMM_CHANGE */ |
1390 | 1388 |
1391 /* FreeCalypso addition to fix R2D start race condition */ | |
1392 /* wait for FCHG too now that MFW depends on it */ | |
1393 #if (MMI != 0) | |
1394 if (!fchg_is_running || !r2d_is_running) | |
1395 return PEI_ERROR; | |
1396 #endif | |
1397 | |
1398 #ifdef DTI | 1389 #ifdef DTI |
1399 #ifdef _SIMULATION_ | 1390 #ifdef _SIMULATION_ |
1400 /* | 1391 /* |
1401 * initialize dtilib for this entity | 1392 * initialize dtilib for this entity |
1402 */ | 1393 */ |
1592 #endif | 1583 #endif |
1593 | 1584 |
1594 #ifdef FF_MMI_RIV | 1585 #ifdef FF_MMI_RIV |
1595 acia_init(); | 1586 acia_init(); |
1596 #endif | 1587 #endif |
1588 | |
1589 mmi_task_init_done = 1; | |
1597 | 1590 |
1598 return PEI_OK; | 1591 return PEI_OK; |
1599 } | 1592 } |
1600 | 1593 |
1601 /* | 1594 /* |