* [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot
@ 2025-07-07 5:53 Gwenhael Goavec-Merou
2025-07-07 5:53 ` [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration Gwenhael Goavec-Merou
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2025-07-07 5:53 UTC (permalink / raw)
To: barebox; +Cc: Gwenhael Goavec-Merou, Ahmad Fatoum, Johannes Roith, Sascha Hauer
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
As mentionned in [1,2] sequence present in arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
causes boot failure without any messages.
This patch removes all instructions but the last one allowing to have
access to the barebox prompt
[1] https://lore.barebox.org/barebox/VI1PR02MB4429606E3B06D0F53D2B4175AB4DA@VI1PR02MB4429.eurprd02.prod.outlook.com/T/#m5fa4fe7832215a7e8160ef6fbd3d122dd58b0a92
[2] https://lore.barebox.org/barebox/VI1PR02MB4429606E3B06D0F53D2B4175AB4DA@VI1PR02MB4429.eurprd02.prod.outlook.com/T/#m5fa4fe7832215a7e8160ef6fbd3d122dd58b0a92
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
.../boards/avnet-zedboard/zedboard.zynqcfg | 20 -------------------
1 file changed, 20 deletions(-)
diff --git a/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg b/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
index c6a96aec7b..8e68bbf618 100644
--- a/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
+++ b/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
@@ -1,24 +1,4 @@
#include <zynq/zynq7000-header-regs.h>
-wm 32 ZYNQ_SLCR_UNLOCK 0x0000DF0D
-wm 32 ZYNQ_CLK_621_TRUE 0x00000001
-wm 32 ZYNQ_APER_CLK_CTRL 0x01FC044D
-
-wm 32 ZYNQ_ARM_PLL_CTRL 0x00028008
-wm 32 ZYNQ_ARM_PLL_CFG 0x000FA220
-wm 32 ZYNQ_ARM_PLL_CTRL 0x00028010
-wm 32 ZYNQ_ARM_PLL_CTRL 0x00028011
-wm 32 ZYNQ_ARM_PLL_CTRL 0x00028010
-wm 32 ZYNQ_ARM_PLL_CTRL 0x00028000
-
-wm 32 ZYNQ_IO_PLL_CTRL 0x0001E008
-wm 32 ZYNQ_IO_PLL_CFG 0x001452C0
-wm 32 ZYNQ_IO_PLL_CTRL 0x0001E010
-wm 32 ZYNQ_IO_PLL_CTRL 0x0001E011
-wm 32 ZYNQ_IO_PLL_CTRL 0x0001E010
-wm 32 ZYNQ_IO_PLL_CTRL 0x0001E000
-
-wm 32 ZYNQ_SDIO_CLK_CTRL 0x00000a03
-
/* stop */
wm 32 0xFFFFFFFF 0x00000000
--
2.47.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration
2025-07-07 5:53 [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot Gwenhael Goavec-Merou
@ 2025-07-07 5:53 ` Gwenhael Goavec-Merou
2025-07-14 7:20 ` Ahmad Fatoum
2025-07-07 5:53 ` [PATCH 3/3] arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console: fixed console name Gwenhael Goavec-Merou
2025-07-14 6:08 ` [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot Ahmad Fatoum
2 siblings, 1 reply; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2025-07-07 5:53 UTC (permalink / raw)
To: barebox; +Cc: Gwenhael Goavec-Merou, Ahmad Fatoum, Johannes Roith, Sascha Hauer
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
As mentionned in [1] MMC sometime fails to be initialized/ is not
working with this type of error:
arasan-sdhci e0100000.mmc@e0100000.of: registered as mmc0
malloc space: 0x17e00000 -> 0x1fdfffff (size 128 MiB)
arasan-sdhci e0100000.mmc@e0100000.of: error while transferring data for command 6
arasan-sdhci e0100000.mmc@e0100000.of: state = 0x01ff0202 , interrupt = 0x00208000
mmc0: Card's startup fails with -74
barebox-environment chosen:environment-sd.of: probe failed: No such file or directory
environment load /dev/env0: No such file or directory
This patch adds SDIO clck configuration allowing to have a valid MMC
clock frequency.
[1] https://lore.barebox.org/barebox/VI1PR02MB4429606E3B06D0F53D2B4175AB4DA@VI1PR02MB4429.eurprd02.prod.outlook.com/T/#m1cb8598da4741c0b7a41944e1aecef373dd74319
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
arch/arm/boards/avnet-zedboard/lowlevel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c
index 605aab783a..b7a98f5a82 100644
--- a/arch/arm/boards/avnet-zedboard/lowlevel.c
+++ b/arch/arm/boards/avnet-zedboard/lowlevel.c
@@ -241,6 +241,7 @@ static void avnet_zedboard_ps7_init(void)
/* poor mans clkctrl */
writel(0x00001403, ZYNQ_CLOCK_CTRL_BASE + ZYNQ_UART_CLK_CTRL);
writel(0x00000101, ZYNQ_CLOCK_CTRL_BASE + ZYNQ_LQSPI_CLK_CTRL);
+ writel(0x00001401, ZYNQ_CLOCK_CTRL_BASE + ZYNQ_SDIO_CLK_CTRL);
/* GEM0 */
writel(0x00000001, 0xf8000138);
--
2.47.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console: fixed console name
2025-07-07 5:53 [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot Gwenhael Goavec-Merou
2025-07-07 5:53 ` [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration Gwenhael Goavec-Merou
@ 2025-07-07 5:53 ` Gwenhael Goavec-Merou
2025-07-14 7:14 ` Ahmad Fatoum
2025-07-14 6:08 ` [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot Ahmad Fatoum
2 siblings, 1 reply; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2025-07-07 5:53 UTC (permalink / raw)
To: barebox; +Cc: Gwenhael Goavec-Merou, Ahmad Fatoum, Johannes Roith, Sascha Hauer
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
When trying to boot Linux no output from Linux is printed in the
console. Linux devicetree only enables one UART (connected to USB<->UART
interface) and has specified in Linux devicetree this one is called
ttyPS0 instead of ttyPS1.
This patch changes console name.
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console b/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console
index 6c9f9dabcf..ebb44efc48 100644
--- a/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console
+++ b/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console
@@ -1 +1 @@
-console=ttyPS1,115200
+console=ttyPS0,115200
--
2.47.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot
2025-07-07 5:53 [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot Gwenhael Goavec-Merou
2025-07-07 5:53 ` [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration Gwenhael Goavec-Merou
2025-07-07 5:53 ` [PATCH 3/3] arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console: fixed console name Gwenhael Goavec-Merou
@ 2025-07-14 6:08 ` Ahmad Fatoum
2 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2025-07-14 6:08 UTC (permalink / raw)
To: Gwenhael Goavec-Merou, barebox, Lucas Stach
Cc: Johannes Roith, Sascha Hauer, Gwenhael Goavec-Merou
Hi,
On 07.07.25 07:53, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> As mentionned in [1,2] sequence present in arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
> causes boot failure without any messages.
>
> This patch removes all instructions but the last one allowing to have
> access to the barebox prompt
>
> [1] https://lore.barebox.org/barebox/VI1PR02MB4429606E3B06D0F53D2B4175AB4DA@VI1PR02MB4429.eurprd02.prod.outlook.com/T/#m5fa4fe7832215a7e8160ef6fbd3d122dd58b0a92
> [2] https://lore.barebox.org/barebox/VI1PR02MB4429606E3B06D0F53D2B4175AB4DA@VI1PR02MB4429.eurprd02.prod.outlook.com/T/#m5fa4fe7832215a7e8160ef6fbd3d122dd58b0a92
The title is a bit long, but I think Sascha can fix it up on apply.
I'd rather suggest:
ARM: zynq: zed: remove early clock config causing hang
Lucas, do you have any input why this configuration may cause issues?
Anyhow:
Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Thanks,
Ahmad
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
> .../boards/avnet-zedboard/zedboard.zynqcfg | 20 -------------------
> 1 file changed, 20 deletions(-)
>
> diff --git a/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg b/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
> index c6a96aec7b..8e68bbf618 100644
> --- a/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
> +++ b/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
> @@ -1,24 +1,4 @@
> #include <zynq/zynq7000-header-regs.h>
>
> -wm 32 ZYNQ_SLCR_UNLOCK 0x0000DF0D
> -wm 32 ZYNQ_CLK_621_TRUE 0x00000001
> -wm 32 ZYNQ_APER_CLK_CTRL 0x01FC044D
> -
> -wm 32 ZYNQ_ARM_PLL_CTRL 0x00028008
> -wm 32 ZYNQ_ARM_PLL_CFG 0x000FA220
> -wm 32 ZYNQ_ARM_PLL_CTRL 0x00028010
> -wm 32 ZYNQ_ARM_PLL_CTRL 0x00028011
> -wm 32 ZYNQ_ARM_PLL_CTRL 0x00028010
> -wm 32 ZYNQ_ARM_PLL_CTRL 0x00028000
> -
> -wm 32 ZYNQ_IO_PLL_CTRL 0x0001E008
> -wm 32 ZYNQ_IO_PLL_CFG 0x001452C0
> -wm 32 ZYNQ_IO_PLL_CTRL 0x0001E010
> -wm 32 ZYNQ_IO_PLL_CTRL 0x0001E011
> -wm 32 ZYNQ_IO_PLL_CTRL 0x0001E010
> -wm 32 ZYNQ_IO_PLL_CTRL 0x0001E000
> -
> -wm 32 ZYNQ_SDIO_CLK_CTRL 0x00000a03
> -
> /* stop */
> wm 32 0xFFFFFFFF 0x00000000
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console: fixed console name
2025-07-07 5:53 ` [PATCH 3/3] arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console: fixed console name Gwenhael Goavec-Merou
@ 2025-07-14 7:14 ` Ahmad Fatoum
0 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2025-07-14 7:14 UTC (permalink / raw)
To: Gwenhael Goavec-Merou, barebox
Cc: Gwenhael Goavec-Merou, Johannes Roith, Sascha Hauer
Hi,
On 07.07.25 07:53, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> When trying to boot Linux no output from Linux is printed in the
> console. Linux devicetree only enables one UART (connected to USB<->UART
> interface) and has specified in Linux devicetree this one is called
> ttyPS0 instead of ttyPS1.
> This patch changes console name.
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Thanks for your patch. The modern way is to have the serial driver record the
TTY name used by Linux and removed hardcoded console= settings altogether.
I just Cc'd you on a patch that does that followed by one that removes this
environment file here. The series is untested, so would be nice if you
could give it a test.
Cheers,
Ahmad
> ---
> arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console b/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console
> index 6c9f9dabcf..ebb44efc48 100644
> --- a/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console
> +++ b/arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console
> @@ -1 +1 @@
> -console=ttyPS1,115200
> +console=ttyPS0,115200
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration
2025-07-07 5:53 ` [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration Gwenhael Goavec-Merou
@ 2025-07-14 7:20 ` Ahmad Fatoum
0 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2025-07-14 7:20 UTC (permalink / raw)
To: Gwenhael Goavec-Merou, barebox
Cc: Gwenhael Goavec-Merou, Johannes Roith, Sascha Hauer
Hi,
On 07.07.25 07:53, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> As mentionned in [1] MMC sometime fails to be initialized/ is not
> working with this type of error:
>
> arasan-sdhci e0100000.mmc@e0100000.of: registered as mmc0
> malloc space: 0x17e00000 -> 0x1fdfffff (size 128 MiB)
> arasan-sdhci e0100000.mmc@e0100000.of: error while transferring data for command 6
> arasan-sdhci e0100000.mmc@e0100000.of: state = 0x01ff0202 , interrupt = 0x00208000
> mmc0: Card's startup fails with -74
> barebox-environment chosen:environment-sd.of: probe failed: No such file or directory
> environment load /dev/env0: No such file or directory
>
> This patch adds SDIO clck configuration allowing to have a valid MMC
> clock frequency.
>
> [1] https://lore.barebox.org/barebox/VI1PR02MB4429606E3B06D0F53D2B4175AB4DA@VI1PR02MB4429.eurprd02.prod.outlook.com/T/#m1cb8598da4741c0b7a41944e1aecef373dd74319
Same comment as on v1, I'd suggest as commit message title:
ARM: zynq: zed: add SDIO clk frequency configuration
I am wondering why this is needed when we seem to have a clock driver for
the platform, but your workaround looks ok:
Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Thanks,
Ahmad
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
> arch/arm/boards/avnet-zedboard/lowlevel.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c
> index 605aab783a..b7a98f5a82 100644
> --- a/arch/arm/boards/avnet-zedboard/lowlevel.c
> +++ b/arch/arm/boards/avnet-zedboard/lowlevel.c
> @@ -241,6 +241,7 @@ static void avnet_zedboard_ps7_init(void)
> /* poor mans clkctrl */
> writel(0x00001403, ZYNQ_CLOCK_CTRL_BASE + ZYNQ_UART_CLK_CTRL);
> writel(0x00000101, ZYNQ_CLOCK_CTRL_BASE + ZYNQ_LQSPI_CLK_CTRL);
> + writel(0x00001401, ZYNQ_CLOCK_CTRL_BASE + ZYNQ_SDIO_CLK_CTRL);
>
> /* GEM0 */
> writel(0x00000001, 0xf8000138);
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-07-14 7:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-07 5:53 [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot Gwenhael Goavec-Merou
2025-07-07 5:53 ` [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration Gwenhael Goavec-Merou
2025-07-14 7:20 ` Ahmad Fatoum
2025-07-07 5:53 ` [PATCH 3/3] arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console: fixed console name Gwenhael Goavec-Merou
2025-07-14 7:14 ` Ahmad Fatoum
2025-07-14 6:08 ` [PATCH 1/3] arch/arm/boards/avnet-zedboard/zedboard.zynqcfg: removed everything but stop instruction to fix barebox boot Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox