From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Date: Sat, 22 Oct 2016 02:38:44 +0200 Subject: [U-Boot] MMC boot / mvebu / clearfog In-Reply-To: <87zilxdyh4.fsf@anonymous.siccegge.de> (Christoph Egger's message of "Sat, 22 Oct 2016 02:22:15 +0200") References: <87d1jibiz4.fsf@hepworth.siccegge.de> <87zilxdyh4.fsf@anonymous.siccegge.de> Message-ID: <87vawldxpn.fsf@anonymous.siccegge.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi! Christoph Egger writes: > Christoph Egger 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