Re: [PATCH] mmc: mxs-mmc: Add broken-cd devicetree property

2013-04-06 Thread Marek Vasut
Dear Alexandre Pereira da Silva,

> On Sat, Apr 6, 2013 at 10:58 AM, Marc Kleine-Budde  
> wrote:
> > According to the documentation broken card detect is something different
> > 
> > than non-removable:
> > >   - broken-cd: There is no card detection available; polling must be
> > >   used. - non-removable: non-removable slot (like eMMC); assume always
> > >   present.
> > 
> > But mxs-mmc set MMC_CAP_NEEDS_POLL unconditionally.
> 
> I will work on a better way to fix this.

NEEDS_POLL looks nice and seems to fit this case.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mmc: mxs-mmc: Add broken-cd devicetree property

2013-04-06 Thread Alexandre Pereira da Silva
On Sat, Apr 6, 2013 at 10:58 AM, Marc Kleine-Budde  wrote:
> According to the documentation broken card detect is something different
> than non-removable:
>
> >   - broken-cd: There is no card detection available; polling must be used.
> >   - non-removable: non-removable slot (like eMMC); assume always present.
>
> But mxs-mmc set MMC_CAP_NEEDS_POLL unconditionally.

I will work on a better way to fix this.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mmc: mxs-mmc: Add broken-cd devicetree property

2013-04-06 Thread Marc Kleine-Budde
On 04/06/2013 03:43 PM, Alexandre Pereira da Silva wrote:
> In case of broken card detect support, assume the card is non-removable

According to the documentation broken card detect is something different
than non-removable:

>   - broken-cd: There is no card detection available; polling must be used.
>   - non-removable: non-removable slot (like eMMC); assume always present.

But mxs-mmc set MMC_CAP_NEEDS_POLL unconditionally.

http://lxr.free-electrons.com/source/drivers/mmc/host/mxs-mmc.c#L682

Marc

-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature


[PATCH] mmc: mxs-mmc: Add broken-cd devicetree property

2013-04-06 Thread Alexandre Pereira da Silva
In case of broken card detect support, assume the card is non-removable

Signed-off-by: Alexandre Pereira da Silva 
---

This patch depends on Marc Kleine-Budde series adding support for non-removable.

 drivers/mmc/host/mxs-mmc.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index c231881..8418928 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -689,7 +689,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
mmc->caps |= MMC_CAP_4_BIT_DATA;
else if (bus_width == 8)
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
-   host->non_removable = of_property_read_bool(np, "non-removable");
+   host->non_removable = of_property_read_bool(np, "non-removable") |
+   of_property_read_bool(np, "broken-cd");
if (host->non_removable)
mmc->caps |= MMC_CAP_NONREMOVABLE;
host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, &flags);
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html