* [PATCH] mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties
@ 2012-09-09 3:05 Chris Ball
2012-09-11 14:29 ` Haojian Zhuang
0 siblings, 1 reply; 5+ messages in thread
From: Chris Ball @ 2012-09-09 3:05 UTC (permalink / raw)
To: linux-mmc; +Cc: Philip Rakity, Haojian Zhuang, Zhangfei Gao
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/host/sdhci-pxav3.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index a553b18..8a9b367 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -198,6 +198,12 @@ static struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev)
if (clk_delay_cycles > 0)
pdata->clk_delay_cycles = clk_delay_cycles;
+ if (of_find_property(np, "broken-cd", NULL))
+ pdata->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
+
+ if (of_find_property(np, "wp-inverted", NULL))
+ pdata->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
+
return pdata;
}
#else
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties
2012-09-09 3:05 [PATCH] mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties Chris Ball
@ 2012-09-11 14:29 ` Haojian Zhuang
2012-09-11 15:02 ` Chris Ball
0 siblings, 1 reply; 5+ messages in thread
From: Haojian Zhuang @ 2012-09-11 14:29 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-mmc, Philip Rakity, Zhangfei Gao
On Sun, Sep 9, 2012 at 11:05 AM, Chris Ball <cjb@laptop.org> wrote:
> Signed-off-by: Chris Ball <cjb@laptop.org>
> ---
> drivers/mmc/host/sdhci-pxav3.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index a553b18..8a9b367 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -198,6 +198,12 @@ static struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev)
> if (clk_delay_cycles > 0)
> pdata->clk_delay_cycles = clk_delay_cycles;
>
> + if (of_find_property(np, "broken-cd", NULL))
> + pdata->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> +
> + if (of_find_property(np, "wp-inverted", NULL))
> + pdata->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
> +
> return pdata;
> }
> #else
> --
> Chris Ball <cjb@laptop.org> <http://printf.net/>
> One Laptop Per Child
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties
2012-09-11 14:29 ` Haojian Zhuang
@ 2012-09-11 15:02 ` Chris Ball
2012-09-19 8:27 ` [PATCH] mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks Chris Ball
0 siblings, 1 reply; 5+ messages in thread
From: Chris Ball @ 2012-09-11 15:02 UTC (permalink / raw)
To: Haojian Zhuang; +Cc: linux-mmc, Philip Rakity, Zhangfei Gao
Hi,
On Tue, Sep 11 2012, Haojian Zhuang wrote:
> On Sun, Sep 9, 2012 at 11:05 AM, Chris Ball <cjb@laptop.org> wrote:
>> Signed-off-by: Chris Ball <cjb@laptop.org>
>> ---
>> drivers/mmc/host/sdhci-pxav3.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
>> index a553b18..8a9b367 100644
>> --- a/drivers/mmc/host/sdhci-pxav3.c
>> +++ b/drivers/mmc/host/sdhci-pxav3.c
>> @@ -198,6 +198,12 @@ static struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev)
>> if (clk_delay_cycles > 0)
>> pdata->clk_delay_cycles = clk_delay_cycles;
>>
>> + if (of_find_property(np, "broken-cd", NULL))
>> + pdata->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>> +
>> + if (of_find_property(np, "wp-inverted", NULL))
>> + pdata->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
>> +
>> return pdata;
>> }
>> #else
>
> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Thanks, pushed to mmc-next for 3.7.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks
2012-09-11 15:02 ` Chris Ball
@ 2012-09-19 8:27 ` Chris Ball
2012-09-20 2:06 ` zhangfei gao
0 siblings, 1 reply; 5+ messages in thread
From: Chris Ball @ 2012-09-19 8:27 UTC (permalink / raw)
To: Haojian Zhuang; +Cc: linux-mmc, Philip Rakity, Zhangfei Gao
In particular, this is done to gain support for broken-cd and wp-inverted.
Signed-off-by: Chris Ball <cjb@laptop.org>
---
(A previously submitted patch of mine added broken-cd support to
sdhci-pxav3 directly; I think it's a better idea to discard that
patch and use this one instead.)
drivers/mmc/host/sdhci-pxav3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 3a81cd6..78d7c42 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -296,6 +296,8 @@ static int __devinit sdhci_pxav3_probe(struct platform_device *pdev)
host->ops = &pxav3_sdhci_ops;
+ sdhci_get_of_property(pdev);
+
ret = sdhci_add_host(host);
if (ret) {
dev_err(&pdev->dev, "failed to add host\n");
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks
2012-09-19 8:27 ` [PATCH] mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks Chris Ball
@ 2012-09-20 2:06 ` zhangfei gao
0 siblings, 0 replies; 5+ messages in thread
From: zhangfei gao @ 2012-09-20 2:06 UTC (permalink / raw)
To: Chris Ball; +Cc: Haojian Zhuang, linux-mmc, Philip Rakity, Zhangfei Gao
On Wed, Sep 19, 2012 at 4:27 PM, Chris Ball <cjb@laptop.org> wrote:
> In particular, this is done to gain support for broken-cd and wp-inverted.
>
> Signed-off-by: Chris Ball <cjb@laptop.org>
> ---
> (A previously submitted patch of mine added broken-cd support to
> sdhci-pxav3 directly; I think it's a better idea to discard that
> patch and use this one instead.)
Thanks Chris, it's really better.
Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-20 2:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-09 3:05 [PATCH] mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties Chris Ball
2012-09-11 14:29 ` Haojian Zhuang
2012-09-11 15:02 ` Chris Ball
2012-09-19 8:27 ` [PATCH] mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks Chris Ball
2012-09-20 2:06 ` zhangfei gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox