Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172424
b: refs/heads/master
c: f9e8eef
h: refs/heads/master
v: v3
  • Loading branch information
Linus Walleij authored and Russell King committed Oct 19, 2009
1 parent 144c6dd commit e44bf73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 61 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: 3d81277b65b5b356d81e54fa71f04868cee739e2
refs/heads/master: f9e8eefc603c40d57e4579f1b202f784e8367fe4
64 changes: 4 additions & 60 deletions trunk/arch/arm/mach-u300/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,64 +40,6 @@ static unsigned int mmc_status(struct device *dev)
return mmci_card->mmc_inserted;
}

/*
* Here follows a large chunk of code which will only be enabled if you
* have both the AB3100 chip mounted and the MMC subsystem activated.
*/

static u32 mmc_translate_vdd(struct device *dev, unsigned int voltage)
{
int v;

/*
* MMC Spec:
* bit 7: 1.70 - 1.95V
* bit 8 - 14: 2.0 - 2.6V
* bit 15 - 23: 2.7 - 3.6V
*
* ab3100 voltages:
* 000 - 2.85V
* 001 - 2.75V
* 010 - 1.8V
* 011 - 1.5V
*/
switch (voltage) {
case 8:
v = 3;
break;
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
v = 1;
break;
case 16:
v = 1;
break;
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
v = 0;
break;
default:
v = 0;
break;
}

/* PL180 voltage register bits */
return v << 2;
}



static int mmci_callback(void *data)
{
struct mmci_card_event *mmci_card = data;
Expand Down Expand Up @@ -154,9 +96,11 @@ int __devinit mmc_init(struct amba_device *adev)
if (!mmci_card)
return -ENOMEM;

/*
* Do not set ocr_mask or voltage translation function,
* we have a regulator we can control instead.
*/
/* Nominally 2.85V on our platform */
mmci_card->mmc0_plat_data.ocr_mask = MMC_VDD_28_29;
mmci_card->mmc0_plat_data.translate_vdd = mmc_translate_vdd;
mmci_card->mmc0_plat_data.status = mmc_status;
mmci_card->mmc0_plat_data.gpio_wp = -1;
mmci_card->mmc0_plat_data.gpio_cd = -1;
Expand Down

0 comments on commit e44bf73

Please sign in to comment.