public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc:sdhci:fix: Change default interrupts enabled at SDHCI initialization
Date: Fri, 22 Feb 2013 08:33:34 +0900	[thread overview]
Message-ID: <5126AECE.2020509@samsung.com> (raw)
In-Reply-To: <51265D33.8030606@ti.com>

Hi Tom,

On 02/22/2013 02:45 AM, Tom Rini wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 02/21/2013 12:21 PM, Lukasz Majewski wrote:
>> Dear All,
>>
>> I'd like to kindly ask for any feedback on this patch.
>>
>> It is now more than month on the u-boot mailing list...
> 
> OK, sorry, the generic name of the driver threw me for a minute.  I'm
> fine with this change going up u-boot-samsung -> u-boot-arm -> master
> since it's a samsung-only driver right now.  Does this work for you?
I think that this driver didn't use samsung-only.
going up u-boot-samsung? I'm not sure that.

Best Regards,
Jaehoon Chung
> 
>>
>>
>>> Dear All,
>>>
>>> Any feedback about this patch?
>>>
>>> It has been on the list for quite long time.....
>>>
>>>
>>>> Dear All,
>>>>
>>>> Any feedback about this patch?
>>>>
>>>>> This patch changes sdhci_init()'s behavior to NOT enable all 
>>>>> interrupt sources by default. Moreover interrupt signaling
>>>>> has been disabled.
>>>>>
>>>>> This patch do not enable interrupts which aren't served in
>>>>> u-boot (they are defined at sdhci.h but NOT used elsewhere): 
>>>>> - SDHCI_INT_CARD_INSERT, SDHCI_INT_CARD_REMOVE,
>>>>> SDHCI_BUS_POWER, SDHCI_INT_CARD_REMOVE, SDHCI_INT_CARD_INT
>>>>>
>>>>> Special care shall be put on SDHCI_INT_CARD_INT, which
>>>>> indicates interrupt generated by SD card. According to "SD
>>>>> Host Controller Simplified Spec. ver 3.00" when bit 8 (Card
>>>>> Interrupt Status Enable) at "Normal Interrupt Status Enable
>>>>> Register" (offset 0x34) is set, the card interrupt detection
>>>>> is started. Then eMMC card may cause the SD controller to set
>>>>> this bit and then this interrupt is passed to booted OS and
>>>>> might cause kernel crash.
>>>>>
>>>>>
>>>>> To sum up: - Only enable interrupts, which are served at
>>>>> u-boot - This cleanup as a side effect fixes SDHCI's CARD
>>>>> INTERRUPT problem at Linux kernel (versions 3.6+, sdhci
>>>>> controller) - Keep masked bits at "Normal Interrupt Signal
>>>>> Enable Register" (0x38h)
>>>>>
>>>>> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> 
>>>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc:
>>>>> Lei Wen <leiwen@marvell.com> Cc: Andy Fleming
>>>>> <afleming@freescale.com> --- drivers/mmc/sdhci.c |    8
>>>>> +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index
>>>>> 0fd1337..76c14fb 100644 --- a/drivers/mmc/sdhci.c +++
>>>>> b/drivers/mmc/sdhci.c @@ -412,9 +412,11 @@ int
>>>>> sdhci_init(struct mmc *mmc) status = sdhci_readl(host, 
>>>>> SDHCI_PRESENT_STATE); }
>>>>>
>>>>> -	/* Eable all state */ -	sdhci_writel(host,
>>>>> SDHCI_INT_ALL_MASK, SDHCI_INT_ENABLE); -	sdhci_writel(host,
>>>>> SDHCI_INT_ALL_MASK, SDHCI_SIGNAL_ENABLE); +	/* Enable only
>>>>> interrupts served by the SD controller */ +
>>>>> sdhci_writel(host, SDHCI_INT_DATA_MASK | SDHCI_INT_CMD_MASK +
>>>>> , SDHCI_INT_ENABLE); +	/* Mask all sdhci interrupt sources
>>>>> */ +	sdhci_writel(host, 0x0, SDHCI_SIGNAL_ENABLE);
>>>>>
>>>>> return 0; }
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
> 
> 
> - -- 
> Tom
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQIcBAEBAgAGBQJRJl0zAAoJENk4IS6UOR1WU68P/RTyQMDciU5rlgA0NfcSt2/y
> T55Q+R43eaRABLqEdLu5rQXJgKcLIQZEr4Czfu3LqWDfUylJiXkUc+ngSQ/uJR9p
> v1IN+rrIOs3ZQcFy9d3oDROtkz16Mc0T+32WI8g/NfL7X9IKYqSEeBUGmc0O54Ro
> kdmH9fqzCX3wbaY//+vG1uMA3s61Ekx+3Gbf5BcyoVMHrf1fNz4L1kZ7ZB/MBzdp
> HOQIoButM7/BGteF5o5LPHCNw7LtnAz5basRwaGQmrGVzeA2GCKFOrYEx3oa/ghC
> mK/PNTW6RCzRFBckbA2No9C1Tj1i7EMy8K/B8sub9FmJWF9XfDf4YhbacXOse5RA
> +mSwZiWuJP7K/0YaDUh7itQE2Wec2iA2LNlgb0Ujwnm4DsxnP805Cbz/JJuT9mCu
> 8LYw7crg4DwU9X0g0MEojKXupQ2mHMBHHrYRuUdIaYxHkkkf7j4mSIzPR75FzAjF
> 8l54TL4bEKHyUd7HmTaEkafyhziC8Kit4SEQqjTJW9S720nVOaM/pMmrji3mxUXH
> wHUpTTVS0TIAzhdAtxxpPxbRsMnnEgobOFGDbF8wzjGMQWWudZGLXqCm0kv+5B2K
> 3o6IlxPQ/TlokPe+A63NHTbJTJ0z/ylLX0UyNifzPzsoTiskO4qqSdHdrGTcA3f+
> Tqq0rAM0CXj2oMMkkOFb
> =nGWo
> -----END PGP SIGNATURE-----
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

  reply	other threads:[~2013-02-21 23:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 15:08 [U-Boot] [PATCH] mmc:sdhci:fix: Change default interrupts enabled at SDHCI initialization Lukasz Majewski
2013-01-29 14:47 ` Lukasz Majewski
2013-01-30  4:52   ` Jaehoon Chung
2013-02-11  8:50   ` Lukasz Majewski
2013-02-11 13:58     ` Tom Rini
2013-02-21 17:21     ` Lukasz Majewski
2013-02-21 17:45       ` Tom Rini
2013-02-21 23:33         ` Jaehoon Chung [this message]
2013-02-21 23:43           ` Tom Rini
2013-02-22  7:11             ` Lukasz Majewski
2013-02-22  7:41               ` Jaehoon Chung
2013-03-11  8:22               ` Lukasz Majewski
2013-03-12 10:54                 ` Minkyu Kang

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=5126AECE.2020509@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox