From: =?UTF-8?Q?Andreas_Bie=C3=9Fmann?= Date: Tue, 03 May 2016 13:43:48 +0200 Subject: [U-Boot] ARM: sama5d2: Implement boot device autodetection In-Reply-To: <572885B9.3080401@denx.de> References: <1461354981-7117-1-git-send-email-marex@denx.de> <20160503085211.GH6652@punisher.entwicklung.er.corscience.de> <572885B9.3080401@denx.de> Message-ID: <12ca86779d6d1262c2c6a5a250ab1fcb@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-05-03 13:04, Marek Vasut wrote: > On 05/03/2016 10:52 AM, Andreas Bie?mann wrote: >> On Fri, Apr 22, 2016 at 09:56:21PM +0200, Marek Vasut wrote: >>> Implement support for saving ARM register R4 early during boot using >>> save_boot_params . Implement support for decoding the stored register >>> R4 value in spl_boot_device() to obtain boot device from which the >>> SoC booted. This way, the SPL will always load U-Boot from the same >>> device from which the SPL itself booted instead of using hard-coded >>> boot device. >>> >>> This functionality is useful for example when booting >>> sama5d2-xplained >>> from SD card, where by default the SPL would try loading the U-Boot >>> from eMMC and fail. This is because eMMC is on SDHCI0 >>> (BOOT_DEVICE_MMC1), >>> while SD slot is on SDHCI1 (BOOT_DEVICE_MMC2) and the SPL was >>> hard-wired >>> to always boot from BOOT_DEVICE_MMC1. >>> >>> Signed-off-by: Marek Vasut >>> Cc: Andreas Bie?mann >>> Cc: Wenyou Yang >>> >> >> Reviewed-by: Andreas Bie?mann > > I will eventually extend this to SAMA5Dx as this is quite helpful on > upcoming board. Let's do it for the next release. Hopefully this gets in with 2016.05 ... as always I'm really late for my pull request. Andreas > >>> --- >>> arch/arm/mach-at91/Makefile | 2 +- >>> arch/arm/mach-at91/bootparams_atmel.S | 18 ++++++++++++++++ >>> arch/arm/mach-at91/include/mach/sama5d2.h | 12 +++++++++++ >>> arch/arm/mach-at91/spl.c | 36 >>> +++++++++++++++++++++++++++++++ >>> 4 files changed, 67 insertions(+), 1 deletion(-) >>> create mode 100644 arch/arm/mach-at91/bootparams_atmel.S