Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252363
b: refs/heads/master
c: 1784b15
h: refs/heads/master
i:
  252361: 30238e9
  252359: 00cbcae
v: v3
  • Loading branch information
Philippe Langlais authored and Russell King committed May 26, 2011
1 parent 80320f2 commit 8f3bb2b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 729303191ef4bd5df4c5e9ffca62268758928b2c
refs/heads/master: 1784b157c89cd2b5e6a3840abfdab6ed51f31d86
25 changes: 23 additions & 2 deletions trunk/drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ static unsigned int fmax = 515633;
* is asserted (likewise for RX)
* @sdio: variant supports SDIO
* @st_clkdiv: true if using a ST-specific clock divider algorithm
* @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register
*/
struct variant_data {
unsigned int clkreg;
Expand All @@ -60,6 +61,7 @@ struct variant_data {
unsigned int fifohalfsize;
bool sdio;
bool st_clkdiv;
bool blksz_datactrl16;
};

static struct variant_data variant_arm = {
Expand Down Expand Up @@ -92,6 +94,17 @@ static struct variant_data variant_ux500 = {
.st_clkdiv = 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,
.blksz_datactrl16 = true,
};

/*
* This must be called with host->lock held
*/
Expand Down Expand Up @@ -465,7 +478,10 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
blksz_bits = ffs(data->blksz) - 1;
BUG_ON(1 << blksz_bits != data->blksz);

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;
Expand Down Expand Up @@ -1311,9 +1327,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 },
};

Expand Down

0 comments on commit 8f3bb2b

Please sign in to comment.