summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/board_late_init.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-02-02 12:11:31 (GMT)
committerMasahiro Yamada <yamada.masahiro@socionext.com>2016-02-14 07:36:13 (GMT)
commitfec4816387a978e651da74c83bcdd5019a6d024c (patch)
tree0f35c45af79851593de6e3ba1236b8ac84190f49 /arch/arm/mach-uniphier/board_late_init.c
parenta89be270e7eb42fca6c77bb25bd77971569f31ee (diff)
downloadu-boot-fsl-qoriq-fec4816387a978e651da74c83bcdd5019a6d024c.tar.xz
ARM: uniphier: support USB boot mode for ProXstream2 / PH1-LD6b SoC
The USB boot code is too fat and complicated to be included in SPL (at least for now). So, it was implemented as a separate project (what we call USB-loader). The expected boot sequence is as follows: Boot ROM -> USB-loader -> SPL -> U-Boot proper The USB-loader loads the SPL and U-Boot proper from a USB memory onto the locked L2 cache. Then, SPL needs to copy the U-Boot proper to DRAM, so this mode looks like a NOR boot from the view of SPL. However, we want to distinguish between (genuine) NOR boot and USB boot in some places. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm/mach-uniphier/board_late_init.c')
-rw-r--r--arch/arm/mach-uniphier/board_late_init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index c2a3261..eba48a2 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -11,6 +11,8 @@
#include <linux/io.h>
#include <../drivers/mtd/nand/denali.h>
+#include "boot-mode/boot-device.h"
+
static void nand_denali_wp_disable(void)
{
#ifdef CONFIG_NAND_DENALI
@@ -62,7 +64,7 @@ int board_late_init(void)
{
puts("MODE: ");
- switch (spl_boot_device()) {
+ switch (spl_boot_device_raw()) {
case BOOT_DEVICE_MMC1:
printf("eMMC Boot\n");
setenv("bootmode", "emmcboot");
@@ -76,6 +78,10 @@ int board_late_init(void)
printf("NOR Boot\n");
setenv("bootmode", "norboot");
break;
+ case BOOT_DEVICE_USB:
+ printf("USB Boot\n");
+ setenv("bootmode", "usbboot");
+ break;
default:
printf("Unsupported Boot Mode\n");
return -1;