ARM: uniphier: allow to enable multiple SoCs
[platform/kernel/u-boot.git] / arch / arm / mach-uniphier / cmd_pinmon.c
1 /*
2  * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <common.h>
8 #include <mach/boot-device.h>
9 #include <mach/sbc-regs.h>
10 #include <mach/soc_info.h>
11
12 static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
13 {
14         printf("Boot Swap: %s\n\n", boot_is_swapped() ? "ON" : "OFF");
15
16         switch (uniphier_get_soc_type()) {
17 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
18         case SOC_UNIPHIER_PH1_SLD3:
19                 ph1_sld3_boot_mode_show();
20                 break;
21 #endif
22 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD4) || \
23         defined(CONFIG_ARCH_UNIPHIER_PH1_PRO4) || \
24         defined(CONFIG_ARCH_UNIPHIER_PH1_SLD8)
25         case SOC_UNIPHIER_PH1_LD4:
26         case SOC_UNIPHIER_PH1_PRO4:
27         case SOC_UNIPHIER_PH1_SLD8:
28                 ph1_ld4_boot_mode_show();
29                 break;
30 #endif
31         default:
32                 break;
33         }
34
35         return 0;
36 }
37
38 U_BOOT_CMD(
39         pinmon, 1,      1,      do_pinmon,
40         "pin monitor",
41         ""
42 );