blob: 60329eb10aa04ba255c84c72f7ef817d433499c1 [file] [log] [blame]
Masahiro Yamada323d1f92015-09-22 00:27:39 +09001/*
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 <linux/io.h>
10#include <mach/boot-device.h>
11#include <mach/sbc-regs.h>
12#include <mach/soc_info.h>
13
14u32 spl_boot_device(void)
15{
16 if (boot_is_swapped())
17 return BOOT_DEVICE_NOR;
18
19 switch (uniphier_get_soc_type()) {
20#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
21 case SOC_UNIPHIER_PH1_SLD3:
22 return ph1_sld3_boot_device();
23#endif
24#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
25 defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4) || \
26 defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
27 case SOC_UNIPHIER_PH1_LD4:
28 case SOC_UNIPHIER_PH1_PRO4:
29 case SOC_UNIPHIER_PH1_SLD8:
30 return ph1_ld4_boot_device();
31#endif
Masahiro Yamada28f40d42015-09-22 00:27:40 +090032#if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
33 case SOC_UNIPHIER_PH1_PRO5:
34 return ph1_pro5_boot_device();
35#endif
Masahiro Yamada323d1f92015-09-22 00:27:39 +090036 default:
37 return BOOT_DEVICE_NONE;
38 }
39}