]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-uniphier/boot-mode/boot-mode.c
26fc9b0a9f0725429896afbce592fba0c1e86a82
[people/ms/u-boot.git] / arch / arm / mach-uniphier / boot-mode / boot-mode.c
1 /*
2 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7 #include <common.h>
8 #include <spl.h>
9 #include <mach/boot-device.h>
10 #include <mach/sbc-regs.h>
11 #include <mach/soc_info.h>
12
13 u32 spl_boot_device(void)
14 {
15 if (boot_is_swapped())
16 return BOOT_DEVICE_NOR;
17
18 switch (uniphier_get_soc_type()) {
19 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
20 case SOC_UNIPHIER_PH1_SLD3:
21 return ph1_sld3_boot_device();
22 #endif
23 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
24 defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4) || \
25 defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
26 case SOC_UNIPHIER_PH1_LD4:
27 case SOC_UNIPHIER_PH1_PRO4:
28 case SOC_UNIPHIER_PH1_SLD8:
29 return ph1_ld4_boot_device();
30 #endif
31 #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
32 case SOC_UNIPHIER_PH1_PRO5:
33 return ph1_pro5_boot_device();
34 #endif
35 #if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
36 defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
37 case SOC_UNIPHIER_PROXSTREAM2:
38 case SOC_UNIPHIER_PH1_LD6B:
39 return proxstream2_boot_device();
40 #endif
41 default:
42 return BOOT_DEVICE_NONE;
43 }
44 }