mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Gwenhael Goavec-Merou <gwenj@trabucayre.com>
To: barebox@lists.infradead.org
Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Johannes Roith <johannes@gnu-linux.rocks>,
	Sascha Hauer <sha@pengutronix.de>
Subject: [PATCH 2/3] arch/arm/boards/avnet-zedboard/lowlevel.c: added SDIO clk frequency configuration
Date: Mon,  7 Jul 2025 05:53:30 +0000	[thread overview]
Message-ID: <20250707055331.2355809-2-gwenj@trabucayre.com> (raw)
In-Reply-To: <20250707055331.2355809-1-gwenj@trabucayre.com>

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




  reply	other threads:[~2025-07-07  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-07-07  5:53 ` [PATCH 3/3] arch/arm/boards/avnet-zedboard/env/nv/linux.bootargs.console: fixed console name Gwenhael Goavec-Merou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250707055331.2355809-2-gwenj@trabucayre.com \
    --to=gwenj@trabucayre.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=gwenhael.goavec-merou@trabucayre.com \
    --cc=johannes@gnu-linux.rocks \
    --cc=sha@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox