Building w/ GCC v5.2, the SD card access is broken due to invalid data
in the response command reconstructed at the end of
sh_sdhci_get_response().
Add a memory barrier between the two main steps of this function to
ensure the resp[] table content is consistent before bits reordering.
This fix has been tested Ok on Porter board rev1.0 using v2016.03
release.
Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
}
p2 = (unsigned long *)cmd->response;
+
+ barrier();
+
#if defined(__BIG_ENDIAN_BITFIELD)
for (i = 0; i < cnt; i++) {
*p2++ = ((*p1 >> 16) & 0x0000ffff) |