am 6c3e7f5d: Fix problem in waking up path
Merge commit '6c3e7f5dcb9c7319a5541993c0516594dfffb916' into eclair-plus-aosp
* commit '6c3e7f5dcb9c7319a5541993c0516594dfffb916':
Fix problem in waking up path
diff --git a/wilink_6_1/Txn/SdioBusDrv.c b/wilink_6_1/Txn/SdioBusDrv.c
index 9264e7e..87da8f5 100644
--- a/wilink_6_1/Txn/SdioBusDrv.c
+++ b/wilink_6_1/Txn/SdioBusDrv.c
@@ -470,6 +470,19 @@
pTxnPart->uLength,
TXN_PARAM_GET_DIRECTION(pTxn),
pTxnPart->bMore);
+
+ /* If first write failed try once again (may happen once upon chip wakeup) */
+ if (eStatus == TXN_STATUS_ERROR)
+ {
+ /* Overwrite the function id with function 0 - for ELP register !!!! */
+ eStatus = sdioAdapt_TransactBytes (TXN_FUNC_ID_CTRL,
+ pTxnPart->uHwAddr,
+ pTxnPart->pHostAddr,
+ pTxnPart->uLength,
+ TXN_PARAM_GET_DIRECTION(pTxn),
+ pTxnPart->bMore);
+ TRACE0(pBusDrv->hReport, REPORT_SEVERITY_WARNING, "busDrv_SendTxnParts: SDIO Single-Step transaction failed once so try again");
+ }
}
else
{
diff --git a/wilink_6_1/platforms/hw/linux/SdioAdapter.c b/wilink_6_1/platforms/hw/linux/SdioAdapter.c
index ad70654..3acd447 100644
--- a/wilink_6_1/platforms/hw/linux/SdioAdapter.c
+++ b/wilink_6_1/platforms/hw/linux/SdioAdapter.c
@@ -501,9 +501,10 @@
unsigned int bDirection,
unsigned int bMore)
{
+ static unsigned int lastMore = 0;
int iStatus;
- if (bMore == 1)
+ if ((bMore == 1) || (lastMore == bMore))
{
sdioDrv_clk_enable();
}
@@ -522,6 +523,7 @@
{
sdioDrv_clk_disable();
}
+ lastMore = bMore;
/* If failed return ERROR, if succeeded return COMPLETE */
if (iStatus)