* [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation.
@ 2011-02-04 11:17 Will Newton
2011-02-04 23:50 ` Matt Fleming
0 siblings, 1 reply; 5+ messages in thread
From: Will Newton @ 2011-02-04 11:17 UTC (permalink / raw)
To: linux-mmc
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
We need to run the card detect tasklet at the end of slot initialisation
as it is possible that a card has been inserted prior to boot, so we miss
the insertion interrupt and now the card is sitting there inserted but with
no power to it.
Signed-off-by: Neil Jones <neil.jones@imgtec.com>
Signed-off-by: Will Newton <will.newton@imgtec.com>
---
drivers/mmc/host/dw_mmc.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 2fcc825..0b0bedd 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1441,6 +1441,13 @@ static int __init dw_mci_init_slot(struct
dw_mci *host, unsigned int id)
/* Card initially undetected */
slot->last_detect_state = 0;
+
+ /*
+ * Card may have been plugged in prior to boot so we
+ * need to run the detect tasklet
+ */
+ tasklet_schedule(&host->card_tasklet);
+
return 0;
}
--
1.7.3.4
[-- Attachment #2: 0001-dw_mmc-Run-card-detect-tasklet-during-slot-initialis.patch --]
[-- Type: text/x-patch, Size: 1174 bytes --]
From 53094aaa4cd8b5da78acfbf7da6c4848fb720413 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton@imgtec.com>
Date: Fri, 4 Feb 2011 11:07:46 +0000
Subject: [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation.
We need to run the card detect tasklet at the end of slot initialisation
as it is possible that a card has been inserted prior to boot, so we miss
the insertion interrupt and now the card is sitting there inserted but with
no power to it.
Signed-off-by: Neil Jones <neil.jones@imgtec.com>
Signed-off-by: Will Newton <will.newton@imgtec.com>
---
drivers/mmc/host/dw_mmc.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 2fcc825..0b0bedd 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1441,6 +1441,13 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
/* Card initially undetected */
slot->last_detect_state = 0;
+
+ /*
+ * Card may have been plugged in prior to boot so we
+ * need to run the detect tasklet
+ */
+ tasklet_schedule(&host->card_tasklet);
+
return 0;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation.
2011-02-04 11:17 Will Newton
@ 2011-02-04 23:50 ` Matt Fleming
2011-02-07 10:13 ` Will Newton
0 siblings, 1 reply; 5+ messages in thread
From: Matt Fleming @ 2011-02-04 23:50 UTC (permalink / raw)
To: Will Newton; +Cc: linux-mmc
On Fri, 4 Feb 2011 11:17:54 +0000
Will Newton <will.newton@gmail.com> wrote:
> We need to run the card detect tasklet at the end of slot
> initialisation as it is possible that a card has been inserted prior
> to boot, so we miss the insertion interrupt and now the card is
> sitting there inserted but with no power to it.
So when powering up the board with a card already inserted, an interrupt
isn't generated? If that's the case then we haven't "missed" an
interrupt as one was never generated, right?
If the answer to the above questions is "yes", then you can add my
Reviewed-by (though it might be worth changing the bit about missing
an interrupt in the commit message). Otherwise, I would have expected
the usual interrupt machinery to take care of detecting the inserted
card?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation.
2011-02-04 23:50 ` Matt Fleming
@ 2011-02-07 10:13 ` Will Newton
0 siblings, 0 replies; 5+ messages in thread
From: Will Newton @ 2011-02-07 10:13 UTC (permalink / raw)
To: Matt Fleming; +Cc: linux-mmc
On Fri, Feb 4, 2011 at 11:50 PM, Matt Fleming <matt@console-pimps.org> wrote:
> On Fri, 4 Feb 2011 11:17:54 +0000
> Will Newton <will.newton@gmail.com> wrote:
>
>> We need to run the card detect tasklet at the end of slot
>> initialisation as it is possible that a card has been inserted prior
>> to boot, so we miss the insertion interrupt and now the card is
>> sitting there inserted but with no power to it.
>
> So when powering up the board with a card already inserted, an interrupt
> isn't generated? If that's the case then we haven't "missed" an
> interrupt as one was never generated, right?
I believe it starts up with interrupts masked so we don't actually see
any interrupts until
we unmask - and it isn't clear from the documentation whether or not
an interrupt is generated.
> If the answer to the above questions is "yes", then you can add my
> Reviewed-by (though it might be worth changing the bit about missing
> an interrupt in the commit message). Otherwise, I would have expected
> the usual interrupt machinery to take care of detecting the inserted
> card?
Ok I'll update that, thanks for the review!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation.
@ 2011-02-10 10:40 Will Newton
2011-02-10 19:43 ` Chris Ball
0 siblings, 1 reply; 5+ messages in thread
From: Will Newton @ 2011-02-10 10:40 UTC (permalink / raw)
To: linux-mmc, Chris Ball; +Cc: Matt Fleming
We need to run the card detect tasklet at the end of slot initialisation
as it is possible that a card has been inserted prior to boot, so we don't
see an insertion interrupt and now the card is sitting there inserted but with
no power to it.
Signed-off-by: Neil Jones <neil.jones@imgtec.com>
Signed-off-by: Will Newton <will.newton@imgtec.com>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
---
drivers/mmc/host/dw_mmc.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 2fcc825..0b0bedd 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1441,6 +1441,13 @@ static int __init dw_mci_init_slot(struct
dw_mci *host, unsigned int id)
/* Card initially undetected */
slot->last_detect_state = 0;
+
+ /*
+ * Card may have been plugged in prior to boot so we
+ * need to run the detect tasklet
+ */
+ tasklet_schedule(&host->card_tasklet);
+
return 0;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation.
2011-02-10 10:40 [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation Will Newton
@ 2011-02-10 19:43 ` Chris Ball
0 siblings, 0 replies; 5+ messages in thread
From: Chris Ball @ 2011-02-10 19:43 UTC (permalink / raw)
To: Will Newton; +Cc: linux-mmc, Matt Fleming
Hi Will,
On Thu, Feb 10, 2011 at 10:40:42AM +0000, Will Newton wrote:
> We need to run the card detect tasklet at the end of slot initialisation
> as it is possible that a card has been inserted prior to boot, so we don't
> see an insertion interrupt and now the card is sitting there inserted but with
> no power to it.
>
> Signed-off-by: Neil Jones <neil.jones@imgtec.com>
> Signed-off-by: Will Newton <will.newton@imgtec.com>
> Reviewed-by: Matt Fleming <matt@console-pimps.org>
> ---
> drivers/mmc/host/dw_mmc.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 2fcc825..0b0bedd 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1441,6 +1441,13 @@ static int __init dw_mci_init_slot(struct
> dw_mci *host, unsigned int id)
> /* Card initially undetected */
> slot->last_detect_state = 0;
>
> +
> + /*
> + * Card may have been plugged in prior to boot so we
> + * need to run the detect tasklet
> + */
> + tasklet_schedule(&host->card_tasklet);
> +
> return 0;
> }
>
Pushed to mmc-next, after:
* rewrapping the commit message to be < 80 chars
* removing the redundant first added newline in the patch
* fixing the patch being corrupt due to line-wrapping
Please fix these in the future (especially the linewrap), thanks,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-10 19:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10 10:40 [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation Will Newton
2011-02-10 19:43 ` Chris Ball
-- strict thread matches above, loose matches on Subject: below --
2011-02-04 11:17 Will Newton
2011-02-04 23:50 ` Matt Fleming
2011-02-07 10:13 ` Will Newton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox