blob: eef9f3984079db9a4b4abf7f9433d71d37b78166 [file] [log] [blame]
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09001/*
2 * Copyright (C) 2014 Panasonic Corporation
3 * Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9#include <asm/arch/boot-device.h>
10
11static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
12{
13 struct boot_device_info *table;
14 u32 mode_sel, n = 0;
15
16 mode_sel = get_boot_mode_sel();
17
18 puts("Boot Mode Pin:\n");
19
20 for (table = boot_device_table; strlen(table->info); table++) {
21 printf(" %c %02x %s\n", n == mode_sel ? '*' : ' ', n,
22 table->info);
23 n++;
24 }
25
26 return 0;
27}
28
29U_BOOT_CMD(
30 pinmon, 1, 1, do_pinmon,
31 "pin monitor",
32 ""
33);