]> git.sur5r.net Git - u-boot/blob - arch/arm/cpu/armv7/uniphier/cmd_pinmon.c
Merge branch 'u-boot/master' into 'u-boot-arm/master'
[u-boot] / arch / arm / cpu / armv7 / uniphier / cmd_pinmon.c
1 /*
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
11 static 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
29 U_BOOT_CMD(
30         pinmon, 1,      1,      do_pinmon,
31         "pin monitor",
32         ""
33 );