mmc: avoid division by zero in meson_mmc_config_clock
Subsystems (2)
PATCH 1/1 mmc: avoid division by zero in meson_mmc_config_clock
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero.
The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.html
---
Resent due to missing cc u-boot at lists.denx.de.
--- drivers/mmc/meson_gx_mmc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/mmc/meson_gx_mmc.c +3 -0
@@ -35,6 +35,9 @@ static void meson_mmc_config_clock(struct mmc *mmc)uint32_t meson_mmc_clk =0 ;unsigned int clk, clk_src, clk_div; +if (!mmc->clock) +return ; +/* 1GHz / CLK_MAX_DIV = 15,9 MHz */ if (mmc->clock >16000000 ) { clk =SD_EMMC_CLKSRC_DIV2 ;
Signature · 1 line
2.14.2
PATCH 1/1 mmc: avoid division by zero in meson_mmc_config_clock
Quoted 5 lines · Heinrich Schuchardt
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero.
The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.html
Thanks!
Works for me with odroid-c2 on u-boot 2018.03.
Without the patch, mmc access immediately hangs the board.
live well,
vagrant
Quoted 25 lines
Reported-by Vagrant Cascadian <[email protected]>Suggested-by Jaehoon Chung <[email protected]>Signed-off-by Heinrich Schuchardt <[email protected]>---
Resent due to missing cc u-boot at lists.denx.de.--- drivers/mmc/meson_gx_mmc.c | 3 +++ 1 file changed, 3 insertions(+)drivers/mmc/meson_gx_mmc.c +3
-0@@ -35,6 +35,9 @@ static void meson_mmc_config_clock(struct mmc *mmc)uint32_t meson_mmc_clk =0 ;unsigned int clk, clk_src, clk_div; +if (!mmc->clock) +return ; +/* 1GHz / CLK_MAX_DIV = 15,9 MHz */ if (mmc->clock >16000000 ) { clk =SD_EMMC_CLKSRC_DIV2 ;Signature · 1 line
2.14.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180317/7e04eb22/attachment.sig>
PATCH 1/1 mmc: avoid division by zero in meson_mmc_config_clock
Quoted 36 lines · Vagrant Cascadian
Quoted 5 lines · Heinrich Schuchardt
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero.
The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.htmlThanks!
Works for me with odroid-c2 on u-boot 2018.03.
Without the patch, mmc access immediately hangs the board.
Tested-by Vagrant Cascadian <[email protected]>live well,
vagrantQuoted 17 lines
Reported-by Vagrant Cascadian <[email protected]>Suggested-by Jaehoon Chung <[email protected]>Signed-off-by Heinrich Schuchardt <[email protected]>---
Resent due to missing cc u-boot at lists.denx.de.--- drivers/mmc/meson_gx_mmc.c | 3 +++ 1 file changed, 3 insertions(+)drivers/mmc/meson_gx_mmc.c +0
-0@@ -35,6 +35,9 @@ static void meson_mmc_config_clock(struct mmc *mmc)uint32_t meson_mmc_clk =0 ;unsigned int clk, clk_src, clk_div;
Quoted 8 lines
Quoted 8 lines
drivers/mmc/meson_gx_mmc.c +3
-0+if (!mmc->clock) +return ; +/* 1GHz / CLK_MAX_DIV = 15,9 MHz */ if (mmc->clock >16000000 ) { clk =SD_EMMC_CLKSRC_DIV2 ;Signature · 1 line
2.14.2
Hello Jaehoon,
will you pick the patch?
Best regards
Heinrich
PATCH 1/1 mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2
Quoted 48 lines · Heinrich Schuchardt
Quoted 36 lines · Vagrant Cascadian
Quoted 5 lines · Heinrich Schuchardt
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero.
The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.htmlThanks!
Works for me with odroid-c2 on u-boot 2018.03.
Without the patch, mmc access immediately hangs the board.
Tested-by Vagrant Cascadian <[email protected]>live well,
vagrantQuoted 17 lines
Reported-by Vagrant Cascadian <[email protected]>Suggested-by Jaehoon Chung <[email protected]>Signed-off-by Heinrich Schuchardt <[email protected]>---
Resent due to missing cc u-boot at lists.denx.de.--- drivers/mmc/meson_gx_mmc.c | 3 +++ 1 file changed, 3 insertions(+)drivers/mmc/meson_gx_mmc.c +0
-0@@ -35,6 +35,9 @@ static void meson_mmc_config_clock(struct mmc *mmc)uint32_t meson_mmc_clk =0 ;unsigned int clk, clk_src, clk_div;Quoted 8 lines
Quoted 8 lines
drivers/mmc/meson_gx_mmc.c +3
-0+if (!mmc->clock) +return ; +/* 1GHz / CLK_MAX_DIV = 15,9 MHz */ if (mmc->clock >16000000 ) { clk =SD_EMMC_CLKSRC_DIV2 ;Signature · 1 line
2.14.2Hello Jaehoon,
Quoted 6 lines
will you pick the patch?
Best regards
Heinrich
Hello Jaehoon,
since v2018.03 the Odroid C2 cannot be booted with U-Boot. This patch fixes it and has been adopted by Debian:
https://packages.debian.org/de/buster/u-boot
Could you, please, consider it for v2018.05-rc2.
Best regards
Heinrich
PATCH 1/1 mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2
Hi Jaehoon,
Quoted 25 lines · Heinrich Schuchardt
Quoted 24 lines · Heinrich Schuchardt
Quoted 23 lines · Vagrant Cascadian
Quoted 5 lines · Heinrich Schuchardt
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero.
The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.htmlThanks!
Works for me with odroid-c2 on u-boot 2018.03.
Without the patch, mmc access immediately hangs the board.
Tested-by Vagrant Cascadian <[email protected]>live well,
vagrantQuoted 4 lines
Reported-by Vagrant Cascadian <[email protected]>Suggested-by Jaehoon Chung <[email protected]>Signed-off-by Heinrich Schuchardt <[email protected]>---
[...]
Quoted 18 lines
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines
Signature · 1 line
2.14.2Hello Jaehoon,
will you pick the patch?
Best regards
Heinrich
Hello Jaehoon,
since v2018.03 the Odroid C2 cannot be booted with U-Boot. This patch fixes it and has been adopted by Debian:
https://packages.debian.org/de/buster/u-boot
Quoted 6 lines
Could you, please, consider it for v2018.05-rc2.
Best regards
Heinrich
It also affects the other Amlogic platforms : P212, LibreTech-CC and Khadas-Vim, thus 2018.03 is broken for these platforms.
Thanks,
Neil
PATCH 1/1 mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2
Hi All,
Sorry to top-post, but could this patch go into master for next release ?
Currently all the Amlogic boards are broken on master becaus eof this issue.
Thanks,
Neil
-------- Forwarded Message --------
Subject: Re: [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2
Date: Wed, 11 Apr 2018 16:39:08 +0200
From: Neil Armstrong <[email protected]>
Organization: Baylibre
To: Heinrich Schuchardt <[email protected]>, Jaehoon Chung <[email protected]>
CC: Vagrant Cascadian <[email protected]>, u-boot at lists.denx.de, Tom Rini <[email protected]>, open list:ARM/Amlogic Meson... <[email protected]>
Hi Jaehoon,
Quoted 25 lines · Heinrich Schuchardt
Quoted 24 lines · Heinrich Schuchardt
Quoted 23 lines · Vagrant Cascadian
Quoted 5 lines · Heinrich Schuchardt
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero.
The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.htmlThanks!
Works for me with odroid-c2 on u-boot 2018.03.
Without the patch, mmc access immediately hangs the board.
Tested-by Vagrant Cascadian <[email protected]>live well,
vagrantQuoted 4 lines
Reported-by Vagrant Cascadian <[email protected]>Suggested-by Jaehoon Chung <[email protected]>Signed-off-by Heinrich Schuchardt <[email protected]>---
[...]
Quoted 18 lines
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines
Signature · 1 line
2.14.2Hello Jaehoon,
will you pick the patch?
Best regards
Heinrich
Hello Jaehoon,
since v2018.03 the Odroid C2 cannot be booted with U-Boot. This patch fixes it and has been adopted by Debian:
https://packages.debian.org/de/buster/u-boot
Quoted 6 lines
Could you, please, consider it for v2018.05-rc2.
Best regards
Heinrich
It also affects the other Amlogic platforms : P212, LibreTech-CC and Khadas-Vim, thus 2018.03 is broken for these platforms.
Thanks,
Neil
Signature · 4 lines
Neil Armstrong Embedded Linux Software Engineer BayLibre - At the Heart of Embedded Linux www.baylibre.com
PATCH 1/1 mmc: avoid division by zero in meson_mmc_config_clock
In reply to Heinrich SchuchardtQuoted 10 lines · Heinrich Schuchardt
The Odroid C2 fails to read from mmc with U-Boot v2018.03. The change avoids a division by zero.
The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.htmlReported-by Vagrant Cascadian <[email protected]>Suggested-by Jaehoon Chung <[email protected]>Signed-off-by Heinrich Schuchardt <[email protected]>Tested-by Vagrant Cascadian <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180423/a421ea3c/attachment.sig>