All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc: sunxi: Only update timing mode bit when enabling new timing mode
@ 2017-08-31 13:57 Chen-Yu Tsai
  2017-08-31 14:04 ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Chen-Yu Tsai @ 2017-08-31 13:57 UTC (permalink / raw)
  To: u-boot

When enabling the new mmc timing mode, we inadvertently clear all the
remaining bits in the new timing mode register. The bits cleared
include a default phase delay on the output clock. The BSP kernel
states that the default values are supposed to be used. Clearing them
results in decreased performance or transfer errors on some boards.

Fixes: de9b1771c3b6 ("mmc: sunxi: Support new mode")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index a76e763bfd4f..4edb4be46c81 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -167,7 +167,7 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
 	if (new_mode) {
 #ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
 		val = CCM_MMC_CTRL_MODE_SEL_NEW;
-		writel(SUNXI_MMC_NTSR_MODE_SEL_NEW, &priv->reg->ntsr);
+		setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW);
 #endif
 	} else {
 		val = CCM_MMC_CTRL_OCLK_DLY(oclk_dly) |
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mmc: sunxi: Only update timing mode bit when enabling new timing mode
  2017-08-31 13:57 [U-Boot] [PATCH] mmc: sunxi: Only update timing mode bit when enabling new timing mode Chen-Yu Tsai
@ 2017-08-31 14:04 ` Maxime Ripard
  2017-08-31 14:06   ` Jagan Teki
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2017-08-31 14:04 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 31, 2017 at 09:57:48PM +0800, Chen-Yu Tsai wrote:
> When enabling the new mmc timing mode, we inadvertently clear all the
> remaining bits in the new timing mode register. The bits cleared
> include a default phase delay on the output clock. The BSP kernel
> states that the default values are supposed to be used. Clearing them
> results in decreased performance or transfer errors on some boards.
> 
> Fixes: de9b1771c3b6 ("mmc: sunxi: Support new mode")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170831/d29c5e44/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mmc: sunxi: Only update timing mode bit when enabling new timing mode
  2017-08-31 14:04 ` Maxime Ripard
@ 2017-08-31 14:06   ` Jagan Teki
  2017-09-01 14:21     ` Jagan Teki
  0 siblings, 1 reply; 4+ messages in thread
From: Jagan Teki @ 2017-08-31 14:06 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 31, 2017 at 7:34 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Thu, Aug 31, 2017 at 09:57:48PM +0800, Chen-Yu Tsai wrote:
>> When enabling the new mmc timing mode, we inadvertently clear all the
>> remaining bits in the new timing mode register. The bits cleared
>> include a default phase delay on the output clock. The BSP kernel
>> states that the default values are supposed to be used. Clearing them
>> results in decreased performance or transfer errors on some boards.
>>
>> Fixes: de9b1771c3b6 ("mmc: sunxi: Support new mode")
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Reviewed-by: Jagan Teki <jagan@openedev.com>

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mmc: sunxi: Only update timing mode bit when enabling new timing mode
  2017-08-31 14:06   ` Jagan Teki
@ 2017-09-01 14:21     ` Jagan Teki
  0 siblings, 0 replies; 4+ messages in thread
From: Jagan Teki @ 2017-09-01 14:21 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 31, 2017 at 7:36 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> On Thu, Aug 31, 2017 at 7:34 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
>> On Thu, Aug 31, 2017 at 09:57:48PM +0800, Chen-Yu Tsai wrote:
>>> When enabling the new mmc timing mode, we inadvertently clear all the
>>> remaining bits in the new timing mode register. The bits cleared
>>> include a default phase delay on the output clock. The BSP kernel
>>> states that the default values are supposed to be used. Clearing them
>>> results in decreased performance or transfer errors on some boards.
>>>
>>> Fixes: de9b1771c3b6 ("mmc: sunxi: Support new mode")
>>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>>
>> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> Reviewed-by: Jagan Teki <jagan@openedev.com>

Applied to u-boot-sunxi/master

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-01 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 13:57 [U-Boot] [PATCH] mmc: sunxi: Only update timing mode bit when enabling new timing mode Chen-Yu Tsai
2017-08-31 14:04 ` Maxime Ripard
2017-08-31 14:06   ` Jagan Teki
2017-09-01 14:21     ` Jagan Teki

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.