[U-Boot] [PATCH 05/13] mmc: tegra: Build warning fixes for 64-bit

Thierry Reding thierry.reding at gmail.com
Fri Mar 20 12:41:20 CET 2015


From: Thierry Reding <treding at nvidia.com>

Fix a couple of pointer to integer size mismatch warnings by casting
pointers to unsigned long rather than unsigned int.

Cc: Pantelis Antoniou <panto at antoniou-consulting.com>
Cc: Tom Warren <twarren at nvidia.com>
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
 drivers/mmc/tegra_mmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 2cd8cf10aec5..b6387b357d7a 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -67,7 +67,7 @@ static void mmc_prepare_data(struct mmc_host *host, struct mmc_data *data,
 		bbstate->bounce_buffer, bbstate->user_buffer, data->blocks,
 		data->blocksize);
 
-	writel((u32)bbstate->bounce_buffer, &host->reg->sysad);
+	writel((u32)(unsigned long)bbstate->bounce_buffer, &host->reg->sysad);
 	/*
 	 * DMASEL[4:3]
 	 * 00 = Selects SDMA
@@ -233,8 +233,8 @@ static int mmc_send_cmd_bounced(struct mmc *mmc, struct mmc_cmd *cmd,
 		if (cmd->resp_type & MMC_RSP_136) {
 			/* CRC is stripped so we need to do some shifting. */
 			for (i = 0; i < 4; i++) {
-				unsigned int offset =
-					(unsigned int)(&host->reg->rspreg3 - i);
+				unsigned long offset =
+					(unsigned long)(&host->reg->rspreg3 - i);
 				cmd->response[i] = readl(offset) << 8;
 
 				if (i != 3) {
-- 
2.3.2



More information about the U-Boot mailing list