[PATCH 24/133] [Jaunty SRU] ARM.imx51 Freescale:ENGR00110144 [MX51]Two esdhc port can't work simultaneously.
Brad Figg
brad.figg at canonical.com
Thu Jul 9 16:48:14 UTC 2009
From: Richard Zhu <r65037 at freescale.com>
On MX51 3DS platform, these two esdhc share a global struct
in linux driver, this sharing would cause the unexpected
clock gate on/off operations, that would make one esdhc
port can't generate the INT normally. So let each esdhc
port has its own global private struct.
Signed-off-by: Richard Zhu <r65037 at freescale.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
arch/arm/mach-mx51/mx51_3stack.c | 13 ++++++++++++-
drivers/mmc/host/mx_sdhci.c | 10 +++++-----
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-mx51/mx51_3stack.c b/arch/arm/mach-mx51/mx51_3stack.c
index 4b66a0c..764874f 100644
--- a/arch/arm/mach-mx51/mx51_3stack.c
+++ b/arch/arm/mach-mx51/mx51_3stack.c
@@ -487,6 +487,17 @@ static struct mxc_mmc_platform_data mmc_data = {
.clock_mmc = "esdhc_clk",
.power_mmc = NULL,
};
+static struct mxc_mmc_platform_data mmc1_data = {
+ .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30 |
+ MMC_VDD_31_32,
+ .caps = MMC_CAP_4_BIT_DATA,
+ .min_clk = 150000,
+ .max_clk = 50000000,
+ .card_inserted_state = 0,
+ .status = sdhc_get_card_det_status,
+ .wp_status = sdhc_write_protect,
+ .clock_mmc = "esdhc_clk",
+};
/*!
* Resource definition for the SDHC1
@@ -548,7 +559,7 @@ static struct platform_device mxcsdhc2_device = {
.id = 1,
.dev = {
.release = mxc_nop_release,
- .platform_data = &mmc_data,
+ .platform_data = &mmc1_data,
},
.num_resources = ARRAY_SIZE(mxcsdhc2_resources),
.resource = mxcsdhc2_resources,
diff --git a/drivers/mmc/host/mx_sdhci.c b/drivers/mmc/host/mx_sdhci.c
index 2d95201..f4c51b5 100644
--- a/drivers/mmc/host/mx_sdhci.c
+++ b/drivers/mmc/host/mx_sdhci.c
@@ -654,7 +654,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
WARN_ON(host->cmd);
/* Wait max 10 ms */
- timeout = 10;
+ timeout = 5000;
mask = SDHCI_CMD_INHIBIT;
if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY))
@@ -675,7 +675,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
return;
}
timeout--;
- mdelay(1);
+ udelay(20);
}
mod_timer(&host->timer, jiffies + 10 * HZ);
@@ -827,10 +827,10 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
host->ioaddr + SDHCI_CLOCK_CONTROL);
/* Wait max 10 ms */
- timeout = 10;
+ timeout = 5000;
while (timeout > 0) {
timeout--;
- mdelay(1);
+ udelay(20);
}
out:
@@ -1712,8 +1712,8 @@ static int __devinit sdhci_probe_slot(struct platform_device
else
host->flags |= SDHCI_CD_PRESENT;
- DBG("slot %d at 0x%x, irq %d\n", slot, host->res->start, host->irq);
no_detect_irq:
+ DBG("slot %d at 0x%x, irq %d \n", slot, host->res->start, host->irq);
if (!request_mem_region(host->res->start,
host->res->end -
host->res->start + 1, pdev->name)) {
--
1.6.0.4
More information about the kernel-team
mailing list