* [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
@ 2014-09-03 12:04 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, chris, shawn.guo, b29396, linux-arm-kernel
A few clean up and fixes.
Dong Aisheng (7):
mmc: sdhci-esdhc-imx: remove duplicated lines
mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt
issue
mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
mmc: sdhci: do not enable card detect interrupt for gpio cd type
mmc: sdhci: do not enable card cd wakeup for gpio case
mmc: sdhci-esdhc-imx: add imx6sx support
mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl
drivers/mmc/host/sdhci-esdhc-imx.c | 44 ++++++++++++++++++++++++++++-------
drivers/mmc/host/sdhci.c | 8 +++++-
2 files changed, 41 insertions(+), 11 deletions(-)
--
1.7.8
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
@ 2014-09-03 12:04 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-arm-kernel
A few clean up and fixes.
Dong Aisheng (7):
mmc: sdhci-esdhc-imx: remove duplicated lines
mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt
issue
mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
mmc: sdhci: do not enable card detect interrupt for gpio cd type
mmc: sdhci: do not enable card cd wakeup for gpio case
mmc: sdhci-esdhc-imx: add imx6sx support
mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl
drivers/mmc/host/sdhci-esdhc-imx.c | 44 ++++++++++++++++++++++++++++-------
drivers/mmc/host/sdhci.c | 8 +++++-
2 files changed, 41 insertions(+), 11 deletions(-)
--
1.7.8
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 1/7] mmc: sdhci-esdhc-imx: remove duplicated lines
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:04 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, chris, shawn.guo, b29396, linux-arm-kernel
There is already the same register check above, no need the later one.
Move them into one place and delete the later one.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 587ee0e..256c901 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -315,6 +315,11 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
data |= ESDHC_CTRL_D3CD;
writel(data, host->ioaddr + SDHCI_HOST_CONTROL);
}
+
+ if (val & SDHCI_INT_ADMA_ERROR) {
+ val &= ~SDHCI_INT_ADMA_ERROR;
+ val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR;
+ }
}
if (unlikely((imx_data->socdata->flags & ESDHC_FLAG_MULTIBLK_NO_INT)
@@ -335,13 +340,6 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
}
}
- if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)) {
- if (val & SDHCI_INT_ADMA_ERROR) {
- val &= ~SDHCI_INT_ADMA_ERROR;
- val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR;
- }
- }
-
writel(val, host->ioaddr + reg);
}
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 1/7] mmc: sdhci-esdhc-imx: remove duplicated lines
@ 2014-09-03 12:04 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-arm-kernel
There is already the same register check above, no need the later one.
Move them into one place and delete the later one.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 587ee0e..256c901 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -315,6 +315,11 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
data |= ESDHC_CTRL_D3CD;
writel(data, host->ioaddr + SDHCI_HOST_CONTROL);
}
+
+ if (val & SDHCI_INT_ADMA_ERROR) {
+ val &= ~SDHCI_INT_ADMA_ERROR;
+ val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR;
+ }
}
if (unlikely((imx_data->socdata->flags & ESDHC_FLAG_MULTIBLK_NO_INT)
@@ -335,13 +340,6 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
}
}
- if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)) {
- if (val & SDHCI_INT_ADMA_ERROR) {
- val &= ~SDHCI_INT_ADMA_ERROR;
- val |= ESDHC_INT_VENDOR_SPEC_DMA_ERR;
- }
- }
-
writel(val, host->ioaddr + reg);
}
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 2/7] mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt issue
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:04 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, chris, shawn.guo, b29396, linux-arm-kernel
The usdhc does not have missing card interrupt issue, so execute the
workaround conditionally.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 256c901..9594bf8 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -300,7 +300,7 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
u32 data;
if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)) {
- if (val & SDHCI_INT_CARD_INT) {
+ if ((val & SDHCI_INT_CARD_INT) && !esdhc_is_usdhc(imx_data)) {
/*
* Clear and then set D3CD bit to avoid missing the
* card interrupt. This is a eSDHC controller problem
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 2/7] mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt issue
@ 2014-09-03 12:04 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-arm-kernel
The usdhc does not have missing card interrupt issue, so execute the
workaround conditionally.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 256c901..9594bf8 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -300,7 +300,7 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
u32 data;
if (unlikely(reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)) {
- if (val & SDHCI_INT_CARD_INT) {
+ if ((val & SDHCI_INT_CARD_INT) && !esdhc_is_usdhc(imx_data)) {
/*
* Clear and then set D3CD bit to avoid missing the
* card interrupt. This is a eSDHC controller problem
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 3/7] mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:04 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, shawn.guo, b29396, chris, linux-arm-kernel
The uSDHC has an ADMA Length Mismatch errata ERR004536 which may
cause ADMA work abnormally. The errata has already been fixed for
i.MX6Q TO1.2 and i.MX6DL TO1.1 by enable the bit 7 in 0x6c register.
Unfortunately this fix is not included in i.MX6SL.
So we disable ADMA for i.MX6SL and use SDMA instead.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 9594bf8..dc0e384 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -114,6 +114,12 @@
#define ESDHC_FLAG_STD_TUNING BIT(5)
/* The IP has SDHCI_CAPABILITIES_1 register */
#define ESDHC_FLAG_HAVE_CAP1 BIT(6)
+/*
+ * The IP has errata ERR004536
+ * uSDHC: ADMA Length Mismatch Error occurs if the AHB read access is slow,
+ * when reading data from the card
+ */
+#define ESDHC_FLAG_ERR004536 BIT(7)
struct esdhc_soc_data {
u32 flags;
@@ -141,7 +147,7 @@ static struct esdhc_soc_data usdhc_imx6q_data = {
static struct esdhc_soc_data usdhc_imx6sl_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
- | ESDHC_FLAG_HAVE_CAP1,
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
};
struct pltfm_imx_data {
@@ -1050,6 +1056,13 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL);
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
host->mmc->caps |= MMC_CAP_1_8V_DDR;
+
+ /*
+ * errata ESDHC_FLAG_ERR004536 fix for MX6Q TO1.2 and MX6DL
+ * TO1.1, it's harmless for MX6SL
+ */
+ writel(readl(host->ioaddr + 0x6c) | BIT(7),
+ host->ioaddr + 0x6c);
}
if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING)
@@ -1061,6 +1074,9 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
ESDHC_STD_TUNING_EN | ESDHC_TUNING_START_TAP,
host->ioaddr + ESDHC_TUNING_CTRL);
+ if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536)
+ host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
+
boarddata = &imx_data->boarddata;
if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
if (!host->mmc->parent->platform_data) {
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 3/7] mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
@ 2014-09-03 12:04 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:04 UTC (permalink / raw)
To: linux-arm-kernel
The uSDHC has an ADMA Length Mismatch errata ERR004536 which may
cause ADMA work abnormally. The errata has already been fixed for
i.MX6Q TO1.2 and i.MX6DL TO1.1 by enable the bit 7 in 0x6c register.
Unfortunately this fix is not included in i.MX6SL.
So we disable ADMA for i.MX6SL and use SDMA instead.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 9594bf8..dc0e384 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -114,6 +114,12 @@
#define ESDHC_FLAG_STD_TUNING BIT(5)
/* The IP has SDHCI_CAPABILITIES_1 register */
#define ESDHC_FLAG_HAVE_CAP1 BIT(6)
+/*
+ * The IP has errata ERR004536
+ * uSDHC: ADMA Length Mismatch Error occurs if the AHB read access is slow,
+ * when reading data from the card
+ */
+#define ESDHC_FLAG_ERR004536 BIT(7)
struct esdhc_soc_data {
u32 flags;
@@ -141,7 +147,7 @@ static struct esdhc_soc_data usdhc_imx6q_data = {
static struct esdhc_soc_data usdhc_imx6sl_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
- | ESDHC_FLAG_HAVE_CAP1,
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
};
struct pltfm_imx_data {
@@ -1050,6 +1056,13 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL);
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
host->mmc->caps |= MMC_CAP_1_8V_DDR;
+
+ /*
+ * errata ESDHC_FLAG_ERR004536 fix for MX6Q TO1.2 and MX6DL
+ * TO1.1, it's harmless for MX6SL
+ */
+ writel(readl(host->ioaddr + 0x6c) | BIT(7),
+ host->ioaddr + 0x6c);
}
if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING)
@@ -1061,6 +1074,9 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
ESDHC_STD_TUNING_EN | ESDHC_TUNING_START_TAP,
host->ioaddr + ESDHC_TUNING_CTRL);
+ if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536)
+ host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
+
boarddata = &imx_data->boarddata;
if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
if (!host->mmc->parent->platform_data) {
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 4/7] mmc: sdhci: do not enable card detect interrupt for gpio cd type
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:05 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, chris, shawn.guo, b29396, linux-arm-kernel
Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE,
we also do not need to handle controller native card detect interrupt
for gpio as card detect case.
If we wrong enabled the card detect interrupt for gpio case,
it will cause a lot of unexpected card detect interrupts during data transfer
which should not happen.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f6a683b..4d0b7b5 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -136,9 +136,10 @@ static void sdhci_dumpregs(struct sdhci_host *host)
static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
{
u32 present;
+ int gpio_cd = mmc_gpio_get_cd(host->mmc);
if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
- (host->mmc->caps & MMC_CAP_NONREMOVABLE))
+ (host->mmc->caps & MMC_CAP_NONREMOVABLE) || !IS_ERR_VALUE(gpio_cd))
return;
if (enable) {
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 4/7] mmc: sdhci: do not enable card detect interrupt for gpio cd type
@ 2014-09-03 12:05 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-arm-kernel
Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE,
we also do not need to handle controller native card detect interrupt
for gpio as card detect case.
If we wrong enabled the card detect interrupt for gpio case,
it will cause a lot of unexpected card detect interrupts during data transfer
which should not happen.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f6a683b..4d0b7b5 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -136,9 +136,10 @@ static void sdhci_dumpregs(struct sdhci_host *host)
static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
{
u32 present;
+ int gpio_cd = mmc_gpio_get_cd(host->mmc);
if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
- (host->mmc->caps & MMC_CAP_NONREMOVABLE))
+ (host->mmc->caps & MMC_CAP_NONREMOVABLE) || !IS_ERR_VALUE(gpio_cd))
return;
if (enable) {
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 5/7] mmc: sdhci: do not enable card cd wakeup for gpio case
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:05 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, chris, shawn.guo, b29396, linux-arm-kernel
Do not need to enable the controller card cd interrupt wakeup
if using GPIO as card detect since it's meaningless.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4d0b7b5..7aa98b9 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2548,13 +2548,16 @@ static irqreturn_t sdhci_thread_irq(int irq, void *dev_id)
void sdhci_enable_irq_wakeups(struct sdhci_host *host)
{
u8 val;
+ int gpio_cd = mmc_gpio_get_cd(host->mmc);
+
u8 mask = SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE
| SDHCI_WAKE_ON_INT;
val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL);
val |= mask ;
/* Avoid fake wake up */
- if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
+ if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION ||
+ !IS_ERR_VALUE(gpio_cd))
val &= ~(SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE);
sdhci_writeb(host, val, SDHCI_WAKE_UP_CONTROL);
}
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 5/7] mmc: sdhci: do not enable card cd wakeup for gpio case
@ 2014-09-03 12:05 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-arm-kernel
Do not need to enable the controller card cd interrupt wakeup
if using GPIO as card detect since it's meaningless.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4d0b7b5..7aa98b9 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2548,13 +2548,16 @@ static irqreturn_t sdhci_thread_irq(int irq, void *dev_id)
void sdhci_enable_irq_wakeups(struct sdhci_host *host)
{
u8 val;
+ int gpio_cd = mmc_gpio_get_cd(host->mmc);
+
u8 mask = SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE
| SDHCI_WAKE_ON_INT;
val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL);
val |= mask ;
/* Avoid fake wake up */
- if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
+ if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION ||
+ !IS_ERR_VALUE(gpio_cd))
val &= ~(SDHCI_WAKE_ON_INSERT | SDHCI_WAKE_ON_REMOVE);
sdhci_writeb(host, val, SDHCI_WAKE_UP_CONTROL);
}
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:05 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, shawn.guo, b29396, chris, linux-arm-kernel
The imx6sx usdhc is derived from imx6sl, the difference is minor.
imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
So introduce a new compatible string for imx6sx to distinguish them.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index dc0e384..87179c4 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
};
+static struct esdhc_soc_data usdhc_imx6sx_data = {
+ .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
+ | ESDHC_FLAG_HAVE_CAP1,
+};
+
struct pltfm_imx_data {
u32 scratchpad;
struct pinctrl *pinctrl;
@@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
{ .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
{ .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
{ .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
+ { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
{ .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
{ .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
{ /* sentinel */ }
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
@ 2014-09-03 12:05 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-arm-kernel
The imx6sx usdhc is derived from imx6sl, the difference is minor.
imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
So introduce a new compatible string for imx6sx to distinguish them.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index dc0e384..87179c4 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
};
+static struct esdhc_soc_data usdhc_imx6sx_data = {
+ .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
+ | ESDHC_FLAG_HAVE_CAP1,
+};
+
struct pltfm_imx_data {
u32 scratchpad;
struct pinctrl *pinctrl;
@@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
{ .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
{ .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
{ .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
+ { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
{ .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
{ .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
{ /* sentinel */ }
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 7/7] mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:05 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-mmc; +Cc: ulf.hansson, chris, shawn.guo, b29396, linux-arm-kernel
The iMX6Q/DL can not support HS200 mode while iMX6SL and iMX6SX can,
so introduce a new flag to distinguish them.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 87179c4..16eff00 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -120,6 +120,8 @@
* when reading data from the card
*/
#define ESDHC_FLAG_ERR004536 BIT(7)
+/* The IP supports HS200 mode */
+#define ESDHC_FLAG_HS200 BIT(8)
struct esdhc_soc_data {
u32 flags;
@@ -147,12 +149,13 @@ static struct esdhc_soc_data usdhc_imx6q_data = {
static struct esdhc_soc_data usdhc_imx6sl_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
- | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536
+ | ESDHC_FLAG_HS200,
};
static struct esdhc_soc_data usdhc_imx6sx_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
- | ESDHC_FLAG_HAVE_CAP1,
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
};
struct pltfm_imx_data {
@@ -1063,6 +1066,9 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
host->mmc->caps |= MMC_CAP_1_8V_DDR;
+ if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
+ host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
+
/*
* errata ESDHC_FLAG_ERR004536 fix for MX6Q TO1.2 and MX6DL
* TO1.1, it's harmless for MX6SL
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 7/7] mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl
@ 2014-09-03 12:05 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:05 UTC (permalink / raw)
To: linux-arm-kernel
The iMX6Q/DL can not support HS200 mode while iMX6SL and iMX6SX can,
so introduce a new flag to distinguish them.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 87179c4..16eff00 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -120,6 +120,8 @@
* when reading data from the card
*/
#define ESDHC_FLAG_ERR004536 BIT(7)
+/* The IP supports HS200 mode */
+#define ESDHC_FLAG_HS200 BIT(8)
struct esdhc_soc_data {
u32 flags;
@@ -147,12 +149,13 @@ static struct esdhc_soc_data usdhc_imx6q_data = {
static struct esdhc_soc_data usdhc_imx6sl_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
- | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536
+ | ESDHC_FLAG_HS200,
};
static struct esdhc_soc_data usdhc_imx6sx_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
- | ESDHC_FLAG_HAVE_CAP1,
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
};
struct pltfm_imx_data {
@@ -1063,6 +1066,9 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
host->mmc->caps |= MMC_CAP_1_8V_DDR;
+ if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
+ host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
+
/*
* errata ESDHC_FLAG_ERR004536 fix for MX6Q TO1.2 and MX6DL
* TO1.1, it's harmless for MX6SL
--
1.7.8
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
2014-09-03 12:34 ` Fabio Estevam
@ 2014-09-03 12:19 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:19 UTC (permalink / raw)
To: Fabio Estevam
Cc: linux-mmc, Ulf Hansson, Chris Ball, Shawn Guo, linux-arm-kernel
On Wed, Sep 03, 2014 at 09:34:28AM -0300, Fabio Estevam wrote:
> Hi Dong,
>
> On Wed, Sep 3, 2014 at 9:04 AM, Dong Aisheng <b29396@freescale.com> wrote:
> > A few clean up and fixes.
>
> Usually it is a good idea to separate cleanup from fixes. Do any of
> the fixes should go to 3.17-rc or stable?
>
Thanks for reminder.
Most are tiny fixes and clean up.
If to be strictly, Patch 3 mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
could go to stable although the issue is very very hard to reproduce as stated
in errata.
Regards
Dong Aisheng
> Regards,
>
> Fabio Estevam
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
@ 2014-09-03 12:19 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-03 12:19 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 03, 2014 at 09:34:28AM -0300, Fabio Estevam wrote:
> Hi Dong,
>
> On Wed, Sep 3, 2014 at 9:04 AM, Dong Aisheng <b29396@freescale.com> wrote:
> > A few clean up and fixes.
>
> Usually it is a good idea to separate cleanup from fixes. Do any of
> the fixes should go to 3.17-rc or stable?
>
Thanks for reminder.
Most are tiny fixes and clean up.
If to be strictly, Patch 3 mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
could go to stable although the issue is very very hard to reproduce as stated
in errata.
Regards
Dong Aisheng
> Regards,
>
> Fabio Estevam
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-03 12:34 ` Fabio Estevam
-1 siblings, 0 replies; 28+ messages in thread
From: Fabio Estevam @ 2014-09-03 12:34 UTC (permalink / raw)
To: Dong Aisheng
Cc: linux-mmc, Ulf Hansson, Chris Ball, Shawn Guo, linux-arm-kernel
Hi Dong,
On Wed, Sep 3, 2014 at 9:04 AM, Dong Aisheng <b29396@freescale.com> wrote:
> A few clean up and fixes.
Usually it is a good idea to separate cleanup from fixes. Do any of
the fixes should go to 3.17-rc or stable?
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
@ 2014-09-03 12:34 ` Fabio Estevam
0 siblings, 0 replies; 28+ messages in thread
From: Fabio Estevam @ 2014-09-03 12:34 UTC (permalink / raw)
To: linux-arm-kernel
Hi Dong,
On Wed, Sep 3, 2014 at 9:04 AM, Dong Aisheng <b29396@freescale.com> wrote:
> A few clean up and fixes.
Usually it is a good idea to separate cleanup from fixes. Do any of
the fixes should go to 3.17-rc or stable?
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
2014-09-03 12:04 ` Dong Aisheng
@ 2014-09-04 5:07 ` Shawn Guo
-1 siblings, 0 replies; 28+ messages in thread
From: Shawn Guo @ 2014-09-04 5:07 UTC (permalink / raw)
To: Dong Aisheng; +Cc: ulf.hansson, linux-mmc, chris, linux-arm-kernel
On Wed, Sep 03, 2014 at 08:04:56PM +0800, Dong Aisheng wrote:
> A few clean up and fixes.
>
> Dong Aisheng (7):
> mmc: sdhci-esdhc-imx: remove duplicated lines
> mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt
> issue
> mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
> mmc: sdhci: do not enable card detect interrupt for gpio cd type
> mmc: sdhci: do not enable card cd wakeup for gpio case
> mmc: sdhci-esdhc-imx: add imx6sx support
> mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl
For all 7,
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes
@ 2014-09-04 5:07 ` Shawn Guo
0 siblings, 0 replies; 28+ messages in thread
From: Shawn Guo @ 2014-09-04 5:07 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 03, 2014 at 08:04:56PM +0800, Dong Aisheng wrote:
> A few clean up and fixes.
>
> Dong Aisheng (7):
> mmc: sdhci-esdhc-imx: remove duplicated lines
> mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt
> issue
> mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix
> mmc: sdhci: do not enable card detect interrupt for gpio cd type
> mmc: sdhci: do not enable card cd wakeup for gpio case
> mmc: sdhci-esdhc-imx: add imx6sx support
> mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl
For all 7,
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
2014-09-03 12:05 ` Dong Aisheng
@ 2014-09-17 22:29 ` Ulf Hansson
-1 siblings, 0 replies; 28+ messages in thread
From: Ulf Hansson @ 2014-09-17 22:29 UTC (permalink / raw)
To: Dong Aisheng; +Cc: linux-mmc, Chris Ball, Shawn Guo, linux-arm-kernel
On 3 September 2014 14:05, Dong Aisheng <b29396@freescale.com> wrote:
> The imx6sx usdhc is derived from imx6sl, the difference is minor.
> imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
> So introduce a new compatible string for imx6sx to distinguish them.
>
> Signed-off-by: Dong Aisheng <b29396@freescale.com>
Hi Dong,
This one has checkpatch errors due to missing DT documentation.
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index dc0e384..87179c4 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
> | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
> };
>
> +static struct esdhc_soc_data usdhc_imx6sx_data = {
> + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> + | ESDHC_FLAG_HAVE_CAP1,
> +};
> +
> struct pltfm_imx_data {
> u32 scratchpad;
> struct pinctrl *pinctrl;
> @@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
> { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
> { .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
> { .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
> + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
> { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
> { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
> { /* sentinel */ }
> --
> 1.7.8
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
@ 2014-09-17 22:29 ` Ulf Hansson
0 siblings, 0 replies; 28+ messages in thread
From: Ulf Hansson @ 2014-09-17 22:29 UTC (permalink / raw)
To: linux-arm-kernel
On 3 September 2014 14:05, Dong Aisheng <b29396@freescale.com> wrote:
> The imx6sx usdhc is derived from imx6sl, the difference is minor.
> imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
> So introduce a new compatible string for imx6sx to distinguish them.
>
> Signed-off-by: Dong Aisheng <b29396@freescale.com>
Hi Dong,
This one has checkpatch errors due to missing DT documentation.
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index dc0e384..87179c4 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
> | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
> };
>
> +static struct esdhc_soc_data usdhc_imx6sx_data = {
> + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> + | ESDHC_FLAG_HAVE_CAP1,
> +};
> +
> struct pltfm_imx_data {
> u32 scratchpad;
> struct pinctrl *pinctrl;
> @@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
> { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
> { .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
> { .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
> + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
> { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
> { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
> { /* sentinel */ }
> --
> 1.7.8
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
2014-09-17 22:29 ` Ulf Hansson
@ 2014-09-18 5:35 ` Dong Aisheng
-1 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-18 5:35 UTC (permalink / raw)
To: Ulf Hansson; +Cc: Shawn Guo, linux-mmc, Chris Ball, linux-arm-kernel
On Thu, Sep 18, 2014 at 12:29:52AM +0200, Ulf Hansson wrote:
> On 3 September 2014 14:05, Dong Aisheng <b29396@freescale.com> wrote:
> > The imx6sx usdhc is derived from imx6sl, the difference is minor.
> > imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
> > So introduce a new compatible string for imx6sx to distinguish them.
> >
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
>
> Hi Dong,
>
> This one has checkpatch errors due to missing DT documentation.
>
The original binding doc is writing in the format of:
Required properties:
-- compatible : Should be "fsl,<chip>-esdhc"
It just provides a rule and does not provide the specific compatible string.
So i did not update the doc before.
But i think it's better to fix it to avoid future warning again.
Can you help add below patch before this commit or do you need me
to resend the patch series again with this patch added?
>From 467b84e5ffcba543b9ac88913b1d2dc1159dfa72 Mon Sep 17 00:00:00 2001
From: Dong Aisheng <b29396@freescale.com>
Date: Thu, 18 Sep 2014 13:11:03 +0800
Subject: [PATCH 6/8] mmc: sdhci-esdhc-imx: using specific compatible string
in binding doc
Using specific compatible string in binding doc to make the binding
more clear.
It's also used to avoid checkpatch warning in the future like follows:
0005-mmc-sdhci-do-not-enable-card-cd-wakeup-for-gpio-case.patch has no obvious style problems and is ready for submission.
WARNING: DT compatible string "fsl,imx6sx-usdhc" appears un-documented -- check ./Documentation/devicetree/bindings/
+ { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
total: 0 errors, 1 warnings, 18 lines checked
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
.../devicetree/bindings/mmc/fsl-imx-esdhc.txt | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 9046ba06..c415d34 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -7,7 +7,14 @@ This file documents differences between the core properties described
by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
Required properties:
-- compatible : Should be "fsl,<chip>-esdhc"
+- compatible : Should be "fsl,<chip>-esdhc", the supported chips include
+ "fsl,imx25-esdhc"
+ "fsl,imx35-esdhc"
+ "fsl,imx51-esdhc"
+ "fsl,imx53-esdhc"
+ "fsl,imx6q-usdhc"
+ "fsl,imx6sl-usdhc"
+ "fsl,imx6sx-usdhc"
Optional properties:
- fsl,cd-controller : Indicate to use controller internal card detection
--
1.7.8
Regards
Dong Aisheng
> Kind regards
> Uffe
>
> > ---
> > drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
> > 1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> > index dc0e384..87179c4 100644
> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> > @@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
> > | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
> > };
> >
> > +static struct esdhc_soc_data usdhc_imx6sx_data = {
> > + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> > + | ESDHC_FLAG_HAVE_CAP1,
> > +};
> > +
> > struct pltfm_imx_data {
> > u32 scratchpad;
> > struct pinctrl *pinctrl;
> > @@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
> > { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
> > { .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
> > { .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
> > + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
> > { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
> > { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
> > { /* sentinel */ }
> > --
> > 1.7.8
> >
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
@ 2014-09-18 5:35 ` Dong Aisheng
0 siblings, 0 replies; 28+ messages in thread
From: Dong Aisheng @ 2014-09-18 5:35 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 18, 2014 at 12:29:52AM +0200, Ulf Hansson wrote:
> On 3 September 2014 14:05, Dong Aisheng <b29396@freescale.com> wrote:
> > The imx6sx usdhc is derived from imx6sl, the difference is minor.
> > imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
> > So introduce a new compatible string for imx6sx to distinguish them.
> >
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
>
> Hi Dong,
>
> This one has checkpatch errors due to missing DT documentation.
>
The original binding doc is writing in the format of:
Required properties:
-- compatible : Should be "fsl,<chip>-esdhc"
It just provides a rule and does not provide the specific compatible string.
So i did not update the doc before.
But i think it's better to fix it to avoid future warning again.
Can you help add below patch before this commit or do you need me
to resend the patch series again with this patch added?
>From 467b84e5ffcba543b9ac88913b1d2dc1159dfa72 Mon Sep 17 00:00:00 2001
From: Dong Aisheng <b29396@freescale.com>
Date: Thu, 18 Sep 2014 13:11:03 +0800
Subject: [PATCH 6/8] mmc: sdhci-esdhc-imx: using specific compatible string
in binding doc
Using specific compatible string in binding doc to make the binding
more clear.
It's also used to avoid checkpatch warning in the future like follows:
0005-mmc-sdhci-do-not-enable-card-cd-wakeup-for-gpio-case.patch has no obvious style problems and is ready for submission.
WARNING: DT compatible string "fsl,imx6sx-usdhc" appears un-documented -- check ./Documentation/devicetree/bindings/
+ { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
total: 0 errors, 1 warnings, 18 lines checked
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
.../devicetree/bindings/mmc/fsl-imx-esdhc.txt | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 9046ba06..c415d34 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -7,7 +7,14 @@ This file documents differences between the core properties described
by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
Required properties:
-- compatible : Should be "fsl,<chip>-esdhc"
+- compatible : Should be "fsl,<chip>-esdhc", the supported chips include
+ "fsl,imx25-esdhc"
+ "fsl,imx35-esdhc"
+ "fsl,imx51-esdhc"
+ "fsl,imx53-esdhc"
+ "fsl,imx6q-usdhc"
+ "fsl,imx6sl-usdhc"
+ "fsl,imx6sx-usdhc"
Optional properties:
- fsl,cd-controller : Indicate to use controller internal card detection
--
1.7.8
Regards
Dong Aisheng
> Kind regards
> Uffe
>
> > ---
> > drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
> > 1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> > index dc0e384..87179c4 100644
> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> > @@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
> > | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
> > };
> >
> > +static struct esdhc_soc_data usdhc_imx6sx_data = {
> > + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> > + | ESDHC_FLAG_HAVE_CAP1,
> > +};
> > +
> > struct pltfm_imx_data {
> > u32 scratchpad;
> > struct pinctrl *pinctrl;
> > @@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
> > { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
> > { .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
> > { .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
> > + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
> > { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
> > { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
> > { /* sentinel */ }
> > --
> > 1.7.8
> >
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
2014-09-18 5:35 ` Dong Aisheng
@ 2014-09-19 17:54 ` Ulf Hansson
-1 siblings, 0 replies; 28+ messages in thread
From: Ulf Hansson @ 2014-09-19 17:54 UTC (permalink / raw)
To: Dong Aisheng; +Cc: linux-mmc, Chris Ball, Shawn Guo, linux-arm-kernel
On 18 September 2014 07:35, Dong Aisheng <b29396@freescale.com> wrote:
> On Thu, Sep 18, 2014 at 12:29:52AM +0200, Ulf Hansson wrote:
>> On 3 September 2014 14:05, Dong Aisheng <b29396@freescale.com> wrote:
>> > The imx6sx usdhc is derived from imx6sl, the difference is minor.
>> > imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
>> > So introduce a new compatible string for imx6sx to distinguish them.
>> >
>> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
>>
>> Hi Dong,
>>
>> This one has checkpatch errors due to missing DT documentation.
>>
>
> The original binding doc is writing in the format of:
> Required properties:
> -- compatible : Should be "fsl,<chip>-esdhc"
> It just provides a rule and does not provide the specific compatible string.
> So i did not update the doc before.
>
> But i think it's better to fix it to avoid future warning again.
>
> Can you help add below patch before this commit or do you need me
> to resend the patch series again with this patch added?
Please make resend, that's easier for me to handle.
Kind regards
Uffe
>
> From 467b84e5ffcba543b9ac88913b1d2dc1159dfa72 Mon Sep 17 00:00:00 2001
> From: Dong Aisheng <b29396@freescale.com>
> Date: Thu, 18 Sep 2014 13:11:03 +0800
> Subject: [PATCH 6/8] mmc: sdhci-esdhc-imx: using specific compatible string
> in binding doc
>
> Using specific compatible string in binding doc to make the binding
> more clear.
> It's also used to avoid checkpatch warning in the future like follows:
> 0005-mmc-sdhci-do-not-enable-card-cd-wakeup-for-gpio-case.patch has no obvious style problems and is ready for submission.
> WARNING: DT compatible string "fsl,imx6sx-usdhc" appears un-documented -- check ./Documentation/devicetree/bindings/
> + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
>
> total: 0 errors, 1 warnings, 18 lines checked
>
> Signed-off-by: Dong Aisheng <b29396@freescale.com>
> ---
> .../devicetree/bindings/mmc/fsl-imx-esdhc.txt | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 9046ba06..c415d34 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -7,7 +7,14 @@ This file documents differences between the core properties described
> by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
>
> Required properties:
> -- compatible : Should be "fsl,<chip>-esdhc"
> +- compatible : Should be "fsl,<chip>-esdhc", the supported chips include
> + "fsl,imx25-esdhc"
> + "fsl,imx35-esdhc"
> + "fsl,imx51-esdhc"
> + "fsl,imx53-esdhc"
> + "fsl,imx6q-usdhc"
> + "fsl,imx6sl-usdhc"
> + "fsl,imx6sx-usdhc"
>
> Optional properties:
> - fsl,cd-controller : Indicate to use controller internal card detection
> --
> 1.7.8
>
> Regards
> Dong Aisheng
>
>> Kind regards
>> Uffe
>>
>> > ---
>> > drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
>> > 1 files changed, 6 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>> > index dc0e384..87179c4 100644
>> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>> > @@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
>> > | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
>> > };
>> >
>> > +static struct esdhc_soc_data usdhc_imx6sx_data = {
>> > + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
>> > + | ESDHC_FLAG_HAVE_CAP1,
>> > +};
>> > +
>> > struct pltfm_imx_data {
>> > u32 scratchpad;
>> > struct pinctrl *pinctrl;
>> > @@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
>> > { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
>> > { .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
>> > { .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
>> > + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
>> > { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
>> > { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
>> > { /* sentinel */ }
>> > --
>> > 1.7.8
>> >
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support
@ 2014-09-19 17:54 ` Ulf Hansson
0 siblings, 0 replies; 28+ messages in thread
From: Ulf Hansson @ 2014-09-19 17:54 UTC (permalink / raw)
To: linux-arm-kernel
On 18 September 2014 07:35, Dong Aisheng <b29396@freescale.com> wrote:
> On Thu, Sep 18, 2014 at 12:29:52AM +0200, Ulf Hansson wrote:
>> On 3 September 2014 14:05, Dong Aisheng <b29396@freescale.com> wrote:
>> > The imx6sx usdhc is derived from imx6sl, the difference is minor.
>> > imx6sx have the errata ESDHC_FLAG_ERR004536 fixed.
>> > So introduce a new compatible string for imx6sx to distinguish them.
>> >
>> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
>>
>> Hi Dong,
>>
>> This one has checkpatch errors due to missing DT documentation.
>>
>
> The original binding doc is writing in the format of:
> Required properties:
> -- compatible : Should be "fsl,<chip>-esdhc"
> It just provides a rule and does not provide the specific compatible string.
> So i did not update the doc before.
>
> But i think it's better to fix it to avoid future warning again.
>
> Can you help add below patch before this commit or do you need me
> to resend the patch series again with this patch added?
Please make resend, that's easier for me to handle.
Kind regards
Uffe
>
> From 467b84e5ffcba543b9ac88913b1d2dc1159dfa72 Mon Sep 17 00:00:00 2001
> From: Dong Aisheng <b29396@freescale.com>
> Date: Thu, 18 Sep 2014 13:11:03 +0800
> Subject: [PATCH 6/8] mmc: sdhci-esdhc-imx: using specific compatible string
> in binding doc
>
> Using specific compatible string in binding doc to make the binding
> more clear.
> It's also used to avoid checkpatch warning in the future like follows:
> 0005-mmc-sdhci-do-not-enable-card-cd-wakeup-for-gpio-case.patch has no obvious style problems and is ready for submission.
> WARNING: DT compatible string "fsl,imx6sx-usdhc" appears un-documented -- check ./Documentation/devicetree/bindings/
> + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
>
> total: 0 errors, 1 warnings, 18 lines checked
>
> Signed-off-by: Dong Aisheng <b29396@freescale.com>
> ---
> .../devicetree/bindings/mmc/fsl-imx-esdhc.txt | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 9046ba06..c415d34 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -7,7 +7,14 @@ This file documents differences between the core properties described
> by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
>
> Required properties:
> -- compatible : Should be "fsl,<chip>-esdhc"
> +- compatible : Should be "fsl,<chip>-esdhc", the supported chips include
> + "fsl,imx25-esdhc"
> + "fsl,imx35-esdhc"
> + "fsl,imx51-esdhc"
> + "fsl,imx53-esdhc"
> + "fsl,imx6q-usdhc"
> + "fsl,imx6sl-usdhc"
> + "fsl,imx6sx-usdhc"
>
> Optional properties:
> - fsl,cd-controller : Indicate to use controller internal card detection
> --
> 1.7.8
>
> Regards
> Dong Aisheng
>
>> Kind regards
>> Uffe
>>
>> > ---
>> > drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++
>> > 1 files changed, 6 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>> > index dc0e384..87179c4 100644
>> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>> > @@ -150,6 +150,11 @@ static struct esdhc_soc_data usdhc_imx6sl_data = {
>> > | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536,
>> > };
>> >
>> > +static struct esdhc_soc_data usdhc_imx6sx_data = {
>> > + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
>> > + | ESDHC_FLAG_HAVE_CAP1,
>> > +};
>> > +
>> > struct pltfm_imx_data {
>> > u32 scratchpad;
>> > struct pinctrl *pinctrl;
>> > @@ -190,6 +195,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
>> > { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
>> > { .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
>> > { .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
>> > + { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
>> > { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
>> > { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
>> > { /* sentinel */ }
>> > --
>> > 1.7.8
>> >
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2014-09-19 17:54 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 12:04 [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes Dong Aisheng
2014-09-03 12:04 ` Dong Aisheng
2014-09-03 12:04 ` [PATCH 1/7] mmc: sdhci-esdhc-imx: remove duplicated lines Dong Aisheng
2014-09-03 12:04 ` Dong Aisheng
2014-09-03 12:04 ` [PATCH 2/7] mmc: sdhci-esdhc-imx: usdhc does not have missing card interrupt issue Dong Aisheng
2014-09-03 12:04 ` Dong Aisheng
2014-09-03 12:04 ` [PATCH 3/7] mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix Dong Aisheng
2014-09-03 12:04 ` Dong Aisheng
2014-09-03 12:05 ` [PATCH 4/7] mmc: sdhci: do not enable card detect interrupt for gpio cd type Dong Aisheng
2014-09-03 12:05 ` Dong Aisheng
2014-09-03 12:05 ` [PATCH 5/7] mmc: sdhci: do not enable card cd wakeup for gpio case Dong Aisheng
2014-09-03 12:05 ` Dong Aisheng
2014-09-03 12:05 ` [PATCH 6/7] mmc: sdhci-esdhc-imx: add imx6sx support Dong Aisheng
2014-09-03 12:05 ` Dong Aisheng
2014-09-17 22:29 ` Ulf Hansson
2014-09-17 22:29 ` Ulf Hansson
2014-09-18 5:35 ` Dong Aisheng
2014-09-18 5:35 ` Dong Aisheng
2014-09-19 17:54 ` Ulf Hansson
2014-09-19 17:54 ` Ulf Hansson
2014-09-03 12:05 ` [PATCH 7/7] mmc: sdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl Dong Aisheng
2014-09-03 12:05 ` Dong Aisheng
2014-09-03 12:34 ` [PATCH 0/7] mmc: sdhci/imx: a few clean up and fixes Fabio Estevam
2014-09-03 12:34 ` Fabio Estevam
2014-09-03 12:19 ` Dong Aisheng
2014-09-03 12:19 ` Dong Aisheng
2014-09-04 5:07 ` Shawn Guo
2014-09-04 5:07 ` Shawn Guo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.