All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
To: Eric Benard <eric@eukrea.com>
Cc: Wolfram Sang <w.sang@pengutronix.de>, Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V3 0/5] sdhci-esdhc-imx: use gpio for write protection and	card detection
Date: Fri, 25 Feb 2011 20:31:17 +0100	[thread overview]
Message-ID: <874o7r29oa.fsf@lebrac.rtp-net.org> (raw)
In-Reply-To: <4D66AAE4.4000308@eukrea.com> (Eric Benard's message of "Thu, 24 Feb 2011 20:00:52 +0100")

Eric Benard <eric@eukrea.com> writes:

> Hi Arnaud,

Salut !
>
> On 24/02/2011 12:40, Arnaud Patard (Rtp) wrote:
>> Wolfram Sang<w.sang@pengutronix.de>  writes:
>>
>> Hi,
>>
>>> Take #3, changes:
>>>
>>> * also intercept calls to SDHCI_SIGNAL_ENABLE (needed on mx25)
>>> * remove unconditional BROKEN_CARD_DETECTION (leftover)
>>> * improved kernel-doc about unused GPIO
>>> * added tags from Eric
>>>
>>> Tested now by me and Marc on mx35, Eric on mx25/35/51. Arnaud, did you have a
>>> chance to retest on mx51? What about the FSL guys? :)
>>
>> I'm getting a hard freeze on my efika sb and mx once I remove the
>> unconditional BROKEN_CARD_DETECTION flag. I'm still investigating the
>> issue. I'll keep you informed if I find something.
>>
> may you please test the attached patch. It may give someone with a
> better knowledge of sdhci than me an idea of what is wrong.

I've tested this patch on my efikamx and this patch does solve the
issue. I didn't test on the efika smartbook but I guess it'll be fine
here too. Thanks.

>
> Here are the workaround this patch add :
> - we can't let enable or disable irq enabled when the card is
> present/not present, else the irq triger again which explains why you
> get the freeze -> so we must rely on the card presence bit to enable
> the right interrupt,

so, we're getting an interrupt storm, right ? can't it be fixed by
setting a different irq type ?

> - we can't turn the clock off if we want the card detect to work when
> the card is removed -> as a quick workaround this patch prevents
> sdhci_set_clock from turning off the clocks when the
> SDHCI_INT_CARD_INSERT interrupt is enabled.
>
> Also, I had to change the MX51_PAD_GPIO1_0__SD1_CD pad setting as
> follows to enable the internal pull up :
> 	_MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
> 			PAD_CTL_PKE | PAD_CTL_SRE_FAST |
> 			PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),

It worked without changing this.

Arnaud

WARNING: multiple messages have this Message-ID (diff)
From: arnaud.patard@rtp-net.org (Arnaud Patard (Rtp))
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 0/5] sdhci-esdhc-imx: use gpio for write protection and	card detection
Date: Fri, 25 Feb 2011 20:31:17 +0100	[thread overview]
Message-ID: <874o7r29oa.fsf@lebrac.rtp-net.org> (raw)
In-Reply-To: <4D66AAE4.4000308@eukrea.com> (Eric Benard's message of "Thu, 24 Feb 2011 20:00:52 +0100")

Eric Benard <eric@eukrea.com> writes:

> Hi Arnaud,

Salut !
>
> On 24/02/2011 12:40, Arnaud Patard (Rtp) wrote:
>> Wolfram Sang<w.sang@pengutronix.de>  writes:
>>
>> Hi,
>>
>>> Take #3, changes:
>>>
>>> * also intercept calls to SDHCI_SIGNAL_ENABLE (needed on mx25)
>>> * remove unconditional BROKEN_CARD_DETECTION (leftover)
>>> * improved kernel-doc about unused GPIO
>>> * added tags from Eric
>>>
>>> Tested now by me and Marc on mx35, Eric on mx25/35/51. Arnaud, did you have a
>>> chance to retest on mx51? What about the FSL guys? :)
>>
>> I'm getting a hard freeze on my efika sb and mx once I remove the
>> unconditional BROKEN_CARD_DETECTION flag. I'm still investigating the
>> issue. I'll keep you informed if I find something.
>>
> may you please test the attached patch. It may give someone with a
> better knowledge of sdhci than me an idea of what is wrong.

