Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 1 | /* |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 2 | * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com> |
Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Masahiro Yamada | efdf340 | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 8 | |
| 9 | #include "../sbc/sbc-regs.h" |
| 10 | #include "../soc-info.h" |
| 11 | #include "boot-device.h" |
Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 12 | |
| 13 | static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
| 14 | { |
Masahiro Yamada | c8e356d | 2014-12-19 20:20:54 +0900 | [diff] [blame] | 15 | printf("Boot Swap: %s\n\n", boot_is_swapped() ? "ON" : "OFF"); |
| 16 | |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 17 | switch (uniphier_get_soc_type()) { |
| 18 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3) |
| 19 | case SOC_UNIPHIER_PH1_SLD3: |
| 20 | ph1_sld3_boot_mode_show(); |
| 21 | break; |
| 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 | ph1_ld4_boot_mode_show(); |
| 30 | break; |
| 31 | #endif |
Masahiro Yamada | d5167d5 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 32 | #if defined(CONFIG_ARCH_UNIPHIER_PH1_PRO5) |
| 33 | case SOC_UNIPHIER_PH1_PRO5: |
| 34 | ph1_pro5_boot_mode_show(); |
| 35 | break; |
| 36 | #endif |
Masahiro Yamada | 1fe65d3 | 2015-09-22 00:27:41 +0900 | [diff] [blame] | 37 | #if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \ |
| 38 | defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B) |
| 39 | case SOC_UNIPHIER_PROXSTREAM2: |
| 40 | case SOC_UNIPHIER_PH1_LD6B: |
| 41 | proxstream2_boot_mode_show(); |
| 42 | break; |
| 43 | #endif |
Masahiro Yamada | 75f16f8 | 2015-09-22 00:27:39 +0900 | [diff] [blame] | 44 | default: |
| 45 | break; |
| 46 | } |
Masahiro Yamada | bb2ff9d | 2014-10-03 19:21:06 +0900 | [diff] [blame] | 47 | |
| 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | U_BOOT_CMD( |
| 52 | pinmon, 1, 1, do_pinmon, |
| 53 | "pin monitor", |
| 54 | "" |
| 55 | ); |