aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-03-31 08:43:48 +0200
committerRobert Marklund <robert.marklund@stericsson.com>2011-05-13 10:40:31 +0200
commitac2a71d55ff1275339b6e2bbd27b25248ba0a3df (patch)
treedaeea581d04fe0c3f97957f99e0ba2bf11249da0 /drivers/mmc
parent3205a00cdba9ff0e86749cb3e21b6ad495590e90 (diff)
mmci/pl180: Support for ST-Ericsson db8500v2
ST-Ericsson modified ARM PrimeCell PL180 block has not got an updated corresponding amba-id, althought the IP block has changed in db8500v2. The change was done to the datactrl register. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 4c40a1ca261..55abea2c6f9 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -54,6 +54,7 @@ static unsigned int fmax = 515633;
* @pwrreg_powerup: power up value for MMCIPOWER register
* @non_power_of_2_blksize: variant supports block sizes that are not
* a power of two.
+ * @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register
*/
struct variant_data {
unsigned int clkreg;
@@ -65,6 +66,7 @@ struct variant_data {
bool st_clkdiv;
unsigned int pwrreg_powerup;
bool non_power_of_2_blksize;
+ bool blksz_datactrl16;
};
static struct variant_data variant_arm = {
@@ -95,6 +97,19 @@ static struct variant_data variant_ux500 = {
.non_power_of_2_blksize = true,
};
+static struct variant_data variant_ux500v2 = {
+ .fifosize = 30 * 4,
+ .fifohalfsize = 8 * 4,
+ .clkreg = MCI_CLK_ENABLE,
+ .clkreg_enable = MCI_ST_UX500_HWFCEN,
+ .datalength_bits = 24,
+ .sdio = true,
+ .st_clkdiv = true,
+ .pwrreg_powerup = MCI_PWR_ON,
+ .non_power_of_2_blksize = true,
+ .blksz_datactrl16 = true,
+};
+
/*
* This must be called with host->lock held
*/
@@ -496,7 +511,10 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
blksz_bits = ffs(data->blksz) - 1;
- datactrl = MCI_DPSM_ENABLE | blksz_bits << 4;
+ if (variant->blksz_datactrl16)
+ datactrl = MCI_DPSM_ENABLE | (data->blksz << 16);
+ else
+ datactrl = MCI_DPSM_ENABLE | blksz_bits << 4;
if (data->flags & MMC_DATA_READ)
datactrl |= MCI_DPSM_DIRECTION;
@@ -1458,9 +1476,14 @@ static struct amba_id mmci_ids[] = {
},
{
.id = 0x00480180,
- .mask = 0x00ffffff,
+ .mask = 0xf0ffffff,
.data = &variant_ux500,
},
+ {
+ .id = 0x10480180,
+ .mask = 0xf0ffffff,
+ .data = &variant_ux500v2,
+ },
{ 0, 0 },
};