* [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
@ 2010-10-28 2:54 zhangfei gao
2010-10-28 3:34 ` Philip Rakity
2010-10-28 3:42 ` Kyungmin Park
0 siblings, 2 replies; 7+ messages in thread
From: zhangfei gao @ 2010-10-28 2:54 UTC (permalink / raw)
To: linux-mmc
Cc: Chris Ball, Matt Fleming, eric.y.miao, Haojian Zhuang,
Philip Rakity
[-- Attachment #1: Type: text/plain, Size: 1977 bytes --]
>From 7f3529c21815990ebe4eec684e3c96156f774637 Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@marvell.com>
Date: Thu, 28 Oct 2010 10:44:15 -0400
Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device,
MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by
default
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
CC: Philip Rakity <prakity@marvell.com>
---
arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
drivers/mmc/host/sdhci-pxa.c | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h
b/arch/arm/plat-pxa/include/plat/sdhci.h
index e49c5b6..fc5ceab 100644
--- a/arch/arm/plat-pxa/include/plat/sdhci.h
+++ b/arch/arm/plat-pxa/include/plat/sdhci.h
@@ -16,6 +16,8 @@
/* pxa specific flag */
/* Require clock free running */
#define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
+/* card alwayes wired to host, like on-chip emmc */
+#define PXA_FLAG_CARD_PERMANENT (1<<1)
/*
* struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
index fc406ac..a88c797 100644
--- a/drivers/mmc/host/sdhci-pxa.c
+++ b/drivers/mmc/host/sdhci-pxa.c
@@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct
platform_device *pdev)
host->irq = irq;
host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+ if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
+ /* on-chip device */
+ host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+ host->mmc->caps = MMC_CAP_NONREMOVABLE;
+ }
+
if (pdata->quirks)
host->quirks |= pdata->quirks;
@@ -149,6 +155,8 @@ static int __devinit sdhci_pxa_probe(struct
platform_device *pdev)
if (pxa->pdata->max_speed)
host->mmc->f_max = pxa->pdata->max_speed;
+ else
+ host->mmc->f_max = 50000000;
platform_set_drvdata(pdev, host);
--
1.7.0.4
[-- Attachment #2: 0001-sdhci-pxa-add-MMC_CAP_NONREMOVABLE-for-on-chip-devic.patch --]
[-- Type: text/x-patch, Size: 1983 bytes --]
From 7f3529c21815990ebe4eec684e3c96156f774637 Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@marvell.com>
Date: Thu, 28 Oct 2010 10:44:15 -0400
Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device, MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by default
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
CC: Philip Rakity <prakity@marvell.com>
---
arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
drivers/mmc/host/sdhci-pxa.c | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h b/arch/arm/plat-pxa/include/plat/sdhci.h
index e49c5b6..fc5ceab 100644
--- a/arch/arm/plat-pxa/include/plat/sdhci.h
+++ b/arch/arm/plat-pxa/include/plat/sdhci.h
@@ -16,6 +16,8 @@
/* pxa specific flag */
/* Require clock free running */
#define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
+/* card alwayes wired to host, like on-chip emmc */
+#define PXA_FLAG_CARD_PERMANENT (1<<1)
/*
* struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
index fc406ac..a88c797 100644
--- a/drivers/mmc/host/sdhci-pxa.c
+++ b/drivers/mmc/host/sdhci-pxa.c
@@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct platform_device *pdev)
host->irq = irq;
host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+ if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
+ /* on-chip device */
+ host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+ host->mmc->caps = MMC_CAP_NONREMOVABLE;
+ }
+
if (pdata->quirks)
host->quirks |= pdata->quirks;
@@ -149,6 +155,8 @@ static int __devinit sdhci_pxa_probe(struct platform_device *pdev)
if (pxa->pdata->max_speed)
host->mmc->f_max = pxa->pdata->max_speed;
+ else
+ host->mmc->f_max = 50000000;
platform_set_drvdata(pdev, host);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
2010-10-28 2:54 [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device zhangfei gao
@ 2010-10-28 3:34 ` Philip Rakity
2010-10-28 4:23 ` Philip Rakity
2010-10-28 3:42 ` Kyungmin Park
1 sibling, 1 reply; 7+ messages in thread
From: Philip Rakity @ 2010-10-28 3:34 UTC (permalink / raw)
To: zhangfei gao
Cc: linux-mmc@vger.kernel.org, Chris Ball, Matt Fleming,
eric.y.miao@gmail.com, Haojian Zhuang
Zhangfei,
The patch mixes speed setting and setting the NON_REMOVABLE caps in one patch. I would prefer to separate these into 2 separate patches.
thanks,
Philp
On Oct 27, 2010, at 7:54 PM, zhangfei gao wrote:
> From 7f3529c21815990ebe4eec684e3c96156f774637 Mon Sep 17 00:00:00 2001
> From: Zhangfei Gao <zhangfei.gao@marvell.com>
> Date: Thu, 28 Oct 2010 10:44:15 -0400
> Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
>
> To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device,
> MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by
> default
>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
> CC: Philip Rakity <prakity@marvell.com>
> ---
> arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
> drivers/mmc/host/sdhci-pxa.c | 8 ++++++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h
> b/arch/arm/plat-pxa/include/plat/sdhci.h
> index e49c5b6..fc5ceab 100644
> --- a/arch/arm/plat-pxa/include/plat/sdhci.h
> +++ b/arch/arm/plat-pxa/include/plat/sdhci.h
> @@ -16,6 +16,8 @@
> /* pxa specific flag */
> /* Require clock free running */
> #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
> +/* card alwayes wired to host, like on-chip emmc */
> +#define PXA_FLAG_CARD_PERMANENT (1<<1)
>
> /*
> * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
> diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
> index fc406ac..a88c797 100644
> --- a/drivers/mmc/host/sdhci-pxa.c
> +++ b/drivers/mmc/host/sdhci-pxa.c
> @@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct
> platform_device *pdev)
> host->irq = irq;
> host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>
> + if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
> + /* on-chip device */
> + host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> + host->mmc->caps = MMC_CAP_NONREMOVABLE;
> + }
> +
> if (pdata->quirks)
> host->quirks |= pdata->quirks;
>
> @@ -149,6 +155,8 @@ static int __devinit sdhci_pxa_probe(struct
> platform_device *pdev)
>
> if (pxa->pdata->max_speed)
> host->mmc->f_max = pxa->pdata->max_speed;
> + else
> + host->mmc->f_max = 50000000;
>
> platform_set_drvdata(pdev, host);
>
> --
> 1.7.0.4
> <0001-sdhci-pxa-add-MMC_CAP_NONREMOVABLE-for-on-chip-devic.patch>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
2010-10-28 3:34 ` Philip Rakity
@ 2010-10-28 4:23 ` Philip Rakity
0 siblings, 0 replies; 7+ messages in thread
From: Philip Rakity @ 2010-10-28 4:23 UTC (permalink / raw)
To: Zhangfei Gao
Cc: linux-mmc@vger.kernel.org, Chris Ball, Matt Fleming,
eric.y.miao@gmail.com, Haojian Zhuang
The speed patch is not needed.
>> + else
>> + host->mmc->f_max = 50000000;
>
The mmc/core layer sets the speed and in my testing this works fine.
Philip
On Oct 27, 2010, at 8:34 PM, Philip Rakity wrote:
>
> Zhangfei,
>
> The patch mixes speed setting and setting the NON_REMOVABLE caps in one patch. I would prefer to separate these into 2 separate patches.
>
> thanks,
>
> Philp
>
>
> On Oct 27, 2010, at 7:54 PM, zhangfei gao wrote:
>
>> From 7f3529c21815990ebe4eec684e3c96156f774637 Mon Sep 17 00:00:00 2001
>> From: Zhangfei Gao <zhangfei.gao@marvell.com>
>> Date: Thu, 28 Oct 2010 10:44:15 -0400
>> Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
>>
>> To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device,
>> MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by
>> default
>>
>> Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
>> CC: Philip Rakity <prakity@marvell.com>
>> ---
>> arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
>> drivers/mmc/host/sdhci-pxa.c | 8 ++++++++
>> 2 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h
>> b/arch/arm/plat-pxa/include/plat/sdhci.h
>> index e49c5b6..fc5ceab 100644
>> --- a/arch/arm/plat-pxa/include/plat/sdhci.h
>> +++ b/arch/arm/plat-pxa/include/plat/sdhci.h
>> @@ -16,6 +16,8 @@
>> /* pxa specific flag */
>> /* Require clock free running */
>> #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
>> +/* card alwayes wired to host, like on-chip emmc */
>> +#define PXA_FLAG_CARD_PERMANENT (1<<1)
>>
>> /*
>> * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
>> diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
>> index fc406ac..a88c797 100644
>> --- a/drivers/mmc/host/sdhci-pxa.c
>> +++ b/drivers/mmc/host/sdhci-pxa.c
>> @@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct
>> platform_device *pdev)
>> host->irq = irq;
>> host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>>
>> + if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
>> + /* on-chip device */
>> + host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>> + host->mmc->caps = MMC_CAP_NONREMOVABLE;
>> + }
>> +
>> if (pdata->quirks)
>> host->quirks |= pdata->quirks;
>>
>> @@ -149,6 +155,8 @@ static int __devinit sdhci_pxa_probe(struct
>> platform_device *pdev)
>>
>> if (pxa->pdata->max_speed)
>> host->mmc->f_max = pxa->pdata->max_speed;
>> + else
>> + host->mmc->f_max = 50000000;
>>
>> platform_set_drvdata(pdev, host);
>>
>> --
>> 1.7.0.4
>> <0001-sdhci-pxa-add-MMC_CAP_NONREMOVABLE-for-on-chip-devic.patch>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
2010-10-28 2:54 [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device zhangfei gao
2010-10-28 3:34 ` Philip Rakity
@ 2010-10-28 3:42 ` Kyungmin Park
2010-10-28 6:00 ` zhangfei gao
1 sibling, 1 reply; 7+ messages in thread
From: Kyungmin Park @ 2010-10-28 3:42 UTC (permalink / raw)
To: zhangfei gao
Cc: linux-mmc, Chris Ball, Matt Fleming, eric.y.miao, Haojian Zhuang,
Philip Rakity
On Thu, Oct 28, 2010 at 11:54 AM, zhangfei gao <zhangfei.gao@gmail.com> wrote:
> From 7f3529c21815990ebe4eec684e3c96156f774637 Mon Sep 17 00:00:00 2001
> From: Zhangfei Gao <zhangfei.gao@marvell.com>
> Date: Thu, 28 Oct 2010 10:44:15 -0400
> Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
>
> To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device,
> MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by
> default
>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
> CC: Philip Rakity <prakity@marvell.com>
> ---
> arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
> drivers/mmc/host/sdhci-pxa.c | 8 ++++++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h
> b/arch/arm/plat-pxa/include/plat/sdhci.h
> index e49c5b6..fc5ceab 100644
> --- a/arch/arm/plat-pxa/include/plat/sdhci.h
> +++ b/arch/arm/plat-pxa/include/plat/sdhci.h
> @@ -16,6 +16,8 @@
> /* pxa specific flag */
> /* Require clock free running */
> #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
> +/* card alwayes wired to host, like on-chip emmc */
> +#define PXA_FLAG_CARD_PERMANENT (1<<1)
>
> /*
> * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
> diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
> index fc406ac..a88c797 100644
> --- a/drivers/mmc/host/sdhci-pxa.c
> +++ b/drivers/mmc/host/sdhci-pxa.c
> @@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct
> platform_device *pdev)
> host->irq = irq;
> host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>
> + if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
> + /* on-chip device */
> + host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> + host->mmc->caps = MMC_CAP_NONREMOVABLE;
As we don't know if mmc->caps are passing from platform data, how
about to ORing at this case?
Thank you,
Kyungmin Park
> + }
> +
> if (pdata->quirks)
> host->quirks |= pdata->quirks;
>
> @@ -149,6 +155,8 @@ static int __devinit sdhci_pxa_probe(struct
> platform_device *pdev)
>
> if (pxa->pdata->max_speed)
> host->mmc->f_max = pxa->pdata->max_speed;
> + else
> + host->mmc->f_max = 50000000;
>
> platform_set_drvdata(pdev, host);
>
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
2010-10-28 3:42 ` Kyungmin Park
@ 2010-10-28 6:00 ` zhangfei gao
2010-10-28 6:02 ` Philip Rakity
2010-12-05 3:05 ` Chris Ball
0 siblings, 2 replies; 7+ messages in thread
From: zhangfei gao @ 2010-10-28 6:00 UTC (permalink / raw)
To: Kyungmin Park, Philip Rakity
Cc: linux-mmc, Chris Ball, Matt Fleming, eric.y.miao, Haojian Zhuang
[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]
Thanks for your suggestion, here is updated version.
>From 470140b629e3f044a0951368db8e3dc98ebd8ab3 Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@marvell.com>
Date: Thu, 28 Oct 2010 10:44:15 -0400
Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device,
MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by
default
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
CC: Philip Rakity <prakity@marvell.com>
---
arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
drivers/mmc/host/sdhci-pxa.c | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h
b/arch/arm/plat-pxa/include/plat/sdhci.h
index e49c5b6..fc5ceab 100644
--- a/arch/arm/plat-pxa/include/plat/sdhci.h
+++ b/arch/arm/plat-pxa/include/plat/sdhci.h
@@ -16,6 +16,8 @@
/* pxa specific flag */
/* Require clock free running */
#define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
+/* card alwayes wired to host, like on-chip emmc */
+#define PXA_FLAG_CARD_PERMANENT (1<<1)
/*
* struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
index fc406ac..8455c46 100644
--- a/drivers/mmc/host/sdhci-pxa.c
+++ b/drivers/mmc/host/sdhci-pxa.c
@@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct
platform_device *pdev)
host->irq = irq;
host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+ if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
+ /* on-chip device */
+ host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+ host->mmc->caps |= MMC_CAP_NONREMOVABLE;
+ }
+
if (pdata->quirks)
host->quirks |= pdata->quirks;
--
1.7.0.4
[-- Attachment #2: 0001-sdhci-pxa-add-MMC_CAP_NONREMOVABLE-for-on-chip-devic.patch --]
[-- Type: text/x-patch, Size: 1739 bytes --]
From 470140b629e3f044a0951368db8e3dc98ebd8ab3 Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@marvell.com>
Date: Thu, 28 Oct 2010 10:44:15 -0400
Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device, MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by default
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
CC: Philip Rakity <prakity@marvell.com>
---
arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
drivers/mmc/host/sdhci-pxa.c | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h b/arch/arm/plat-pxa/include/plat/sdhci.h
index e49c5b6..fc5ceab 100644
--- a/arch/arm/plat-pxa/include/plat/sdhci.h
+++ b/arch/arm/plat-pxa/include/plat/sdhci.h
@@ -16,6 +16,8 @@
/* pxa specific flag */
/* Require clock free running */
#define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
+/* card alwayes wired to host, like on-chip emmc */
+#define PXA_FLAG_CARD_PERMANENT (1<<1)
/*
* struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
index fc406ac..8455c46 100644
--- a/drivers/mmc/host/sdhci-pxa.c
+++ b/drivers/mmc/host/sdhci-pxa.c
@@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct platform_device *pdev)
host->irq = irq;
host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+ if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
+ /* on-chip device */
+ host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+ host->mmc->caps |= MMC_CAP_NONREMOVABLE;
+ }
+
if (pdata->quirks)
host->quirks |= pdata->quirks;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
2010-10-28 6:00 ` zhangfei gao
@ 2010-10-28 6:02 ` Philip Rakity
2010-12-05 3:05 ` Chris Ball
1 sibling, 0 replies; 7+ messages in thread
From: Philip Rakity @ 2010-10-28 6:02 UTC (permalink / raw)
To: zhangfei gao
Cc: Kyungmin Park, linux-mmc@vger.kernel.org, Chris Ball,
Matt Fleming, eric.y.miao@gmail.com, Haojian Zhuang
ACK:
Philip
On Oct 27, 2010, at 11:00 PM, zhangfei gao wrote:
> Thanks for your suggestion, here is updated version.
>
> From 470140b629e3f044a0951368db8e3dc98ebd8ab3 Mon Sep 17 00:00:00 2001
> From: Zhangfei Gao <zhangfei.gao@marvell.com>
> Date: Thu, 28 Oct 2010 10:44:15 -0400
> Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
>
> To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device,
> MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by
> default
>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
> CC: Philip Rakity <prakity@marvell.com>
> ---
> arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
> drivers/mmc/host/sdhci-pxa.c | 6 ++++++
> 2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h
> b/arch/arm/plat-pxa/include/plat/sdhci.h
> index e49c5b6..fc5ceab 100644
> --- a/arch/arm/plat-pxa/include/plat/sdhci.h
> +++ b/arch/arm/plat-pxa/include/plat/sdhci.h
> @@ -16,6 +16,8 @@
> /* pxa specific flag */
> /* Require clock free running */
> #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
> +/* card alwayes wired to host, like on-chip emmc */
> +#define PXA_FLAG_CARD_PERMANENT (1<<1)
>
> /*
> * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
> diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
> index fc406ac..8455c46 100644
> --- a/drivers/mmc/host/sdhci-pxa.c
> +++ b/drivers/mmc/host/sdhci-pxa.c
> @@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct
> platform_device *pdev)
> host->irq = irq;
> host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>
> + if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
> + /* on-chip device */
> + host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> + host->mmc->caps |= MMC_CAP_NONREMOVABLE;
> + }
> +
> if (pdata->quirks)
> host->quirks |= pdata->quirks;
>
> --
> 1.7.0.4
> <0001-sdhci-pxa-add-MMC_CAP_NONREMOVABLE-for-on-chip-devic.patch>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
2010-10-28 6:00 ` zhangfei gao
2010-10-28 6:02 ` Philip Rakity
@ 2010-12-05 3:05 ` Chris Ball
1 sibling, 0 replies; 7+ messages in thread
From: Chris Ball @ 2010-12-05 3:05 UTC (permalink / raw)
To: zhangfei gao
Cc: Kyungmin Park, Philip Rakity, linux-mmc, Chris Ball, Matt Fleming,
eric.y.miao, Haojian Zhuang
Hi,
On Thu, Oct 28, 2010 at 02:00:10AM -0400, zhangfei gao wrote:
> Thanks for your suggestion, here is updated version.
>
> >From 470140b629e3f044a0951368db8e3dc98ebd8ab3 Mon Sep 17 00:00:00 2001
> From: Zhangfei Gao <zhangfei.gao@marvell.com>
> Date: Thu, 28 Oct 2010 10:44:15 -0400
> Subject: [PATCH] sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device
>
> To share SDHCI_QUIRK_BROKEN_CARD_DETECTION for on-chip device,
> MMC_CAP_NONREMOVABLE also needed, otherwise polling mode used by
> default
>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
> CC: Philip Rakity <prakity@marvell.com>
> ---
> arch/arm/plat-pxa/include/plat/sdhci.h | 2 ++
> drivers/mmc/host/sdhci-pxa.c | 6 ++++++
> 2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h
> b/arch/arm/plat-pxa/include/plat/sdhci.h
> index e49c5b6..fc5ceab 100644
> --- a/arch/arm/plat-pxa/include/plat/sdhci.h
> +++ b/arch/arm/plat-pxa/include/plat/sdhci.h
> @@ -16,6 +16,8 @@
> /* pxa specific flag */
> /* Require clock free running */
> #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
> +/* card alwayes wired to host, like on-chip emmc */
> +#define PXA_FLAG_CARD_PERMANENT (1<<1)
>
> /*
> * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
> diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
> index fc406ac..8455c46 100644
> --- a/drivers/mmc/host/sdhci-pxa.c
> +++ b/drivers/mmc/host/sdhci-pxa.c
> @@ -138,6 +138,12 @@ static int __devinit sdhci_pxa_probe(struct
> platform_device *pdev)
> host->irq = irq;
> host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>
> + if (pxa->pdata->flags & PXA_FLAG_CARD_PERMANENT) {
> + /* on-chip device */
> + host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> + host->mmc->caps |= MMC_CAP_NONREMOVABLE;
> + }
> +
> if (pdata->quirks)
> host->quirks |= pdata->quirks;
>
Pushed to mmc-next for .38, thanks.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-05 3:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 2:54 [PATCH 1/1]sdhci-pxa: add MMC_CAP_NONREMOVABLE for on-chip device zhangfei gao
2010-10-28 3:34 ` Philip Rakity
2010-10-28 4:23 ` Philip Rakity
2010-10-28 3:42 ` Kyungmin Park
2010-10-28 6:00 ` zhangfei gao
2010-10-28 6:02 ` Philip Rakity
2010-12-05 3:05 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox