mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties
PATCH 1/1 mmc: sdhci-pxav3: dt: Support "broken-cd"/"wp-inverted" properties
--- drivers/mmc/host/sdhci-pxav3.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/mmc/host/sdhci-pxav3.c +6 -0
@@ -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
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Quoted 23 lines · Chris Ball
Signed-off-by Chris Ball <[email protected]>--- drivers/mmc/host/sdhci-pxav3.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/mmc/host/sdhci-pxav3.c +6
-1@@ -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 --
Quoted 2 lines
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child
Hi,
Quoted 14 lines · Haojian Zhuang
Quoted 13 lines · Chris Ball
Signed-off-by Chris Ball <[email protected]>--- drivers/mmc/host/sdhci-pxav3.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/mmc/host/sdhci-pxav3.c +0
-0@@ -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;
Quoted 11 lines
drivers/mmc/host/sdhci-pxav3.c static struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev) · line 209
Quoted 9 lines
drivers/mmc/host/sdhci-pxav3.c +6
-0+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 <[email protected]>
Thanks, pushed to mmc-next for 3.7.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
PATCH 1/1 mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks
In particular, this is done to gain support for broken-cd and wp-inverted.
---
(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(+)
drivers/mmc/host/sdhci-pxav3.c +2 -0
@@ -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" );
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Re: [PATCH] mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks
Quoted 7 lines · Chris Ball
In particular, this is done to gain support for broken-cd and wp-inverted.
Signed-off-by Chris Ball <[email protected]>---
(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.