summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-07-21 12:55:59 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-29 15:40:56 +0100
commit08458ef6eede6cf7d5a33c3a7c8bcdc3943012c2 (patch)
treec812872f484531e6d7a77ea14e22b7805f5856a4 /drivers/mmc
parent4380c14fd77338bac9d1da4dc5dd9f6eb4966c82 (diff)
downloadlinux-3.10-08458ef6eede6cf7d5a33c3a7c8bcdc3943012c2.tar.gz
linux-3.10-08458ef6eede6cf7d5a33c3a7c8bcdc3943012c2.tar.bz2
linux-3.10-08458ef6eede6cf7d5a33c3a7c8bcdc3943012c2.zip
ARM: 6246/1: mmci: support larger MMCIDATALENGTH register
The Ux500 variant has a 24-bit MMCIDATALENGTH register, as opposed to the 16-bit one on the ARM version. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 379af904bf6..7edae83603d 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -40,22 +40,27 @@ static unsigned int fmax = 515633;
* struct variant_data - MMCI variant-specific quirks
* @clkreg: default value for MCICLOCK register
* @clkreg_enable: enable value for MMCICLOCK register
+ * @datalength_bits: number of bits in the MMCIDATALENGTH register
*/
struct variant_data {
unsigned int clkreg;
unsigned int clkreg_enable;
+ unsigned int datalength_bits;
};
static struct variant_data variant_arm = {
+ .datalength_bits = 16,
};
static struct variant_data variant_u300 = {
.clkreg_enable = 1 << 13, /* HWFCEN */
+ .datalength_bits = 16,
};
static struct variant_data variant_ux500 = {
.clkreg = MCI_CLK_ENABLE,
.clkreg_enable = 1 << 14, /* HWFCEN */
+ .datalength_bits = 24,
};
/*
* This must be called with host->lock held
@@ -699,10 +704,11 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
mmc->max_phys_segs = NR_SG;
/*
- * Since we only have a 16-bit data length register, we must
- * ensure that we don't exceed 2^16-1 bytes in a single request.
+ * Since only a certain number of bits are valid in the data length
+ * register, we must ensure that we don't exceed 2^num-1 bytes in a
+ * single request.
*/
- mmc->max_req_size = 65535;
+ mmc->max_req_size = (1 << variant->datalength_bits) - 1;
/*
* Set the maximum segment size. Since we aren't doing DMA