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/gdsys/a38x/controlcenterdc.c | 1 + board/gdsys/a38x/hydra.c | 3 ++- board/gdsys/common/cmd_ioloop.c | 10 +++++----- board/gdsys/common/osd.c | 10 ++++++---- board/gdsys/common/osd_cmd.c | 13 +++++++------ board/gdsys/mpc8308/gazerbeam.c | 1 + board/gdsys/p1022/controlcenterd.c | 2 +- 7 files changed, 23 insertions(+), 17 deletions(-) (limited to 'board/gdsys') diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c index 7aad683127..0d53d69ecc 100644 --- a/board/gdsys/a38x/controlcenterdc.c +++ b/board/gdsys/a38x/controlcenterdc.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c index fa50ad2830..daade6da0a 100644 --- a/board/gdsys/a38x/hydra.c +++ b/board/gdsys/a38x/hydra.c @@ -1,4 +1,5 @@ #include +#include #include /* ctrlc */ #include @@ -89,7 +90,7 @@ void hydra_initialize(void) #define REFL_PATTERN (0xdededede) #define REFL_PATTERN_INV (~REFL_PATTERN) -int do_hydrate(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_hydrate(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint k = 0; void __iomem *pcie2_base = (void __iomem *)(MVEBU_REG_PCIE_BASE + diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c index 05a14ff103..88ab8233d5 100644 --- a/board/gdsys/common/cmd_ioloop.c +++ b/board/gdsys/common/cmd_ioloop.c @@ -264,7 +264,7 @@ static void io_reflect(struct udevice *dev) * Syntax: * ioreflect {fpga} {reportrate} */ -int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioreflect(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint fpga; uint rate = 0; @@ -321,7 +321,7 @@ int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * Syntax: * ioreflect {reportrate} */ -int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioreflect(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *fpga; struct regmap *map; @@ -374,7 +374,7 @@ int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * Syntax: * ioloop {fpga} {size} {rate} */ -int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint fpga; uint size; @@ -440,7 +440,7 @@ int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * Syntax: * ioloop {size} {rate} */ -int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint size; uint rate = 0; @@ -501,7 +501,7 @@ int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ #ifndef CONFIG_GDSYS_LEGACY_DRIVERS -int do_iodev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_iodev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *ioep = NULL; struct udevice *board; diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c index 10c4329146..cda0cc6b48 100644 --- a/board/gdsys/common/osd.c +++ b/board/gdsys/common/osd.c @@ -7,6 +7,7 @@ #ifdef CONFIG_GDSYS_LEGACY_DRIVERS #include +#include #include #include @@ -259,7 +260,8 @@ static int osd_write_videomem(unsigned screen, unsigned offset, return charcount; } -static int osd_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int osd_print(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned screen; @@ -396,7 +398,7 @@ int osd_probe(unsigned screen) return 0; } -int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int osd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned screen; @@ -449,7 +451,7 @@ int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -int osd_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int osd_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned screen; unsigned x; @@ -500,4 +502,4 @@ U_BOOT_CMD( ") size_y(max. " __stringify(MAX_Y_CHARS) ")\n" ); -#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ \ No newline at end of file +#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ diff --git a/board/gdsys/common/osd_cmd.c b/board/gdsys/common/osd_cmd.c index 53179b9811..fe6249794e 100644 --- a/board/gdsys/common/osd_cmd.c +++ b/board/gdsys/common/osd_cmd.c @@ -10,13 +10,14 @@ */ #include +#include #include #include #include #include -static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; uint x, y; @@ -68,8 +69,8 @@ static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_print(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; uint x, y; @@ -99,8 +100,8 @@ static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_size(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; uint x, y; diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c index 8c9636d292..b64a6d992d 100644 --- a/board/gdsys/mpc8308/gazerbeam.c +++ b/board/gdsys/mpc8308/gazerbeam.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c index b39b0b6002..e960fa71ac 100644 --- a/board/gdsys/p1022/controlcenterd.c +++ b/board/gdsys/p1022/controlcenterd.c @@ -223,7 +223,7 @@ void hw_watchdog_reset(void) } #ifdef CONFIG_TRAILBLAZER -int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { return run_command(env_get("bootcmd"), flag); } -- cgit v1.2.3