summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2009-04-05 13:30:56 +0530
committerAndy Fleming <afleming@freescale.com>2009-06-02 17:18:57 -0500
commit998be3dd59ed0af4bec38324047fecfa88ac45db (patch)
tree0ac8f8919d3642e68e60f73bb734969165617736 /drivers
parent0b453ffe28bb9227d86ddbe0893bd19c93f04ed7 (diff)
downloadu-boot-imx-998be3dd59ed0af4bec38324047fecfa88ac45db.zip
u-boot-imx-998be3dd59ed0af4bec38324047fecfa88ac45db.tar.gz
u-boot-imx-998be3dd59ed0af4bec38324047fecfa88ac45db.tar.bz2
mmc: drop unnecessary casts
Now that response is a uint, we can drop all the casts. Signed-off-by: Rabin Vincent <rabin@rab.in>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/fsl_esdhc.c10
-rw-r--r--drivers/mmc/mmc.c20
2 files changed, 15 insertions, 15 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 0ba45cd..8274af5 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -206,12 +206,12 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
cmdrsp2 = in_be32(&regs->cmdrsp2);
cmdrsp1 = in_be32(&regs->cmdrsp1);
cmdrsp0 = in_be32(&regs->cmdrsp0);
- ((uint *)(cmd->response))[0] = (cmdrsp3 << 8) | (cmdrsp2 >> 24);
- ((uint *)(cmd->response))[1] = (cmdrsp2 << 8) | (cmdrsp1 >> 24);
- ((uint *)(cmd->response))[2] = (cmdrsp1 << 8) | (cmdrsp0 >> 24);
- ((uint *)(cmd->response))[3] = (cmdrsp0 << 8);
+ cmd->response[0] = (cmdrsp3 << 8) | (cmdrsp2 >> 24);
+ cmd->response[1] = (cmdrsp2 << 8) | (cmdrsp1 >> 24);
+ cmd->response[2] = (cmdrsp1 << 8) | (cmdrsp0 >> 24);
+ cmd->response[3] = (cmdrsp0 << 8);
} else
- ((uint *)(cmd->response))[0] = in_be32(&regs->cmdrsp0);
+ cmd->response[0] = in_be32(&regs->cmdrsp0);
/* Wait until all of the blocks are transferred */
if (data) {
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 1c89e31..925f863 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -292,7 +292,7 @@ sd_send_op_cond(struct mmc *mmc)
if (mmc->version != SD_VERSION_2)
mmc->version = SD_VERSION_1_0;
- mmc->ocr = ((uint *)(cmd.response))[0];
+ mmc->ocr = cmd.response[0];
mmc->high_capacity = ((mmc->ocr & OCR_HCS) == OCR_HCS);
mmc->rca = 0;
@@ -327,7 +327,7 @@ int mmc_send_op_cond(struct mmc *mmc)
return UNUSABLE_ERR;
mmc->version = MMC_VERSION_UNKNOWN;
- mmc->ocr = ((uint *)(cmd.response))[0];
+ mmc->ocr = cmd.response[0];
mmc->high_capacity = ((mmc->ocr & OCR_HCS) == OCR_HCS);
mmc->rca = 0;
@@ -632,7 +632,7 @@ int mmc_startup(struct mmc *mmc)
return err;
if (IS_SD(mmc))
- mmc->rca = (((uint *)(cmd.response))[0] >> 16) & 0xffff;
+ mmc->rca = (cmd.response[0] >> 16) & 0xffff;
/* Get the Card-Specific Data */
cmd.cmdidx = MMC_CMD_SEND_CSD;
@@ -645,10 +645,10 @@ int mmc_startup(struct mmc *mmc)
if (err)
return err;
- mmc->csd[0] = ((uint *)(cmd.response))[0];
- mmc->csd[1] = ((uint *)(cmd.response))[1];
- mmc->csd[2] = ((uint *)(cmd.response))[2];
- mmc->csd[3] = ((uint *)(cmd.response))[3];
+ mmc->csd[0] = cmd.response[0];
+ mmc->csd[1] = cmd.response[1];
+ mmc->csd[2] = cmd.response[2];
+ mmc->csd[3] = cmd.response[3];
if (mmc->version == MMC_VERSION_UNKNOWN) {
int version = (cmd.response[0] >> 26) & 0xf;
@@ -681,12 +681,12 @@ int mmc_startup(struct mmc *mmc)
mmc->tran_speed = freq * mult;
- mmc->read_bl_len = 1 << ((((uint *)(cmd.response))[1] >> 16) & 0xf);
+ mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
if (IS_SD(mmc))
mmc->write_bl_len = mmc->read_bl_len;
else
- mmc->write_bl_len = 1 << ((((uint *)(cmd.response))[3] >> 22) & 0xf);
+ mmc->write_bl_len = 1 << ((cmd.response[3] >> 22) & 0xf);
if (mmc->high_capacity) {
csize = (mmc->csd[1] & 0x3f) << 16
@@ -819,7 +819,7 @@ int mmc_send_if_cond(struct mmc *mmc)
if (err)
return err;
- if ((((uint *)(cmd.response))[0] & 0xff) != 0xaa)
+ if ((cmd.response[0] & 0xff) != 0xaa)
return UNUSABLE_ERR;
else
mmc->version = SD_VERSION_2;