blob: 670d4f6bff75d381c4f99d369bbc702bb125ef13 [file] [log] [blame]
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09001/*
Masahiro Yamada75f16f82015-09-22 00:27:39 +09002 * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09003 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
Masahiro Yamadaefdf3402016-01-09 01:51:13 +09008
9#include "../sbc/sbc-regs.h"
10#include "../soc-info.h"
11#include "boot-device.h"
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090012
13static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
14{
Masahiro Yamadac8e356d2014-12-19 20:20:54 +090015 printf("Boot Swap: %s\n\n", boot_is_swapped() ? "ON" : "OFF");
16
Masahiro Yamada31649052017-01-21 18:05:26 +090017 switch (uniphier_get_soc_id()) {
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090018#if defined(CONFIG_ARCH_UNIPHIER_SLD3)
Masahiro Yamada31649052017-01-21 18:05:26 +090019 case UNIPHIER_SLD3_ID:
Masahiro Yamada98905692016-03-30 20:17:02 +090020 uniphier_sld3_boot_mode_show();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090021 break;
22#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090023#if defined(CONFIG_ARCH_UNIPHIER_LD4) || defined(CONFIG_ARCH_UNIPHIER_PRO4) || \
24 defined(CONFIG_ARCH_UNIPHIER_SLD8)
Masahiro Yamada31649052017-01-21 18:05:26 +090025 case UNIPHIER_LD4_ID:
26 case UNIPHIER_PRO4_ID:
27 case UNIPHIER_SLD8_ID:
Masahiro Yamada98905692016-03-30 20:17:02 +090028 uniphier_ld4_boot_mode_show();
Masahiro Yamada75f16f82015-09-22 00:27:39 +090029 break;
30#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090031#if defined(CONFIG_ARCH_UNIPHIER_PRO5)
Masahiro Yamada31649052017-01-21 18:05:26 +090032 case UNIPHIER_PRO5_ID:
Masahiro Yamada98905692016-03-30 20:17:02 +090033 uniphier_pro5_boot_mode_show();
Masahiro Yamadad5167d52015-09-22 00:27:40 +090034 break;
35#endif
Masahiro Yamada53c59ae2016-03-18 16:41:43 +090036#if defined(CONFIG_ARCH_UNIPHIER_PXS2) || defined(CONFIG_ARCH_UNIPHIER_LD6B)
Masahiro Yamada31649052017-01-21 18:05:26 +090037 case UNIPHIER_PXS2_ID:
38 case UNIPHIER_LD6B_ID:
Masahiro Yamada98905692016-03-30 20:17:02 +090039 uniphier_pxs2_boot_mode_show();
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090040 break;
41#endif
Masahiro Yamada8bbbcbd2016-05-24 21:14:01 +090042#if defined(CONFIG_ARCH_UNIPHIER_LD11) || defined(CONFIG_ARCH_UNIPHIER_LD20)
Masahiro Yamada31649052017-01-21 18:05:26 +090043 case UNIPHIER_LD11_ID:
44 case UNIPHIER_LD20_ID:
Masahiro Yamada063eb1e2016-04-21 14:43:18 +090045 uniphier_ld20_boot_mode_show();
46 break;
47#endif
Masahiro Yamada75f16f82015-09-22 00:27:39 +090048 default:
49 break;
50 }
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090051
52 return 0;
53}
54
55U_BOOT_CMD(
56 pinmon, 1, 1, do_pinmon,
57 "pin monitor",
58 ""
59);