From 6f107e4cf6f9c7beddad5878e83436823bff3fa8 Mon Sep 17 00:00:00 2001 From: "masakazu.mochizuki.wd@hitachi.com" Date: Tue, 12 Apr 2016 17:11:41 +0900 Subject: arm: rmobile: Add BLANCHE board support BLANCHE is development board based on R-Car V2H SoC (R8A7792) This commit supports the following periherals: - SCIF, Ethernet, QSPI, MMC Signed-off-by: Masakazu Mochizuki Signed-off-by: Nobuhiro Iwamatsu --- drivers/mmc/sh_sdhi.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'drivers/mmc') diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c index dc4c686..e9d99a2 100644 --- a/drivers/mmc/sh_sdhi.c +++ b/drivers/mmc/sh_sdhi.c @@ -399,7 +399,6 @@ static void sh_sdhi_get_response(struct sh_sdhi_host *host, struct mmc_cmd *cmd) { unsigned short i, j, cnt = 1; unsigned short resp[8]; - unsigned long *p1, *p2; if (cmd->resp_type & MMC_RSP_136) { cnt = 4; @@ -418,30 +417,29 @@ static void sh_sdhi_get_response(struct sh_sdhi_host *host, struct mmc_cmd *cmd) resp[i] |= (resp[j--] >> 8) & 0x00ff; } resp[0] = (resp[0] << 8) & 0xff00; - - /* SDHI REGISTER SPECIFICATION */ - p1 = ((unsigned long *)resp) + 3; - } else { resp[0] = sh_sdhi_readw(host, SDHI_RSP00); resp[1] = sh_sdhi_readw(host, SDHI_RSP01); - - p1 = ((unsigned long *)resp); } - p2 = (unsigned long *)cmd->response; - - barrier(); - #if defined(__BIG_ENDIAN_BITFIELD) - for (i = 0; i < cnt; i++) { - *p2++ = ((*p1 >> 16) & 0x0000ffff) | - ((*p1 << 16) & 0xffff0000); - p1--; + if (cnt == 4) { + cmd->response[0] = (resp[6] << 16) | resp[7]; + cmd->response[1] = (resp[4] << 16) | resp[5]; + cmd->response[2] = (resp[2] << 16) | resp[3]; + cmd->response[3] = (resp[0] << 16) | resp[1]; + } else { + cmd->response[0] = (resp[0] << 16) | resp[1]; } #else - for (i = 0; i < cnt; i++) - *p2++ = *p1--; + if (cnt == 4) { + cmd->response[0] = (resp[7] << 16) | resp[6]; + cmd->response[1] = (resp[5] << 16) | resp[4]; + cmd->response[2] = (resp[3] << 16) | resp[2]; + cmd->response[3] = (resp[1] << 16) | resp[0]; + } else { + cmd->response[0] = (resp[1] << 16) | resp[0]; + } #endif /* __BIG_ENDIAN_BITFIELD */ } -- cgit v1.1