I've tested this patch on my efikamx and this patch does solve the
issue. I didn't test on the efika smartbook but I guess it'll be fine
here too. Thanks.

>
> Here are the workaround this patch add :
> - we can't let enable or disable irq enabled when the card is
> present/not present, else the irq triger again which explains why you
> get the freeze -> so we must rely on the card presence bit to enable
> the right interrupt,

so, we're getting an interrupt storm, right ? can't it be fixed by
setting a different irq type ?

> - we can't turn the clock off if we want the card detect to work when
> the card is removed -> as a quick workaround this patch prevents
> sdhci_set_clock from turning off the clocks when the
> SDHCI_INT_CARD_INSERT interrupt is enabled.
>
> Also, I had to change the MX51_PAD_GPIO1_0__SD1_CD pad setting as
> follows to enable the internal pull up :
> 	_MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
> 			PAD_CTL_PKE | PAD_CTL_SRE_FAST |
> 			PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),

It worked without changing this.

Arnaud

  reply	other threads:[~2011-02-25 19:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 13:51 [PATCH V3 0/5] sdhci-esdhc-imx: use gpio for write protection and card detection Wolfram Sang
2011-02-23 13:51 ` Wolfram Sang
2011-02-23 13:51 ` [PATCH 1/5] mmc: sdhci-esdhc-imx: add support for write protect on custom GPIO Wolfram Sang
2011-02-23 13:51   ` Wolfram Sang
2011-02-23 13:51 ` [PATCH 2/5] mmc: sdhci-esdhc: broken card detection is not a default quirk Wolfram Sang
2011-02-23 13:51   ` Wolfram Sang
2011-02-23 13:51 ` [PATCH 3/5] mmc: sdhci-esdhc-imx: add card detect on custom GPIO Wolfram Sang
2011-02-23 13:51   ` Wolfram Sang
2011-02-23 13:51 ` [PATCH 4/5] arm: mach-mx3: pcm043: add write-protect and card-detect for SD1 Wolfram Sang
2011-02-23 13:51   ` Wolfram Sang
2011-02-23 13:51 ` [PATCH 5/5] arm: mach-mx3: use IMX_GPIO_NR instead of hard-coded values Wolfram Sang
2011-02-23 13:51   ` Wolfram Sang
2011-02-24  8:18 ` [PATCH V3 0/5] sdhci-esdhc-imx: use gpio for write protection and card detection Shawn Guo
2011-02-24  8:18   ` Shawn Guo
2011-02-24 15:51   ` Shawn Guo
2011-02-24 15:51     ` Shawn Guo
2011-02-24 16:03     ` Shawn Guo
2011-02-24 16:03       ` Shawn Guo
2011-02-24 19:45       ` Wolfram Sang
2011-02-24 19:45         ` Wolfram Sang
2011-02-24 11:40 ` Arnaud Patard
2011-02-24 11:40   ` Arnaud Patard (Rtp)
2011-02-24 13:12   ` Wolfram Sang
2011-02-24 13:12     ` Wolfram Sang
2011-02-24 19:00   ` Eric Benard
2011-02-24 19:00     ` Eric Benard
2011-02-25 19:31     ` Arnaud Patard [this message]
2011-02-25 19:31       ` Arnaud Patard (Rtp)
2011-02-25 21:29       ` Eric Benard
2011-02-25 21:29         ` Eric Benard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o7r29oa.fsf@lebrac.rtp-net.org \
    --to=arnaud.patard@rtp-net.org \
    --cc=cjb@laptop.org \
    --cc=eric@eukrea.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.