public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Christoph Egger <christoph@christoph-egger.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] MMC boot / mvebu / clearfog
Date: Sat, 22 Oct 2016 02:38:44 +0200	[thread overview]
Message-ID: <87vawldxpn.fsf@anonymous.siccegge.de> (raw)
In-Reply-To: <87zilxdyh4.fsf@anonymous.siccegge.de> (Christoph Egger's message of "Sat, 22 Oct 2016 02:22:15 +0200")

Hi!

Christoph Egger <christoph@christoph-egger.org> writes:
> Christoph Egger <christoph@christoph-egger.org> writes:
>> hdr read sector 141, count=1
>
> Looking at the binary it seems to have the expected magic at sector 140
> == 0x28000 and the "wrong magic" at sector 141 == 0x28200 indeed. I
> guess this comes from SD cards where the kwb blob is written with 1
> sector offset while on eMMC it has to be written directly to the start
> of the mmc device.

Indeeed, the following patch fixes MMC booting for me (and most
certainly breaks SD card booting)

  Christoph

diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 6cbdee2..5e049bd 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -143,8 +143,7 @@
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SYS_MMC_U_BOOT_OFFS             (160 << 10)
 #define CONFIG_SYS_U_BOOT_OFFS                 CONFIG_SYS_MMC_U_BOOT_OFFS
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR        ((CONFIG_SYS_U_BOOT_OFFS / 512)\
-                                                + 1)
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR        (CONFIG_SYS_U_BOOT_OFFS / 512)
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS     ((512 << 10) / 512) /* 512KiB */
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER      0x00180000      /* in SDRAM */


-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer

  reply	other threads:[~2016-10-22  0:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 20:21 [U-Boot] MMC boot / mvebu / clearfog Christoph Egger
2016-10-22  0:22 ` Christoph Egger
2016-10-22  0:38   ` Christoph Egger [this message]
2016-10-24 13:47     ` Christoph Egger

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=87vawldxpn.fsf@anonymous.siccegge.de \
    --to=christoph@christoph-egger.org \
    --cc=u-boot@lists.denx.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