Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281765
b: refs/heads/master
c: c15def1
h: refs/heads/master
i:
  281763: 9002aef
v: v3
  • Loading branch information
Linus Walleij committed Dec 18, 2011
1 parent c1ee0a6 commit 2030a67
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 243 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: ca2ea4e8d4d63a62746333a32fa9054bb3ff7a33
refs/heads/master: c15def1cc30edeaa74a97205c936be82cdc86df6
54 changes: 20 additions & 34 deletions trunk/arch/arm/mach-ux500/board-mop500-sdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
#include "board-mop500.h"
#include "ste-dma40-db8500.h"

/*
* v2 has a new version of this block that need to be forced, the number found
* in hardware is incorrect
*/
#define U8500_SDI_V2_PERIPHID 0x10480180

/*
* SDI 0 (MicroSD slot)
*/
Expand Down Expand Up @@ -117,10 +123,7 @@ static void sdi0_configure(void)
gpio_direction_output(sdi0_en, 1);

/* Add the device, force v2 to subrevision 1 */
if (cpu_is_u8500v2())
db8500_add_sdi0(&mop500_sdi0_data, 0x10480180);
else
db8500_add_sdi0(&mop500_sdi0_data, 0);
db8500_add_sdi0(&mop500_sdi0_data, U8500_SDI_V2_PERIPHID);
}

void mop500_sdi_tc35892_init(void)
Expand Down Expand Up @@ -194,7 +197,8 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {
static struct mmci_platform_data mop500_sdi2_data = {
.ocr_mask = MMC_VDD_165_195,
.f_max = 50000000,
.capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
.capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA |
MMC_CAP_MMC_HIGHSPEED,
.gpio_cd = -1,
.gpio_wp = -1,
#ifdef CONFIG_STE_DMA40
Expand Down Expand Up @@ -244,20 +248,10 @@ static struct mmci_platform_data mop500_sdi4_data = {

void __init mop500_sdi_init(void)
{
u32 periphid = 0;

/* v2 has a new version of this block that need to be forced */
if (cpu_is_u8500v2())
periphid = 0x10480180;
/* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */
if (!cpu_is_u8500v10())
mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;

db8500_add_sdi2(&mop500_sdi2_data, periphid);

/* PoP:ed eMMC */
db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
/* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, periphid);

db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/*
* On boards with the TC35892 GPIO expander, sdi0 will finally
* be added when the TC35892 initializes and calls
Expand All @@ -267,13 +261,9 @@ void __init mop500_sdi_init(void)

void __init snowball_sdi_init(void)
{
u32 periphid = 0x10480180;

mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;

/* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, periphid);

db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/* External Micro SD slot */
mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
mop500_sdi0_data.cd_invert = true;
sdi0_en = SNOWBALL_SDMMC_EN_GPIO;
Expand All @@ -283,19 +273,15 @@ void __init snowball_sdi_init(void)

void __init hrefv60_sdi_init(void)
{
u32 periphid = 0x10480180;

mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;

db8500_add_sdi2(&mop500_sdi2_data, periphid);

/* PoP:ed eMMC */
db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
/* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, periphid);

db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/* External Micro SD slot */
mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
sdi0_en = HREFV60_SDMMC_EN_GPIO;
sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO;
sdi0_configure();

db8500_add_sdi1(&mop500_sdi1_data, periphid);
/* WLAN SDIO channel */
db8500_add_sdi1(&mop500_sdi1_data, U8500_SDI_V2_PERIPHID);
}
Loading

0 comments on commit 2030a67

Please sign in to comment.