From 09140113108541b95d340f3c7b6ee597d31ccc73 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:03 -0600 Subject: command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass --- board/siemens/capricorn/board.c | 6 ++++-- board/siemens/common/board.c | 9 +++++---- board/siemens/draco/board.c | 5 +++-- board/siemens/taurus/taurus.c | 4 ++-- 4 files changed, 14 insertions(+), 10 deletions(-) (limited to 'board/siemens') diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c index b4eae7f..ef6630f 100644 --- a/board/siemens/capricorn/board.c +++ b/board/siemens/capricorn/board.c @@ -6,7 +6,9 @@ * */ #include +#include #include +#include #include #include #include @@ -411,7 +413,7 @@ unsigned char get_button_state(char * const envname, unsigned char def) * 0 if button is not held down */ static int -do_userbutton(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_userbutton(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int button = 0; @@ -432,7 +434,7 @@ U_BOOT_CMD( #define ERST IMX_GPIO_NR(0, 3) static int -do_eth_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_eth_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { gpio_request(ERST, "ERST"); gpio_direction_output(ERST, 0); diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c index f1bca4b..e0bd859 100644 --- a/board/siemens/common/board.c +++ b/board/siemens/common/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -151,7 +152,7 @@ unsigned char get_button_state(char * const envname, unsigned char def) * 0 if button is not held down */ static int -do_userbutton(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_userbutton(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int button = 0; button = get_button_state("button_dfu0", BOARD_DFU_BUTTON_GPIO); @@ -167,7 +168,7 @@ U_BOOT_CMD( #endif static int -do_usertestwdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_usertestwdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { printf("\n\n\n Go into infinite loop\n\n\n"); while (1) @@ -251,8 +252,8 @@ void set_env_gpios(unsigned char state) } /* loop through defined led in environment */ } -static int do_board_led(cmd_tbl_t *cmdtp, int flag, int argc, - char *const argv[]) +static int do_board_led(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { if (argc != 2) return CMD_RET_USAGE; diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c index 963de15..b4893d3 100644 --- a/board/siemens/draco/board.c +++ b/board/siemens/draco/board.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -343,8 +344,8 @@ int board_eth_init(bd_t *bis) return n; } -static int do_switch_reset(cmd_tbl_t *cmdtp, int flag, int argc, - char *const argv[]) +static int do_switch_reset(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* Reset SMSC LAN9303 switch for default configuration */ gpio_request(GPIO_LAN9303_NRST, "nRST"); diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index 9f9cdfa..927ef59 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -386,8 +386,8 @@ static int upgrade_failure_fallback(void) return 0; } -static int do_upgrade_available(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_upgrade_available(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long upgrade_available = 0; unsigned long boot_retry = 0; -- cgit v1.1