From: =?UTF-8?Q?Andreas_Bie=C3=9Fmann?= Date: Mon, 18 Apr 2016 18:54:27 +0200 Subject: [U-Boot] SAMA5D2 xplained SD/eMMC boot In-Reply-To: <5714FD86.4040309@gmail.com> References: <5714FD86.4040309@gmail.com> Message-ID: <560fa7952c02c787b56c1b15b531df26@biessmann.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 Marek, On 2016-04-18 17:30, Marek Vasut wrote: > Hi! > > I've been playing around with latest mainline u-boot on sama5d2 > xplained > ultra. I noticed that if I want to boot the board from > SD card (SDHCI1), the board will indeed load the SPL from it, but > SPL will try to load u-boot.img from eMMC (SDHCI0) and fail, as > my eMMC is blank. This is a result of hard-coding boot device to > BOOT_DEVICE_MMC1 in arch/arm/mach-at91/spl.c spl_boot_device() I > think. > > Is there any way to discern from which SDHCI the board booted to > continue loading u-boot.img from the correct one ? This would let > us implement board_boot_order() and boot from correct SDHCI. AFIAK it is not possible to detect the boot medium in a running device. At least was this the case when I checked it the last time (for sama5d3). Andreas