]> git.sur5r.net Git - u-boot/blob - arch/arm/mach-uniphier/cmd_pinmon.c
Merge git://git.denx.de/u-boot-socfpga
[u-boot] / 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 #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5)
32         case SOC_UNIPHIER_PH1_PRO5:
33                 ph1_pro5_boot_mode_show();
34                 break;
35 #endif
36 #if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
37         defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
38         case SOC_UNIPHIER_PROXSTREAM2:
39         case SOC_UNIPHIER_PH1_LD6B:
40                 proxstream2_boot_mode_show();
41                 break;
42 #endif
43         default:
44                 break;
45         }
46
47         return 0;
48 }
49
50 U_BOOT_CMD(
51         pinmon, 1,      1,      do_pinmon,
52         "pin monitor",
53         ""
54 );