summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c96f86e)
raw | patch | inline | side by side (parent: c96f86e)
author | Stefano Babic <sbabic@denx.de> | |
Sat, 13 Mar 2010 20:09:00 +0000 (21:09 +0100) | ||
committer | Wolfgang Denk <wd@denx.de> | |
Sun, 21 Mar 2010 21:22:52 +0000 (22:22 +0100) |
Some registers of the mxcmmc driver were accessed using
16 bit accessor functions, because only the LSB is
significant. This is not needed and generates
warnings.
Signed-off-by: Stefano Babic <sbabic@denx.de>
16 bit accessor functions, because only the LSB is
significant. This is not needed and generates
warnings.
Signed-off-by: Stefano Babic <sbabic@denx.de>
drivers/mmc/mxcmmc.c | patch | blob | history |
diff --git a/drivers/mmc/mxcmmc.c b/drivers/mmc/mxcmmc.c
index d30717661f95f02e44296c7b984812a2ad2a648a..59639539f304c43409650de56e3689fc246e191c 100644 (file)
--- a/drivers/mmc/mxcmmc.c
+++ b/drivers/mmc/mxcmmc.c
int i;
/* reset sequence */
- writew(STR_STP_CLK_RESET, &host->base->str_stp_clk);
- writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
+ writel(STR_STP_CLK_RESET, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
&host->base->str_stp_clk);
for (i = 0; i < 8; i++)
- writew(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
- writew(0xff, &host->base->res_to);
+ writel(0xff, &host->base->res_to);
}
static void mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data)
host->data = data;
- writew(nob, &host->base->nob);
- writew(blksz, &host->base->blk_len);
+ writel(nob, &host->base->nob);
+ writel(blksz, &host->base->blk_len);
host->datasize = datasize;
}
return -EINVAL;
}
- writew(cmd->cmdidx, &host->base->cmd);
+ writel(cmd->cmdidx, &host->base->cmd);
writel(cmd->cmdarg, &host->base->arg);
- writew(cmdat, &host->base->cmd_dat_cont);
+ writel(cmdat, &host->base->cmd_dat_cont);
return 0;
}
if (cmd->resp_type & MMC_RSP_PRESENT) {
if (cmd->resp_type & MMC_RSP_136) {
for (i = 0; i < 4; i++) {
- a = readw(&host->base->res_fifo);
- b = readw(&host->base->res_fifo);
+ a = readl(&host->base->res_fifo) & 0xFFFF;
+ b = readl(&host->base->res_fifo) & 0xFFFF;
resp[i] = a << 16 | b;
}
} else {
- a = readw(&host->base->res_fifo);
- b = readw(&host->base->res_fifo);
- c = readw(&host->base->res_fifo);
+ a = readl(&host->base->res_fifo) & 0xFFFF;
+ b = readl(&host->base->res_fifo) & 0xFFFF;
+ c = readl(&host->base->res_fifo) & 0xFFFF;
resp[0] = a << 24 | b << 8 | c >> 8;
}
}
prescaler <<= 1;
}
- writew((prescaler << 4) | divider, &host->base->clk_rate);
+ writel((prescaler << 4) | divider, &host->base->clk_rate);
}
static void mxcmci_set_ios(struct mmc *mmc)
if (mmc->clock) {
mxcmci_set_clk_rate(host, mmc->clock);
- writew(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_START_CLK, &host->base->str_stp_clk);
} else {
- writew(STR_STP_CLK_STOP_CLK, &host->base->str_stp_clk);
+ writel(STR_STP_CLK_STOP_CLK, &host->base->str_stp_clk);
}
host->clock = mmc->clock;
mxcmci_softreset(host);
- host->rev_no = readw(&host->base->rev_no);
+ host->rev_no = readl(&host->base->rev_no);
if (host->rev_no != 0x400) {
printf("wrong rev.no. 0x%08x. aborting.\n",
host->rev_no);
}
/* recommended in data sheet */
- writew(0x2db4, &host->base->read_to);
+ writel(0x2db4, &host->base->read_to);
writel(0, &host->base->int_cntr);