* [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock @ 2018-03-17 22:49 Heinrich Schuchardt 2018-03-18 0:03 ` Vagrant Cascadian 2018-04-23 20:17 ` [U-Boot] [U-Boot, 1/1] mmc: avoid division by zero in meson_mmc_config_clock Tom Rini 0 siblings, 2 replies; 7+ messages in thread From: Heinrich Schuchardt @ 2018-03-17 22:49 UTC (permalink / raw) To: u-boot 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 Reported-by: Vagrant Cascadian <vagrant@debian.org> Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- Resent due to missing cc u-boot at lists.denx.de. --- drivers/mmc/meson_gx_mmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index a2cd5d3a44..454593eec4 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -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; -- 2.14.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock 2018-03-17 22:49 [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock Heinrich Schuchardt @ 2018-03-18 0:03 ` Vagrant Cascadian 2018-03-24 14:57 ` Heinrich Schuchardt 2018-04-23 20:17 ` [U-Boot] [U-Boot, 1/1] mmc: avoid division by zero in meson_mmc_config_clock Tom Rini 1 sibling, 1 reply; 7+ messages in thread From: Vagrant Cascadian @ 2018-03-18 0:03 UTC (permalink / raw) To: u-boot On 2018-03-17, Heinrich Schuchardt wrote: > 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. Tested-by: Vagrant Cascadian <vagrant@debian.org> live well, vagrant > Reported-by: Vagrant Cascadian <vagrant@debian.org> > Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > --- > Resent due to missing cc u-boot at lists.denx.de. > --- > drivers/mmc/meson_gx_mmc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c > index a2cd5d3a44..454593eec4 100644 > --- a/drivers/mmc/meson_gx_mmc.c > +++ b/drivers/mmc/meson_gx_mmc.c > @@ -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; > -- > 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> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock 2018-03-18 0:03 ` Vagrant Cascadian @ 2018-03-24 14:57 ` Heinrich Schuchardt 2018-04-10 16:01 ` [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2 Heinrich Schuchardt 0 siblings, 1 reply; 7+ messages in thread From: Heinrich Schuchardt @ 2018-03-24 14:57 UTC (permalink / raw) To: u-boot On 03/18/2018 01:03 AM, Vagrant Cascadian wrote: > On 2018-03-17, Heinrich Schuchardt wrote: >> 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. > > Tested-by: Vagrant Cascadian <vagrant@debian.org> > > > live well, > vagrant > >> Reported-by: Vagrant Cascadian <vagrant@debian.org> >> Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> >> --- >> Resent due to missing cc u-boot at lists.denx.de. >> --- >> drivers/mmc/meson_gx_mmc.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c >> index a2cd5d3a44..454593eec4 100644 >> --- a/drivers/mmc/meson_gx_mmc.c >> +++ b/drivers/mmc/meson_gx_mmc.c >> @@ -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; >> -- >> 2.14.2 Hello Jaehoon, will you pick the patch? Best regards Heinrich ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2 2018-03-24 14:57 ` Heinrich Schuchardt @ 2018-04-10 16:01 ` Heinrich Schuchardt 2018-04-11 14:39 ` Neil Armstrong 0 siblings, 1 reply; 7+ messages in thread From: Heinrich Schuchardt @ 2018-04-10 16:01 UTC (permalink / raw) To: u-boot On 03/24/2018 03:57 PM, Heinrich Schuchardt wrote: > On 03/18/2018 01:03 AM, Vagrant Cascadian wrote: >> On 2018-03-17, Heinrich Schuchardt wrote: >>> 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. >> >> Tested-by: Vagrant Cascadian <vagrant@debian.org> >> >> >> live well, >> vagrant >> >>> Reported-by: Vagrant Cascadian <vagrant@debian.org> >>> Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> >>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> >>> --- >>> Resent due to missing cc u-boot at lists.denx.de. >>> --- >>> drivers/mmc/meson_gx_mmc.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c >>> index a2cd5d3a44..454593eec4 100644 >>> --- a/drivers/mmc/meson_gx_mmc.c >>> +++ b/drivers/mmc/meson_gx_mmc.c >>> @@ -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; >>> -- >>> 2.14.2 > > Hello 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 Could you, please, consider it for v2018.05-rc2. Best regards Heinrich ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2 2018-04-10 16:01 ` [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2 Heinrich Schuchardt @ 2018-04-11 14:39 ` Neil Armstrong 2018-04-23 14:29 ` [U-Boot] Fwd: " Neil Armstrong 0 siblings, 1 reply; 7+ messages in thread From: Neil Armstrong @ 2018-04-11 14:39 UTC (permalink / raw) To: u-boot Hi Jaehoon, On 10/04/2018 18:01, Heinrich Schuchardt wrote: > On 03/24/2018 03:57 PM, Heinrich Schuchardt wrote: >> On 03/18/2018 01:03 AM, Vagrant Cascadian wrote: >>> On 2018-03-17, Heinrich Schuchardt wrote: >>>> 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. >>> >>> Tested-by: Vagrant Cascadian <vagrant@debian.org> >>> >>> >>> live well, >>> vagrant >>> >>>> Reported-by: Vagrant Cascadian <vagrant@debian.org> >>>> Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> >>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> >>>> --- [...] >>>> -- >>>> 2.14.2 >> >> Hello 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 > > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] Fwd: [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2 2018-04-11 14:39 ` Neil Armstrong @ 2018-04-23 14:29 ` Neil Armstrong 0 siblings, 0 replies; 7+ messages in thread From: Neil Armstrong @ 2018-04-23 14:29 UTC (permalink / raw) To: u-boot 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 <narmstrong@baylibre.com> Organization: Baylibre To: Heinrich Schuchardt <xypron.glpk@gmx.de>, Jaehoon Chung <jh80.chung@samsung.com> CC: Vagrant Cascadian <vagrant@debian.org>, u-boot at lists.denx.de, Tom Rini <trini@konsulko.com>, open list:ARM/Amlogic Meson... <linux-amlogic@lists.infradead.org> Hi Jaehoon, On 10/04/2018 18:01, Heinrich Schuchardt wrote: > On 03/24/2018 03:57 PM, Heinrich Schuchardt wrote: >> On 03/18/2018 01:03 AM, Vagrant Cascadian wrote: >>> On 2018-03-17, Heinrich Schuchardt wrote: >>>> 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. >>> >>> Tested-by: Vagrant Cascadian <vagrant@debian.org> >>> >>> >>> live well, >>> vagrant >>> >>>> Reported-by: Vagrant Cascadian <vagrant@debian.org> >>>> Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> >>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> >>>> --- [...] >>>> -- >>>> 2.14.2 >> >> Hello 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 > > 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 -- Neil Armstrong Embedded Linux Software Engineer BayLibre - At the Heart of Embedded Linux www.baylibre.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [U-Boot, 1/1] mmc: avoid division by zero in meson_mmc_config_clock 2018-03-17 22:49 [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock Heinrich Schuchardt 2018-03-18 0:03 ` Vagrant Cascadian @ 2018-04-23 20:17 ` Tom Rini 1 sibling, 0 replies; 7+ messages in thread From: Tom Rini @ 2018-04-23 20:17 UTC (permalink / raw) To: u-boot On Sat, Mar 17, 2018 at 10:49:36PM +0000, Heinrich Schuchardt wrote: > 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 > > Reported-by: Vagrant Cascadian <vagrant@debian.org> > Suggested-by: Jaehoon Chung <jh80.chung@samsung.com> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > Tested-by: Vagrant Cascadian <vagrant@debian.org> Applied to u-boot/master, thanks! -- 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> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-04-23 20:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-03-17 22:49 [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock Heinrich Schuchardt 2018-03-18 0:03 ` Vagrant Cascadian 2018-03-24 14:57 ` Heinrich Schuchardt 2018-04-10 16:01 ` [U-Boot] [PATCH 1/1] mmc: avoid division by zero in meson_mmc_config_clock - Please, consider for v2018.05-rc2 Heinrich Schuchardt 2018-04-11 14:39 ` Neil Armstrong 2018-04-23 14:29 ` [U-Boot] Fwd: " Neil Armstrong 2018-04-23 20:17 ` [U-Boot] [U-Boot, 1/1] mmc: avoid division by zero in meson_mmc_config_clock Tom Rini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox