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>
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index 4183db2..fa519a4 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <dm.h>
 #include <vsprintf.h>
 #include <dm/lists.h>
@@ -390,7 +391,8 @@
 	.bind = mpc83xx_clk_bind,
 };
 
-static int do_clocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_clocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int i;
 	char buf[32];
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index 8e171e6..8c82d52 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <cli.h>
+#include <command.h>
 #include <env.h>
 #include <linux/ctype.h>
 #include <asm/types.h>
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 394f30f..572abfa 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <irq_func.h>
 #include <dm/lists.h>
@@ -131,7 +132,7 @@
 #endif /* CONFIG_PSCI_RESET */
 
 #ifdef CONFIG_CMD_POWEROFF
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	do_psci_probe();
 
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index fda8054..4ab8cee 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <pca953x.h>
 
@@ -192,7 +193,7 @@
 	return 0;
 }
 
-static cmd_tbl_t cmd_pca953x[] = {
+static struct cmd_tbl cmd_pca953x[] = {
 	U_BOOT_CMD_MKENT(device, 3, 0, (void *)PCA953X_CMD_DEVICE, "", ""),
 	U_BOOT_CMD_MKENT(output, 4, 0, (void *)PCA953X_CMD_OUTPUT, "", ""),
 	U_BOOT_CMD_MKENT(input, 3, 0, (void *)PCA953X_CMD_INPUT, "", ""),
@@ -200,13 +201,14 @@
 	U_BOOT_CMD_MKENT(info, 2, 0, (void *)PCA953X_CMD_INFO, "", ""),
 };
 
-static int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR;
 	int ret = CMD_RET_USAGE, val;
 	ulong ul_arg2 = 0;
 	ulong ul_arg3 = 0;
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	c = find_cmd_tbl(argv[1], cmd_pca953x, ARRAY_SIZE(cmd_pca953x));
 
diff --git a/drivers/gpio/tca642x.c b/drivers/gpio/tca642x.c
index 730460a..463cfe8 100644
--- a/drivers/gpio/tca642x.c
+++ b/drivers/gpio/tca642x.c
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <tca642x.h>
 
@@ -212,7 +213,7 @@
 	return 0;
 }
 
-static cmd_tbl_t cmd_tca642x[] = {
+static struct cmd_tbl cmd_tca642x[] = {
 	U_BOOT_CMD_MKENT(device, 3, 0, (void *)TCA642X_CMD_DEVICE, "", ""),
 	U_BOOT_CMD_MKENT(output, 4, 0, (void *)TCA642X_CMD_OUTPUT, "", ""),
 	U_BOOT_CMD_MKENT(input, 3, 0, (void *)TCA642X_CMD_INPUT, "", ""),
@@ -220,7 +221,8 @@
 	U_BOOT_CMD_MKENT(info, 2, 0, (void *)TCA642X_CMD_INFO, "", ""),
 };
 
-static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_tca642x(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	static uchar chip = CONFIG_SYS_I2C_TCA642X_ADDR;
 	int ret = CMD_RET_USAGE, val;
@@ -228,7 +230,7 @@
 	uint8_t bank_shift;
 	ulong ul_arg2 = 0;
 	ulong ul_arg3 = 0;
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	c = find_cmd_tbl(argv[1], cmd_tca642x, ARRAY_SIZE(cmd_tca642x));
 
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index eff33f7..387c70b 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -44,7 +44,7 @@
 	printf("SYSID: %08x, %s", sysid[0], asc);
 }
 
-int do_sysid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sysid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	display_sysid();
 	return 0;
diff --git a/drivers/misc/ds4510.c b/drivers/misc/ds4510.c
index bf20a83..0b37e8a 100644
--- a/drivers/misc/ds4510.c
+++ b/drivers/misc/ds4510.c
@@ -233,7 +233,7 @@
 	return 0;
 }
 
