diff options
author | Simon Glass <sjg@chromium.org> | 2020-05-10 11:40:03 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-18 18:36:55 -0400 |
commit | 09140113108541b95d340f3c7b6ee597d31ccc73 (patch) | |
tree | 4b4241b799bbbb2eeef4164392442b193af1703f /board/toradex | |
parent | 691d719db7183dfb1d1360efed4c5e9f6899095f (diff) | |
download | u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.gz u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.xz u-boot-09140113108541b95d340f3c7b6ee597d31ccc73.zip |
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 <sjg@chromium.org>
Diffstat (limited to 'board/toradex')
-rw-r--r-- | board/toradex/apalis-tk1/apalis-tk1.c | 1 | ||||
-rw-r--r-- | board/toradex/apalis_imx6/do_fuse.c | 9 | ||||
-rw-r--r-- | board/toradex/apalis_imx6/pf0100.c | 5 | ||||
-rw-r--r-- | board/toradex/colibri_imx6/do_fuse.c | 9 | ||||
-rw-r--r-- | board/toradex/colibri_imx6/pf0100.c | 5 | ||||
-rw-r--r-- | board/toradex/common/tdx-cfg-block.c | 9 | ||||
-rw-r--r-- | board/toradex/verdin-imx8mm/spl.c | 1 |
7 files changed, 23 insertions, 16 deletions
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c index 81329a6131..3b7fa4b237 100644 --- a/board/toradex/apalis-tk1/apalis-tk1.c +++ b/board/toradex/apalis-tk1/apalis-tk1.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <env.h> #include <init.h> #include <asm/arch-tegra/ap.h> #include <asm/gpio.h> diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c index 22d191f52a..6991b1bc13 100644 --- a/board/toradex/apalis_imx6/do_fuse.c +++ b/board/toradex/apalis_imx6/do_fuse.c @@ -9,6 +9,7 @@ #include <common.h> #ifndef CONFIG_SPL_BUILD +#include <command.h> #include <console.h> #include <fuse.h> @@ -35,8 +36,8 @@ static int mfgr_fuse(void) return CMD_RET_SUCCESS; } -int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Fusing...\n"); @@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned val; int ret; diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c index ebd6418fd4..f8d0494332 100644 --- a/board/toradex/apalis_imx6/pf0100.c +++ b/board/toradex/apalis_imx6/pf0100.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <command.h> #include <i2c.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> @@ -261,8 +262,8 @@ static int pf0100_prog(void) return CMD_RET_SUCCESS; } -static int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_pf0100_prog(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Programming PMIC OTP..."); diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c index 22d191f52a..6991b1bc13 100644 --- a/board/toradex/colibri_imx6/do_fuse.c +++ b/board/toradex/colibri_imx6/do_fuse.c @@ -9,6 +9,7 @@ #include <common.h> #ifndef CONFIG_SPL_BUILD +#include <command.h> #include <console.h> #include <fuse.h> @@ -35,8 +36,8 @@ static int mfgr_fuse(void) return CMD_RET_SUCCESS; } -int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Fusing...\n"); @@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned val; int ret; diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c index e744243297..149e9bd3b9 100644 --- a/board/toradex/colibri_imx6/pf0100.c +++ b/board/toradex/colibri_imx6/pf0100.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <command.h> #include <i2c.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> @@ -246,8 +247,8 @@ static int pf0100_prog(void) return CMD_RET_SUCCESS; } -static int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_pf0100_prog(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Programming PMIC OTP..."); diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index bd7d8b7f53..75216ecf6d 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -5,6 +5,7 @@ #include <common.h> #include "tdx-cfg-block.h" +#include <command.h> #include <asm/cache.h> #if defined(CONFIG_TARGET_APALIS_IMX6) || \ @@ -514,8 +515,8 @@ static int get_cfgblock_barcode(char *barcode) return 0; } -static int do_cfgblock_create(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_cfgblock_create(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { u8 *config_block; struct toradex_tag *tag; @@ -643,8 +644,8 @@ out: return ret; } -static int do_cfgblock(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_cfgblock(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index 338952ea71..eedca1e218 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <command.h> #include <image.h> #include <init.h> #include <asm/arch/clock.h> |