eenurkka commented on code in PR #9843:
URL: https://github.com/apache/nuttx/pull/9843#discussion_r1265283697
##########
arch/risc-v/src/mpfs/mpfs_emmcsd.c:
##########
@@ -2587,15 +2588,24 @@ static int mpfs_recvlong(struct sdio_dev_s *dev,
uint32_t cmd,
if (rlong)
{
- /* Last 8-bits are missing, see SRS04 documemntation, RESP3[23:0]
+ /* Last 8-bits are missing, see SRS04 documentation, RESP3[23:0]
* has only 24 bits unlike RESP2, RESP1 and RESP0 that have 32 bits.
* We have to shift left 8 bits to match the proper long response.
*/
- rlong[3] = getreg32(MPFS_EMMCSD_SRS04) << 8;
- rlong[2] = getreg32(MPFS_EMMCSD_SRS05) << 8;
- rlong[1] = getreg32(MPFS_EMMCSD_SRS06) << 8;
rlong[0] = getreg32(MPFS_EMMCSD_SRS07) << 8;
+ tmp = getreg32(MPFS_EMMCSD_SRS06);
+ rlong[0] |= tmp >> 24;
Review Comment:
Had similar originally (tmp & 0xff000000) >> 24, but tmp is uint32_t, no
need to & with any?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]