* [PATCH 1/2] mmc: dw_mmc: poll if CD is broken
@ 2014-04-30 13:44 Sebastian Andrzej Siewior
2014-04-30 13:44 ` [PATCH 2/2] mmc: dw_mmc: print card frequency in debug level Sebastian Andrzej Siewior
[not found] ` <CAELcNGT7Ei35tmZzAJ4iCdwMCamd5tC-onRmNG3JL+78_6B0-w@mail.gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2014-04-30 13:44 UTC (permalink / raw)
To: Seungwon Jeon, Jaehoon Chung
Cc: Chris Ball, Ulf Hansson, linux-mmc, Sebastian Andrzej Siewior
My CD pin is not available at all (DW_MCI_QUIRK_BROKEN_CARD_DETECTION is
set). The result was in v3.12 that if MMC card was inserted at load
time, then the MMC card was detected. If it wasn't, it wasn't detected
since nobody polled for it and I no irq was wired up.
I haven't noticed any change in that area, therefore I'm adding the
MMC_CAP_NEEDS_POLL flag in case the detection is broken so the core will
check for the MMC card.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/mmc/host/dw_mmc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index cced599..82f5ea2 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2227,6 +2227,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
}
slot->wp_gpio = dw_mci_of_get_wp_gpio(host->dev, slot->id);
+
+ if (host->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
+ mmc->caps |= MMC_CAP_NEEDS_POLL;
dw_mci_of_get_cd_gpio(host->dev, slot->id, mmc);
ret = mmc_add_host(mmc);
--
1.9.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] mmc: dw_mmc: print card frequency in debug level
2014-04-30 13:44 [PATCH 1/2] mmc: dw_mmc: poll if CD is broken Sebastian Andrzej Siewior
@ 2014-04-30 13:44 ` Sebastian Andrzej Siewior
2014-05-01 8:42 ` Jaehoon Chung
[not found] ` <CAELcNGT7Ei35tmZzAJ4iCdwMCamd5tC-onRmNG3JL+78_6B0-w@mail.gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2014-04-30 13:44 UTC (permalink / raw)
To: Seungwon Jeon, Jaehoon Chung
Cc: Chris Ball, Ulf Hansson, linux-mmc, Sebastian Andrzej Siewior
Printing this at info level can be very noisy the CD is not working and
we poll for the card.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/mmc/host/dw_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 82f5ea2..b8afc70 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -800,7 +800,7 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit)
div = (host->bus_hz != clock) ? DIV_ROUND_UP(div, 2) : 0;
if ((clock << div) != slot->__clk_old || force_clkinit)
- dev_info(&slot->mmc->class_dev,
+ dev_dbg(&slot->mmc->class_dev,
"Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n",
slot->id, host->bus_hz, clock,
div ? ((host->bus_hz / div) >> 1) :
--
1.9.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] mmc: dw_mmc: poll if CD is broken
[not found] ` <CAELcNGT7Ei35tmZzAJ4iCdwMCamd5tC-onRmNG3JL+78_6B0-w@mail.gmail.com>
@ 2014-04-30 15:17 ` Sebastian Andrzej Siewior
2014-05-01 8:38 ` Jaehoon Chung
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2014-04-30 15:17 UTC (permalink / raw)
To: Jae hoon Chung
Cc: Seungwon Jeon, Jaehoon Chung, Chris Ball, Ulf Hansson,
linux-mmc@vger.kernel.org
On 04/30/2014 04:57 PM, Jae hoon Chung wrote:
> Hi, Sebastian.
Hi Jaehoon,
> I didn't know which Soc you used.
Altera socfpa.
> Do you use the Device-tree? if you use the device-tree, just add the
> "broken-cd" property.
and with this property the code will rescan the card every few secs? I
didn't see this in v3.12. I do have "broken-cd" set. And the card will
not be detected if it is inserted after the driver probed.
But now that you pointed me at it. You say that "broken-cd" will be
scanned by the core, right? Shouldn't the driver then call
mmc_of_parse() or am I missing something?
> Best Regards,
> Jaehoon Chung
Sebastian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] mmc: dw_mmc: poll if CD is broken
2014-04-30 15:17 ` [PATCH 1/2] mmc: dw_mmc: poll if CD is broken Sebastian Andrzej Siewior
@ 2014-05-01 8:38 ` Jaehoon Chung
0 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2014-05-01 8:38 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, Jae hoon Chung
Cc: Seungwon Jeon, Chris Ball, Ulf Hansson, linux-mmc@vger.kernel.org
Hi, Sebastian.
Your patch didn't base on latest mmc-next repository.
You can refer to below git.
http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc.git/
I think you made the patch on v3.12.
Best Regards,
Jaehoon Chung
On 05/01/2014 12:17 AM, Sebastian Andrzej Siewior wrote:
> On 04/30/2014 04:57 PM, Jae hoon Chung wrote:
>> Hi, Sebastian.
>
> Hi Jaehoon,
>
>> I didn't know which Soc you used.
>
> Altera socfpa.
>
>> Do you use the Device-tree? if you use the device-tree, just add the
>> "broken-cd" property.
>
> and with this property the code will rescan the card every few secs? I
> didn't see this in v3.12. I do have "broken-cd" set. And the card will
> not be detected if it is inserted after the driver probed.
>
> But now that you pointed me at it. You say that "broken-cd" will be
> scanned by the core, right? Shouldn't the driver then call
> mmc_of_parse() or am I missing something?
>
>> Best Regards,
>> Jaehoon Chung
>
> Sebastian
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mmc: dw_mmc: print card frequency in debug level
2014-04-30 13:44 ` [PATCH 2/2] mmc: dw_mmc: print card frequency in debug level Sebastian Andrzej Siewior
@ 2014-05-01 8:42 ` Jaehoon Chung
0 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2014-05-01 8:42 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, Seungwon Jeon, Jaehoon Chung
Cc: Chris Ball, Ulf Hansson, linux-mmc
Hi, Sebastian.
You have to work on latest mmc-next repository.
And that message is useful information for debugging.
I didn't want to change message level.
Best Regards,
Jaehoon Chung
On 04/30/2014 10:44 PM, Sebastian Andrzej Siewior wrote:
> Printing this at info level can be very noisy the CD is not working and
> we poll for the card.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> drivers/mmc/host/dw_mmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 82f5ea2..b8afc70 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -800,7 +800,7 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit)
> div = (host->bus_hz != clock) ? DIV_ROUND_UP(div, 2) : 0;
>
> if ((clock << div) != slot->__clk_old || force_clkinit)
> - dev_info(&slot->mmc->class_dev,
> + dev_dbg(&slot->mmc->class_dev,
> "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n",
> slot->id, host->bus_hz, clock,
> div ? ((host->bus_hz / div) >> 1) :
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-01 8:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 13:44 [PATCH 1/2] mmc: dw_mmc: poll if CD is broken Sebastian Andrzej Siewior
2014-04-30 13:44 ` [PATCH 2/2] mmc: dw_mmc: print card frequency in debug level Sebastian Andrzej Siewior
2014-05-01 8:42 ` Jaehoon Chung
[not found] ` <CAELcNGT7Ei35tmZzAJ4iCdwMCamd5tC-onRmNG3JL+78_6B0-w@mail.gmail.com>
2014-04-30 15:17 ` [PATCH 1/2] mmc: dw_mmc: poll if CD is broken Sebastian Andrzej Siewior
2014-05-01 8:38 ` Jaehoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).