-cmd_tbl_t cmd_ds4510[] = {
+struct cmd_tbl cmd_ds4510[] = {
 	U_BOOT_CMD_MKENT(device, 3, 0, (void *)DS4510_CMD_DEVICE, "", ""),
 	U_BOOT_CMD_MKENT(nv, 3, 0, (void *)DS4510_CMD_NV, "", ""),
 	U_BOOT_CMD_MKENT(output, 4, 0, (void *)DS4510_CMD_OUTPUT, "", ""),
@@ -246,10 +246,10 @@
 	U_BOOT_CMD_MKENT(sram, 6, 0, (void *)DS4510_CMD_SRAM, "", ""),
 };
 
-int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ds4510(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	static uint8_t chip = 0x51;
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 	ulong ul_arg2 = 0;
 	ulong ul_arg3 = 0;
 	int tmp;
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c
index 2520c6a..46ce630 100644
--- a/drivers/misc/rockchip-efuse.c
+++ b/drivers/misc/rockchip-efuse.c
@@ -43,8 +43,8 @@
 };
 
 #if defined(DEBUG)
-static int dump_efuses(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+static int dump_efuses(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	/*
 	 * N.B.: This function is tailored towards the RK3399 and assumes that
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 7e98449..82b1db3 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -30,6 +30,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
@@ -5761,8 +5762,8 @@
 #endif /* !CONFIG_DM_ETH */
 
 #ifdef CONFIG_CMD_E1000
-static int do_e1000(cmd_tbl_t *cmdtp, int flag,
-		int argc, char * const argv[])
+static int do_e1000(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	unsigned char *mac = NULL;
 #ifdef CONFIG_DM_ETH
diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
index 2ae3085..19ed477 100644
--- a/drivers/net/e1000.h
+++ b/drivers/net/e1000.h
@@ -74,8 +74,8 @@
 #endif
 
 #ifdef CONFIG_E1000_SPI
-int do_e1000_spi(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[]);
+int do_e1000_spi(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+		 int argc, char *const argv[]);
 #endif
 
 /* Enumerated types specific to the e1000 hardware */
diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index 52b3c79..dcb561f 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include "e1000.h"
 #include <malloc.h>
@@ -315,8 +316,8 @@
 	return 0;
 }
 
-static int do_e1000_spi_show(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_show(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+			     int argc, char *const argv[])
 {
 	unsigned int length = 0;
 	u16 i, offset = 0;
@@ -384,8 +385,8 @@
 	return 0;
 }
 
-static int do_e1000_spi_dump(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_dump(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+			     int argc, char *const argv[])
 {
 	unsigned int length;
 	u16 offset;
@@ -429,8 +430,8 @@
 	return 0;
 }
 
-static int do_e1000_spi_program(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_program(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+				int argc, char *const argv[])
 {
 	unsigned int length;
 	const void *source;
@@ -464,8 +465,8 @@
 	return 0;
 }
 
-static int do_e1000_spi_checksum(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_checksum(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+				 int argc, char *const argv[])
 {
 	uint16_t i, length, checksum = 0, checksum_reg;
 	uint16_t *buffer;
@@ -540,8 +541,8 @@
 	return 0;
 }
 
-int do_e1000_spi(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+int do_e1000_spi(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+		 int argc, char *const argv[])
 {
 	if (argc < 1) {
 		cmd_usage(cmdtp);
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index da0815a..3982409 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1745,7 +1745,8 @@
 	return err;
 }
 
-static int do_fsl_mc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fsl_mc(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int err = 0;
 	if (argc < 3)
diff --git a/drivers/net/pfe_eth/pfe_cmd.c b/drivers/net/pfe_eth/pfe_cmd.c
index dd8c68d..bae5f8a 100644
--- a/drivers/net/pfe_eth/pfe_cmd.c
+++ b/drivers/net/pfe_eth/pfe_cmd.c
@@ -9,6 +9,7 @@
  * @brief PFE utility commands
  */
 
+#include <command.h>
 #include <net/pfe_eth/pfe_eth.h>
 
 static inline void pfe_command_help(void)
@@ -16,7 +17,7 @@
 	printf("Usage: pfe [pe | status | expt ] <options>\n");
 }
 
-static void pfe_command_pe(int argc, char * const argv[])
+static void pfe_command_pe(int argc, char *const argv[])
 {
 	if (argc >= 3 && strcmp(argv[2], "pmem") == 0) {
 		if (argc >= 4 && strcmp(argv[3], "read") == 0) {
@@ -271,7 +272,7 @@
 #define PEMBOX_ADDR_TMU		0x290
 #define	PESTATUS_ADDR_UTIL	0x0
 
-static void pfe_pe_status(int argc, char * const argv[])
+static void pfe_pe_status(int argc, char *const argv[])
 {
 	int do_clear = 0;
 	u32 id;
@@ -336,7 +337,7 @@
 	}
 }
 
-static void pfe_command_status(int argc, char * const argv[])
+static void pfe_command_status(int argc, char *const argv[])
 {
 	if (argc >= 3 && strcmp(argv[2], "pe") == 0) {
 		pfe_pe_status(argc, argv);
@@ -370,7 +371,7 @@
 		" r12", " r13", " r14", " r15"
 };
 
-static void pfe_command_expt(int argc, char * const argv[])
+static void pfe_command_expt(int argc, char *const argv[])
 {
 	unsigned int id, i, val, addr;
 
@@ -414,7 +415,7 @@
 	writel(buf, TMU_PHY_INQ_PKTINFO);
 }
 
-static void pfe_command_stop(int argc, char * const argv[])
+static void pfe_command_stop(int argc, char *const argv[])
 {
 	int pfe_pe_id, hif_stop_loop = 10;
 	u32 rx_status;
@@ -462,8 +463,8 @@
 }
 #endif
 
-static int pfe_command(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int pfe_command(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc == 1 || strcmp(argv[1], "help") == 0) {
 		pfe_command_help();
diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index 30c4812..f039f89 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -23,6 +23,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 
 #include <errno.h>
 #include <malloc.h>
@@ -627,7 +628,7 @@
 	return 0;
 }
 
-int do_b53_reg_read(const char *name, int argc, char * const argv[])
+int do_b53_reg_read(const char *name, int argc, char *const argv[])
 {
 	u8 page, offset, width;
 	struct mii_dev *bus;
@@ -681,7 +682,7 @@
 	return ret;
 }
 
-int do_b53_reg_write(const char *name, int argc, char * const argv[])
+int do_b53_reg_write(const char *name, int argc, char *const argv[])
 {
 	u8 page, offset, width;
 	struct mii_dev *bus;
@@ -727,7 +728,7 @@
 	return ret;
 }
 
-int do_b53_reg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_b53_reg(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	const char *cmd, *mdioname;
 	int ret = 0;
diff --git a/drivers/net/phy/mv88e6352.c b/drivers/net/phy/mv88e6352.c
index 6fe08b8..a27a9cc 100644
--- a/drivers/net/phy/mv88e6352.c
+++ b/drivers/net/phy/mv88e6352.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <miiphy.h>
 #include <linux/errno.h>
 #include <mv88e6352.h>
@@ -230,7 +231,7 @@
 	return -ETIMEDOUT;
 }
 
-int do_mvsw_reg_read(const char *name, int argc, char * const argv[])
+int do_mvsw_reg_read(const char *name, int argc, char *const argv[])
 {
 	u16 value = 0, phyaddr, reg, port;
 	int ret;
@@ -245,7 +246,7 @@
 	return ret;
 }
 
-int do_mvsw_reg_write(const char *name, int argc, char * const argv[])
+int do_mvsw_reg_write(const char *name, int argc, char *const argv[])
 {
 	u16 value = 0, phyaddr, reg, port;
 	int ret;
@@ -261,7 +262,7 @@
 }
 
 
-int do_mvsw_reg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mvsw_reg(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 	const char *cmd, *ethname;
diff --git a/drivers/net/vsc9953.c b/drivers/net/vsc9953.c
index f17839c..93eb2b1 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -5,6 +5,7 @@
  *  Driver for the Vitesse VSC9953 L2 Switch
  */
 
+#include <command.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c
index 361be6c..d6e3612 100644
--- a/drivers/power/axp152.c
+++ b/drivers/power/axp152.c
@@ -79,7 +79,7 @@
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP152_SHUTDOWN, AXP152_POWEROFF);
 
diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 67b4209..60f69ec 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -229,7 +229,7 @@
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP209_SHUTDOWN, AXP209_POWEROFF);
 
diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index c440047..3446fe7 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -264,7 +264,7 @@
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP221_SHUTDOWN, AXP221_SHUTDOWN_POWEROFF);
 
diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c
index 7de92f4..6323492 100644
--- a/drivers/power/axp809.c
+++ b/drivers/power/axp809.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pmic_bus.h>
@@ -219,7 +220,7 @@
 	return pmic_bus_init();
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP809_SHUTDOWN, AXP809_SHUTDOWN_POWEROFF);
 
diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index 834919d..0531707 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pmic_bus.h>
@@ -255,7 +256,7 @@
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP818_SHUTDOWN, AXP818_SHUTDOWN_POWEROFF);
 
diff --git a/drivers/power/mt6323.c b/drivers/power/mt6323.c
index 566be5f..f5b2754 100644
--- a/drivers/power/mt6323.c
+++ b/drivers/power/mt6323.c
@@ -17,7 +17,7 @@
 #define RTC_BBPU_KEY		(0x43 << 8)
 #define RTC_WRTGR		0x003c
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	u32 addr, val;
 
diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c
index 095d8a5..5a18ded 100644
--- a/drivers/power/power_core.c
+++ b/drivers/power/power_core.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <malloc.h>
 #include <linux/types.h>
 #include <linux/list.h>
@@ -120,7 +121,8 @@
 	}
 }
 
-static int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pmic(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	u32 ret, reg, val;
 	char *cmd, *name;
diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
index 42c9001..4cc261a 100644
--- a/drivers/power/twl4030.c
+++ b/drivers/power/twl4030.c
@@ -22,6 +22,7 @@
  *	Syed Mohammed Khasim <khasim at ti.com>
  */
 
+#include <command.h>
 #include <twl4030.h>
 
 /*
@@ -172,7 +173,7 @@
 }
 
 #ifdef CONFIG_CMD_POWEROFF
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	twl4030_power_off();
 
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index fbad124..61ca476 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -781,7 +781,7 @@
 	return qe_firmware_uploaded ? &qe_firmware_info : NULL;
 }
 
-static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int qe_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr;
 
diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index 805c9dd..47e176b 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <cli.h>
 #include <clk.h>
@@ -150,7 +151,7 @@
 static void stm32mp1_do_info(struct ddr_info *priv,
 			     struct stm32mp1_ddr_config *config,
 			     enum stm32mp1_ddr_interact_step step,
-			     int argc, char * const argv[])
+			     int argc, char *const argv[])
 {
 	unsigned long value;
 	static char *ddr_name;
@@ -223,7 +224,7 @@
 }
 
 static bool stm32mp1_do_freq(struct ddr_info *priv,
-			     int argc, char * const argv[])
+			     int argc, char *const argv[])
 {
 	unsigned long ddrphy_clk;
 
@@ -246,7 +247,7 @@
 
 static void stm32mp1_do_param(enum stm32mp1_ddr_interact_step step,
 			      const struct stm32mp1_ddr_config *config,
-			      int argc, char * const argv[])
+			      int argc, char *const argv[])
 {
 	switch (argc) {
 	case 1:
@@ -266,7 +267,7 @@
 }
 
 static void stm32mp1_do_print(struct ddr_info *priv,
-			      int argc, char * const argv[])
+			      int argc, char *const argv[])
 {
 	switch (argc) {
 	case 1:
@@ -281,7 +282,7 @@
 }
 
 static int stm32mp1_do_step(enum stm32mp1_ddr_interact_step step,
-			    int argc, char * const argv[])
+			    int argc, char *const argv[])
 {
 	int i;
 	unsigned long value;
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 51fdb10..9e99033 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -7,6 +7,7 @@
 #define LOG_CATEGORY UCLASS_SYSRESET
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <sysreset.h>
@@ -111,7 +112,7 @@
 }
 
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	printf("resetting ...\n");
 
@@ -121,7 +122,7 @@
 }
 
 #if IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF)
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index 9092764..39f4671 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <sysreset.h>
 #include <wait_bit.h>
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index fc27dbe..d1be3f5 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -9,6 +9,7 @@
  * Copyright 2014 Linaro, Ltd.
  * Rob Herring <robh@kernel.org>
  */
+#include <command.h>
 #include <config.h>
 #include <common.h>
 #include <env.h>
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index da3d63c..0c4c83f 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -4,6 +4,7 @@
  *
  * Eddie Cai <eddie.cai.linux@gmail.com>
  */
+#include <command.h>
 #include <config.h>
 #include <common.h>
 #include <env.h>
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 5442bac..8918d83 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -65,6 +65,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <fdtdec.h>
@@ -1710,7 +1711,8 @@
 			1);
 }
 
-static int do_clrlogo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_clrlogo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	if (argc != 1)
 		return cmd_usage(cmdtp);
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index 997e854..74a2388 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <backlight.h>
+#include <command.h>
 #include <display.h>
 #include <dm.h>
 #include <dm/read.h>
@@ -208,8 +209,8 @@
 	return 0;
 }
 
-static int do_lgset(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_lgset(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	struct spi_slave *slave;
 	struct udevice *dev;
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 8e0fc7f..dd6786f 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <linux/ctype.h>
 #include <dm.h>
 #include <video.h>
@@ -623,7 +624,7 @@
 	priv->ycur = min_t(short, row, vid_priv->ysize - 1);
 }
 
-static int do_video_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_video_setcursor(struct cmd_tbl *cmdtp, int flag, int argc,
 			      char *const argv[])
 {
 	unsigned int col, row;
@@ -641,7 +642,7 @@
 	return 0;
 }
 
-static int do_video_puts(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_video_puts(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	struct udevice *dev;