[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.0-2624-g50fe0b3
Brought to you by:
sszy
|
From: Nicolas <th...@us...> - 2011-12-07 15:33:43
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 50fe0b376054aedb57b7f45fa6d8e550127f679a (commit)
via b2b0097eca77674437e6de427ddf42f33701c368 (commit)
from 5dbcb0f3c41d8384f323fff845a326eb7b8ec7d2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 50fe0b376054aedb57b7f45fa6d8e550127f679a
Merge: b2b0097 5dbcb0f
Author: Nicolas Colombain <nic...@ar...>
Date: Wed Dec 7 16:32:56 2011 +0100
Merge branch 'master' of ssh://thom25@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit b2b0097eca77674437e6de427ddf42f33701c368
Author: Nicolas Colombain <nic...@ar...>
Date: Wed Dec 7 16:04:02 2011 +0100
[LINUX] update esdhc patches for linux 3.x
-----------------------------------------------------------------------
Summary of changes:
.../420-armadeus-esdhc-add_gpio_SD_detection.patch | 47 +++++++++++++++++++
..._possibility_to_deactivate_SDIO_interrupt.patch | 49 ++++++++++++--------
2 files changed, 77 insertions(+), 19 deletions(-)
create mode 100644 patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch
copy patches/linux/{2.6.38 => 3.0}/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch (59%)
diff --git a/patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch b/patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch
new file mode 100644
index 0000000..37d5bf4
--- /dev/null
+++ b/patches/linux/3.0/420-armadeus-esdhc-add_gpio_SD_detection.patch
@@ -0,0 +1,47 @@
+Add support for GPIO SD detection
+
+Signed-off-by: Nicolas Colombain <nic...@ar...>
+
+Index: linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c
+===================================================================
+--- linux-2.6.38.1.orig/drivers/mmc/host/sdhci-esdhc-imx.c 2011-03-30 18:33:47.000000000 +0200
++++ linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 18:11:27.000000000 +0200
+@@ -50,6 +50,29 @@ struct pltfm_imx_data {
+ u32 scratchpad;
+ };
+
++static u32 esdhc_readl(struct sdhci_host *host, int reg)
++{
++ u32 val;
++
++ if (unlikely(reg == SDHCI_PRESENT_STATE)) {
++ /* simulate card presence*/
++ val = readl(host->ioaddr + reg);
++ return val | SDHCI_CARD_PRESENT;
++ }
++
++ return readl(host->ioaddr + reg);
++}
++
++static void esdhc_writel(struct sdhci_host *host, u32 val, int reg)
++{
++ if (unlikely(reg == SDHCI_INT_ENABLE)) {
++ if (! ((val & SDHCI_INT_CARD_REMOVE) || (val & SDHCI_INT_CARD_INSERT)))
++ writel(val, host->ioaddr + reg);
++ }
++ else
++ writel(val, host->ioaddr + reg);
++}
++
+ static inline void esdhc_clrset_le(struct sdhci_host *host, u32 mask, u32 val, int reg)
+ {
+ void __iomem *base = host->ioaddr + (reg & ~0x3);
+@@ -273,7 +296,7 @@ static int esdhc_pltfm_init(struct sdhci
+ }
+
+ /* i.MX5x has issues to be researched */
+- if (!cpu_is_mx25() && !cpu_is_mx35())
++ if (!cpu_is_mx25() && !cpu_is_mx35() && !cpu_is_mx51())
+ goto not_supported;
+
+ err = request_irq(gpio_to_irq(boarddata->cd_gpio), cd_irq,
diff --git a/patches/linux/2.6.38/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch b/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
similarity index 59%
copy from patches/linux/2.6.38/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
copy to patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
index 1102f8a..c620f50 100644
--- a/patches/linux/2.6.38/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
+++ b/patches/linux/3.0/427-armadeus-esdhc-imx-add_possibility_to_deactivate_SDIO_interrupt.patch
@@ -6,12 +6,21 @@ Index: linux-2.6.38.1/include/linux/mmc/sdhci.h
===================================================================
--- linux-2.6.38.1.orig/include/linux/mmc/sdhci.h 2011-04-05 15:18:40.000000000 +0200
+++ linux-2.6.38.1/include/linux/mmc/sdhci.h 2011-04-05 15:19:26.000000000 +0200
-@@ -85,6 +85,8 @@
- #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29)
- /* Controller treats ADMA descriptors with length 0000h incorrectly */
+@@ -22,6 +22,7 @@ struct sdhci_host {
+ const char *hw_name; /* Hardware bus name */
+
+ unsigned int quirks; /* Deviations from spec. */
++ unsigned int quirks2; /* Deviations from spec. */
+
+ /* Controller doesn't honor resets unless we touch the clock register */
+ #define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0)
+@@ -87,6 +88,9 @@ struct sdhci_host {
#define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC (1<<30)
+ /* The read-only detection via SDHCI_PRESENT_STATE register is unstable */
+ #define SDHCI_QUIRK_UNSTABLE_RO_DETECT (1<<31)
++/* QUIRKS 2 */
+/* Controller do not handle SDIO interrupts correctly */
-+#define SDHCI_QUIRK_NO_SDIO_IRQ (1<<31)
++#define SDHCI_QUIRK_NO_SDIO_IRQ (1<<0)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
@@ -19,10 +28,10 @@ Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/esdhc.h
===================================================================
--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/esdhc.h 2011-04-05 15:18:40.000000000 +0200
+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/esdhc.h 2011-04-05 15:19:26.000000000 +0200
-@@ -13,5 +13,6 @@
+@@ -22,5 +22,6 @@
struct esdhc_platform_data {
- unsigned int wp_gpio; /* write protect pin */
- unsigned int cd_gpio; /* card detect pin */
+ unsigned int wp_gpio;
+ unsigned int cd_gpio;
+ unsigned int no_sdio_irq;
};
#endif /* __ASM_ARCH_IMX_ESDHC_H */
@@ -30,27 +39,29 @@ Index: linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c
===================================================================
--- linux-2.6.38.1.orig/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 15:22:09.000000000 +0200
+++ linux-2.6.38.1/drivers/mmc/host/sdhci-esdhc-imx.c 2011-04-05 15:23:48.000000000 +0200
-@@ -165,6 +165,9 @@
-
- host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
- }
+@@ -310,6 +310,9 @@ static int esdhc_pltfm_init(struct sdhci
+ imx_data->flags |= ESDHC_FLAG_GPIO_FOR_CD_WP;
+ /* Now we have a working card_detect again */
+ host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+
-+ if (pdat->no_sdio_irq)
++ if (boarddata->no_sdio_irq)
+ host->quirks |= SDHCI_QUIRK_NO_SDIO_IRQ;
}
- clk = clk_get(mmc_dev(host->mmc), NULL);
+ return 0;
Index: linux-2.6.38.1/drivers/mmc/host/sdhci.c
===================================================================
--- linux-2.6.38.1.orig/drivers/mmc/host/sdhci.c 2011-04-05 15:24:22.000000000 +0200
+++ linux-2.6.38.1/drivers/mmc/host/sdhci.c 2011-04-05 15:26:07.000000000 +0200
-@@ -1879,7 +1879,8 @@
+@@ -2485,7 +2485,10 @@ int sdhci_add_host(struct sdhci_host *ho
+ } else
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
- mmc->f_max = host->max_clk;
-- mmc->caps |= MMC_CAP_SDIO_IRQ;
-+ if (!(host->quirks & SDHCI_QUIRK_NO_SDIO_IRQ))
+- mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
++ mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23;
++
++ if (!(host->quirks2 & SDHCI_QUIRK_NO_SDIO_IRQ))
+ mmc->caps |= MMC_CAP_SDIO_IRQ;
- /*
- * A controller may support 8-bit width, but the board itself
+ if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
+ host->flags |= SDHCI_AUTO_CMD12;
hooks/post-receive
--
armadeus
|