Cosmetic changes to comments and coding style fixes

This commit is contained in:
Gregory Nutt 2013-09-22 14:48:22 -06:00
parent cf5cf0da72
commit 773a693ee2
2 changed files with 115 additions and 96 deletions

View File

@ -2361,7 +2361,7 @@ static sdio_eventset_t sam_eventwait(FAR struct sdio_dev_s *dev,
return SDIOWAIT_TIMEOUT;
}
/* Start the watchdog timer. I am not sure why this is, but I am\
/* Start the watchdog timer. I am not sure why this is, but I am
* currently seeing some additional delays when DMA is used.
*/

View File

@ -342,6 +342,7 @@ static int mmcsd_sendcmdpoll(FAR struct mmcsd_state_s *priv, uint32_t cmd,
fdbg("ERROR: Wait for response to cmd: %08x failed: %d\n", cmd, ret);
}
}
return ret;
}
@ -381,6 +382,7 @@ static inline int mmcsd_sendcmd4(FAR struct mmcsd_state_s *priv)
up_udelay(MMCSD_DSR_DELAY);
}
#endif
return ret;
}
@ -415,6 +417,7 @@ static int mmcsd_recvR1(FAR struct mmcsd_state_s *priv, uint32_t cmd)
ret = -EIO;
}
}
return ret;
}
@ -525,6 +528,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2])
{
fdbg("ERROR: mmcsd_eventwait for READ DATA failed: %d\n", ret);
}
return ret;
}
@ -997,6 +1001,7 @@ static int mmcsd_getR1(FAR struct mmcsd_state_s *priv, FAR uint32_t *r1)
*r1 = localR1;
}
}
return ret;
}
@ -1031,6 +1036,7 @@ static int mmcsd_verifystate(FAR struct mmcsd_state_s *priv, uint32_t state)
priv->wrbusy = false;
return OK;
}
return -EINVAL;
}
@ -1188,6 +1194,7 @@ static int mmcsd_transferready(FAR struct mmcsd_state_s *priv)
elapsed = clock_systimer() - starttime;
}
while (elapsed < TICK_PER_SEC);
return -ETIMEDOUT;
}
@ -1212,6 +1219,7 @@ static int mmcsd_stoptransmission(FAR struct mmcsd_state_s *priv)
{
fdbg("ERROR: mmcsd_recvR1 for CMD12 failed: %d\n", ret);
}
return ret;
}
#endif
@ -1303,6 +1311,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv,
{
offset = startblock << priv->blockshift;
}
fvdbg("offset=%d\n", offset);
/* Select the block size for the card */
@ -1593,6 +1602,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv,
{
offset = startblock << priv->blockshift;
}
fvdbg("offset=%d\n", offset);
/* Select the block size for the card */
@ -1707,6 +1717,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv,
{
offset = startblock << priv->blockshift;
}
fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset);
/* Select the block size for the card */
@ -2113,6 +2124,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
priv->mediachanged = false;
ret = OK;
}
mmcsd_givesem(priv);
}
@ -2365,6 +2377,7 @@ static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv)
fdbg("ERROR: SDIO_RECVR2 for MMC CID failed: %d\n", ret);
return ret;
}
mmcsd_decodeCID(priv, cid);
/* Send CMD3, SET_RELATIVE_ADDR. This command is used to assign a logical
@ -2407,6 +2420,7 @@ static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv)
fdbg("ERROR: Could not get SD CSD register: %d\n", ret);
return ret;
}
mmcsd_decodeCSD(priv, csd);
/* Set the Driver Stage Register (DSR) if (1) a CONFIG_MMCSD_DSR has been
@ -2464,6 +2478,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
fdbg("ERROR: SDIO_RECVR2 for SD CID failed: %d\n", ret);
return ret;
}
mmcsd_decodeCID(priv, cid);
/* Send CMD3, SET_RELATIVE_ADDR. In both protocols, this command is used
@ -2481,6 +2496,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
fdbg("ERROR: mmcsd_recvR2 for SD RCA failed: %d\n", ret);
return ret;
}
fvdbg("RCA: %04x\n", priv->rca);
/* This should have caused a transition to standby state. However, this will
@ -2510,6 +2526,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
fdbg("ERROR: Could not get SD CSD register(%d)\n", ret);
return ret;
}
mmcsd_decodeCSD(priv, csd);
/* Send CMD7 with the argument == RCA in order to select the card.
@ -2548,6 +2565,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
fdbg("ERROR: Could not get SD SCR register(%d)\n", ret);
return ret;
}
mmcsd_decodeSCR(priv, scr);
/* Select width (4-bit) bus operation (if the card supports it) */
@ -2750,6 +2768,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
* MMC card. We can send the CMD1 to find out for sure. CMD1 is supported
* by MMC cards, but not by SD cards.
*/
#ifdef CONFIG_MMCSD_MMCSUPPORT
if (priv->type == MMCSD_CARDTYPE_UNKNOWN || priv->type == MMCSD_CARDTYPE_MMC)
{
@ -2898,7 +2917,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv)
fdbg("ERROR: Internal confusion: %d\n", priv->type);
ret = -EPERM;
break;
};
}
/* Was the card configured successfully? */