Skip to contentSkip to conversation

mmc: sunxi: Only update timing mode bit when enabling new timing mode

PATCH New Chen-Yu Tsai 3 participants 4 messages Aug 31, 2017 – Sep 1, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sunxi: Only update timing mode bit when enabling new timing mode

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")
---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +1 -1
index a76e763bfd4f..4edb4be46c81 100644
@@ -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) |
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 mmc: sunxi: Only update timing mode bit when enabling new timing mode

Quoted 8 lines · Chen-Yu Tsai

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")

Thanks!
Maxime

Signature · 10 lines
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>
#2 lore raw

PATCH 1/1 mmc: sunxi: Only update timing mode bit when enabling new timing mode

Quoted 11 lines · Maxime Ripard
Quoted 8 lines · Chen-Yu Tsai

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")

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#3 lore raw

PATCH 1/1 mmc: sunxi: Only update timing mode bit when enabling new timing mode

Quoted 9 lines · Jagan Teki
Quoted 7 lines · Maxime Ripard
Quoted 6 lines · Chen-Yu Tsai

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.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Fixes de9b1771c3b6 ("mmc: sunxi: Support new mode")

Applied to u-boot-sunxi/master

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.