mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-11-24 04:19:51 +00:00
MMC fixes for 3.5-rc5:
- omap_hsmmc: Using AUTO_CMD12 (enabled by default in 3.5-rc1) has been found to cause data corruption on the BeagleBoard, but no other OMAP boards so far. Revert the patch until there's a root cause explanation that makes sense, at which point we might decide to use a blacklist or whitelist. - mmc_block: Fix incorrect data timeouts for the case of multiblock (ACMD22) writes for block-addressed cards. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJP6kZlAAoJEHNBYZ7TNxYMAZcP/2Ot3TUs4wf9oi4taznM/87t uOON21Ueao62WFlyXaDFXKsILFG2rJcCSkwo0eyWHUMyDDrVImwoIwtyQ0GRtCKv jp3QYKNDEJYzHaK9vKrQYfxobYZeG7TyxAx+6YbjfyNewR+OJGnNkmqEImFxodH1 HbBaJK9W+I3weMXGiOZxeZyKGmD7vVixxwW90TKNyhF6nHApH/zJ9WUfUVK78H9g 3ywwrMo9Zly+padb6GBXeUnuacpbTZBW4KkeWuduL3A+avPVeL0LkHZlqsNK9T/y UkLN9R0emKlPSbGVYbRU3F/KySOA6cxTj2f/tCg8YJFhmu069ilqE56Ccvgs4fyk QW8QGP6Y+aleU4RjU6D0Zr3ylI4PzJyPoZlceYKgWGR8J3ElKmAAbRhZP/p5VZZE ClsVyQ6mb7uNSANmHc8ZfLwC1bsZz0Wr8Tg5aagURDIhUVlEAEe3xoTZOXkToD4m WOgyPpYvGRUGI+K2Cxe2+ekt2lFhkcuiSdwCO4DLZPJNknfx93xyYwUe+reKXGkP CGZstAp0o6GwtmD1XRrGk2SxJ+nmxRHgUk0QN2psyGWt8IrmQ4TL00I2YYTz6Eoi 3JmVYyXoZk8tuRqPkB1J3uV3pVnqoNUwykmeqIkZklA/jNSDcScLkxkC6mXqa9Bs 2Yq20k4f64c9xGMhV9Ux =fRAN -----END PGP SIGNATURE----- Merge tag 'mmc-fixes-for-3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC fixes from Chris Ball: - omap_hsmmc: Using AUTO_CMD12 (enabled by default in 3.5-rc1) has been found to cause data corruption on the BeagleBoard, but no other OMAP boards so far. Revert the patch until there's a root cause explanation that makes sense, at which point we might decide to use a blacklist or whitelist. - mmc_block: Fix incorrect data timeouts for the case of multiblock (ACMD22) writes for block-addressed cards. * tag 'mmc-fixes-for-3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: Revert "mmc: omap_hsmmc: Enable Auto CMD12" mmc: block: fix the data timeout issue with ACMD22
This commit is contained in:
commit
843760c58e
@ -554,7 +554,6 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
|
||||
struct mmc_request mrq = {NULL};
|
||||
struct mmc_command cmd = {0};
|
||||
struct mmc_data data = {0};
|
||||
unsigned int timeout_us;
|
||||
|
||||
struct scatterlist sg;
|
||||
|
||||
@ -574,23 +573,12 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
|
||||
cmd.arg = 0;
|
||||
cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
|
||||
|
||||
data.timeout_ns = card->csd.tacc_ns * 100;
|
||||
data.timeout_clks = card->csd.tacc_clks * 100;
|
||||
|
||||
timeout_us = data.timeout_ns / 1000;
|
||||
timeout_us += data.timeout_clks * 1000 /
|
||||
(card->host->ios.clock / 1000);
|
||||
|
||||
if (timeout_us > 100000) {
|
||||
data.timeout_ns = 100000000;
|
||||
data.timeout_clks = 0;
|
||||
}
|
||||
|
||||
data.blksz = 4;
|
||||
data.blocks = 1;
|
||||
data.flags = MMC_DATA_READ;
|
||||
data.sg = &sg;
|
||||
data.sg_len = 1;
|
||||
mmc_set_data_timeout(&data, card);
|
||||
|
||||
mrq.cmd = &cmd;
|
||||
mrq.data = &data;
|
||||
|
@ -85,7 +85,6 @@
|
||||
#define BRR_ENABLE (1 << 5)
|
||||
#define DTO_ENABLE (1 << 20)
|
||||
#define INIT_STREAM (1 << 1)
|
||||
#define ACEN_ACMD12 (1 << 2)
|
||||
#define DP_SELECT (1 << 21)
|
||||
#define DDIR (1 << 4)
|
||||
#define DMA_EN 0x1
|
||||
@ -117,7 +116,6 @@
|
||||
#define OMAP_MMC_MAX_CLOCK 52000000
|
||||
#define DRIVER_NAME "omap_hsmmc"
|
||||
|
||||
#define AUTO_CMD12 (1 << 0) /* Auto CMD12 support */
|
||||
/*
|
||||
* One controller can have multiple slots, like on some omap boards using
|
||||
* omap.c controller driver. Luckily this is not currently done on any known
|
||||
@ -177,7 +175,6 @@ struct omap_hsmmc_host {
|
||||
int reqs_blocked;
|
||||
int use_reg;
|
||||
int req_in_progress;
|
||||
unsigned int flags;
|
||||
struct omap_hsmmc_next next_data;
|
||||
|
||||
struct omap_mmc_platform_data *pdata;
|
||||
@ -773,8 +770,6 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd,
|
||||
cmdtype = 0x3;
|
||||
|
||||
cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
|
||||
if ((host->flags & AUTO_CMD12) && mmc_op_multi(cmd->opcode))
|
||||
cmdreg |= ACEN_ACMD12;
|
||||
|
||||
if (data) {
|
||||
cmdreg |= DP_SELECT | MSBS | BCE;
|
||||
@ -847,14 +842,11 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data)
|
||||
else
|
||||
data->bytes_xfered = 0;
|
||||
|
||||
if (data->stop && ((!(host->flags & AUTO_CMD12)) || data->error)) {
|
||||
omap_hsmmc_start_command(host, data->stop, NULL);
|
||||
} else {
|
||||
if (data->stop)
|
||||
data->stop->resp[0] = OMAP_HSMMC_READ(host->base,
|
||||
RSP76);
|
||||
if (!data->stop) {
|
||||
omap_hsmmc_request_done(host, data->mrq);
|
||||
return;
|
||||
}
|
||||
omap_hsmmc_start_command(host, data->stop, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1859,7 +1851,6 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
|
||||
host->mapbase = res->start + pdata->reg_offset;
|
||||
host->base = ioremap(host->mapbase, SZ_4K);
|
||||
host->power_mode = MMC_POWER_OFF;
|
||||
host->flags = AUTO_CMD12;
|
||||
host->next_data.cookie = 1;
|
||||
|
||||
platform_set_drvdata(pdev, host);
|
||||
|
Loading…
Reference in New Issue
Block a user