Skip to contentSkip to conversation

common: Further reduce the size of common.h

PATCH Superseded Simon Glass 3 participants 53 messages May 10, 2020 – May 19, 2020 Page 3 of 5

Subsystems (129)
lore
Share & tools
lore
#26 lore raw

PATCH v3 12/22 command: Remove the cmd_tbl_t typedef

In reply to Simon Glass

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.

---

Changes in v3:
- Update imxrt1020-evk, etc.

Changes in v2: None

 arch/arc/lib/bootm.c                          |   1 +
 arch/arc/lib/reset.c                          |   2 +-
 arch/arm/cpu/arm1136/mx35/generic.c           |   5 +-
 arch/arm/cpu/arm926ejs/mxs/mxs.c              |   4 +-
 arch/arm/cpu/arm926ejs/spear/cpu.c            |   3 +-
 arch/arm/cpu/arm926ejs/spear/spr_misc.c       |   3 +-
 arch/arm/cpu/armv7/vf610/generic.c            |   5 +-
 .../armv8/fsl-layerscape/fsl_lsch3_serdes.c   |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c        |   2 +-
 arch/arm/include/asm/arch-mx6/clock.h         |   4 +-
 arch/arm/lib/bootm.c                          |   2 +-
 arch/arm/lib/cmd_boot.c                       |   2 +-
 arch/arm/lib/reset.c                          |   5 +-
 arch/arm/lib/semihosting.c                    |   4 +-
 arch/arm/mach-imx/cmd_bmode.c                 |   6 +-
 arch/arm/mach-imx/cmd_dek.c                   |   3 +-
 arch/arm/mach-imx/cmd_hdmidet.c               |   4 +-
 arch/arm/mach-imx/cmd_nandbcb.c               |   9 +-
 arch/arm/mach-imx/hab.c                       |  21 ++--
 arch/arm/mach-imx/imx8/ahab.c                 |  13 +-
 arch/arm/mach-imx/imx8/snvs_security_sc.c     |  13 +-
 arch/arm/mach-imx/imx8m/clock_imx8mq.c        |   5 +-
 arch/arm/mach-imx/imx_bootaux.c               |   3 +-
 arch/arm/mach-imx/mx5/clock.c                 |   4 +-
 arch/arm/mach-imx/mx6/clock.c                 |   4 +-
 arch/arm/mach-imx/mx7/clock.c                 |   4 +-
 arch/arm/mach-imx/mx7ulp/clock.c              |   4 +-
 arch/arm/mach-keystone/cmd_clock.c            |   7 +-
 arch/arm/mach-keystone/cmd_mon.c              |   8 +-
 arch/arm/mach-keystone/cmd_poweroff.c         |   2 +-
 arch/arm/mach-keystone/ddr3.c                 |   1 +
 arch/arm/mach-keystone/keystone.c             |   1 +
 arch/arm/mach-meson/sm.c                      |  14 ++-
 arch/arm/mach-omap2/omap3/board.c             |   4 +-
 arch/arm/mach-omap2/sec-common.c              |   1 +
 arch/arm/mach-rockchip/boot_mode.c            |   2 +
 arch/arm/mach-rockchip/cpu-info.c             |   1 +
 arch/arm/mach-rockchip/rk3288/rk3288.c        |   5 +-
 arch/arm/mach-socfpga/clock_manager.c         |   4 +-
 arch/arm/mach-socfpga/misc.c                  |   4 +-
 arch/arm/mach-stm32mp/cmd_stm32key.c          |   4 +-
 arch/arm/mach-tegra/cmd_enterrcm.c            |   5 +-
 .../mach-uniphier/boot-device/boot-device.c   |   4 +-
 arch/arm/mach-uniphier/dram/cmd_ddrmphy.c     |   4 +-
 arch/arm/mach-uniphier/dram/cmd_ddrphy.c      |   4 +-
 arch/arm/mach-uniphier/mmc-first-dev.c        |   7 +-
 arch/arm/mach-zynqmp/mp.c                     |   2 +-
 arch/m68k/cpu/mcf5227x/cpu.c                  |   2 +-
 arch/m68k/cpu/mcf523x/cpu.c                   |   2 +-
 arch/m68k/cpu/mcf52x2/cpu.c                   |  14 +--
 arch/m68k/cpu/mcf530x/cpu.c                   |   3 +-
 arch/m68k/cpu/mcf532x/cpu.c                   |   2 +-
 arch/m68k/cpu/mcf5445x/cpu.c                  |   2 +-
 arch/m68k/cpu/mcf547x_8x/cpu.c                |   2 +-
 arch/m68k/lib/bootm.c                         |   3 +-
 arch/microblaze/cpu/interrupts.c              |   2 +-
 arch/microblaze/cpu/spl.c                     |   3 +-
 arch/microblaze/lib/bootm.c                   |   2 +-
 arch/mips/cpu/cpu.c                           |   2 +-
 arch/mips/lib/bootm.c                         |   4 +-
 arch/mips/mach-ath79/ar934x/clk.c             |   4 +-
 arch/nds32/cpu/n1213/ae3xx/cpu.c              |   2 +-
 arch/nds32/cpu/n1213/ag101/cpu.c              |   2 +-
 arch/nds32/lib/boot.c                         |   2 +-
 arch/nios2/cpu/cpu.c                          |   3 +-
 arch/nios2/cpu/interrupts.c                   |   2 +-
 arch/nios2/lib/bootm.c                        |   4 +-
 arch/powerpc/cpu/mpc83xx/cpu.c                |   3 +-
 arch/powerpc/cpu/mpc83xx/ecc.c                |   2 +-
 arch/powerpc/cpu/mpc83xx/interrupts.c         |   4 +-
 arch/powerpc/cpu/mpc83xx/speed.c              |   3 +-
 arch/powerpc/cpu/mpc85xx/cmd_errata.c         |   3 +-
 arch/powerpc/cpu/mpc85xx/cpu.c                |   2 +-
 arch/powerpc/cpu/mpc85xx/interrupts.c         |   2 +-
 arch/powerpc/cpu/mpc85xx/mp.c                 |   2 +-
 arch/powerpc/cpu/mpc86xx/cpu.c                |   2 +-
 arch/powerpc/cpu/mpc86xx/interrupts.c         |   2 +-
 arch/powerpc/cpu/mpc86xx/mp.c                 |   2 +-
 arch/powerpc/cpu/mpc8xx/cpu.c                 |   2 +-
 arch/powerpc/cpu/mpc8xx/immap.c               |  19 +--
 arch/powerpc/lib/bootm.c                      |   4 +-
 arch/powerpc/lib/kgdb.c                       |   2 +-
 arch/riscv/lib/boot.c                         |   2 +-
 arch/riscv/lib/bootm.c                        |   4 +-
 arch/riscv/lib/reset.c                        |   2 +-
 arch/sh/cpu/sh4/cpu.c                         |   2 +-
 arch/sh/lib/bootm.c                           |   4 +-
 arch/sh/lib/zimageboot.c                      |   5 +-
 .../include/asm/arch-braswell/fsp/fsp_vpd.h   |   2 +
 arch/x86/lib/bootm.c                          |   4 +-
 arch/x86/lib/cmd_boot.c                       |   2 +-
 arch/x86/lib/interrupts.c                     |   2 +-
 arch/x86/lib/zimage.c                         |   3 +-
 board/Arcturus/ucp1020/cmd_arc.c              |   4 +-
 board/BuS/eb_cpu5282/eb_cpu5282.c             |   2 +-
 board/LaCie/net2big_v2/net2big_v2.c           |   3 +-
 board/LaCie/netspace_v2/netspace_v2.c         |   2 +-
 board/Synology/ds414/cmd_syno.c               |   9 +-
 .../imx8qm_rom7720_a1/imx8qm_rom7720_a1.c     |   1 +
 board/amlogic/sei510/sei510.c                 |   1 +
 board/amlogic/sei610/sei610.c                 |   1 +
 board/aristainetos/aristainetos.c             |   1 +
 board/bosch/guardian/board.c                  |   1 +
 board/boundary/nitrogen6x/nitrogen6x.c        |   3 +-
 board/buffalo/lsxl/lsxl.c                     |   1 +
 board/cavium/thunderx/atf.c                   |   3 +-
 board/corscience/tricorder/tricorder-eeprom.c |   3 +-
 board/egnite/ethernut5/ethernut5_pwrman.c     |   3 +-
 board/esd/vme8349/caddy.c                     |   3 +-
 board/freescale/c29xpcie/cpld.c               |   2 +-
 board/freescale/common/cmd_esbc_validate.c    |   8 +-
 board/freescale/common/ngpixis.c              |   3 +-
 board/freescale/common/pixis.c                |  10 +-
 board/freescale/common/qixis.c                |   3 +-
 board/freescale/common/sys_eeprom.c           |   2 +-
 board/freescale/common/vid.c                  |   9 +-
 board/freescale/imx8mm_evk/imx8mm_evk.c       |   1 +
 board/freescale/imx8mm_evk/spl.c              |   1 +
 board/freescale/imx8mn_evk/imx8mn_evk.c       |   1 +
 board/freescale/imx8mn_evk/spl.c              |   1 +
 board/freescale/imx8mp_evk/imx8mp_evk.c       |   1 +
 board/freescale/imx8mp_evk/spl.c              |   1 +
 board/freescale/imxrt1020-evk/imxrt1020-evk.c |   1 +
 board/freescale/ls1012ardb/ls1012ardb.c       |   5 +-
 board/freescale/ls1021atwr/ls1021atwr.c       |  13 +-
 board/freescale/ls1043ardb/cpld.c             |   2 +-
 board/freescale/ls1046ardb/cpld.c             |   2 +-
 board/freescale/p1010rdb/p1010rdb.c           |   5 +-
 board/freescale/p2041rdb/cpld.c               |   2 +-
 board/freescale/t102xrdb/cpld.c               |   2 +-
 board/freescale/t102xrdb/t102xrdb.c           |   4 +-
 board/freescale/t104xrdb/cpld.c               |   2 +-
 board/freescale/t208xrdb/cpld.c               |   2 +-
 board/freescale/t4qds/t4240qds.c              |   4 +-
 board/freescale/t4rdb/cpld.c                  |   2 +-
 board/gardena/smart-gateway-mt7688/board.c    |   3 +-
 board/gateworks/gw_ventana/eeprom.c           |   4 +-
 board/gateworks/gw_ventana/gsc.c              |  10 +-
 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 +-
 board/google/chromebook_coral/coral.c         |   1 +
 board/keymile/common/common.c                 |  12 +-
 board/mediatek/mt7622/mt7622_rfb.c            |   1 +
 board/phytium/durian/durian.c                 |   1 +
 board/renesas/sh7752evb/sh7752evb.c           |   3 +-
 board/renesas/sh7753evb/sh7753evb.c           |   3 +-
 board/renesas/sh7757lcr/sh7757lcr.c           |   5 +-
 board/renesas/stout/cpld.c                    |   4 +-
 board/renesas/ulcb/cpld.c                     |   4 +-
 board/rockchip/kylin_rk3036/kylin_rk3036.c    |   1 +
 board/samsung/common/board.c                  |   1 +
 board/samsung/common/misc.c                   |   2 +-
 board/siemens/capricorn/board.c               |   6 +-
 board/siemens/common/board.c                  |   9 +-
 board/siemens/draco/board.c                   |   5 +-
 board/siemens/taurus/taurus.c                 |   4 +-
 board/sifive/fu540/fu540.c                    |   1 +
 board/sks-kinkel/sksimx6/sksimx6.c            |   1 +
 board/solidrun/clearfog/clearfog.c            |   1 +
 board/st/common/cmd_stboard.c                 |   5 +-
 .../stm32f429-discovery/stm32f429-discovery.c |   1 +
 .../stm32f429-evaluation.c                    |   1 +
 .../stm32f469-discovery/stm32f469-discovery.c |   1 +
 board/synopsys/emsdp/emsdp.c                  |  11 +-
 board/synopsys/hsdk/hsdk.c                    |  22 ++--
 board/syteco/zmx25/zmx25.c                    |   1 +
 board/technexion/pico-imx6/pico-imx6.c        |   1 +
 board/theadorable/theadorable.c               |   3 +-
 board/ti/j721e/evm.c                          |   1 +
 board/ti/sdp4430/cmd_bat.c                    |   2 +-
 board/toradex/apalis-tk1/apalis-tk1.c         |   1 +
 board/toradex/apalis_imx6/do_fuse.c           |   9 +-
 board/toradex/apalis_imx6/pf0100.c            |   5 +-
 board/toradex/colibri_imx6/do_fuse.c          |   9 +-
 board/toradex/colibri_imx6/pf0100.c           |   5 +-
 board/toradex/common/tdx-cfg-block.c          |   9 +-
 board/toradex/verdin-imx8mm/spl.c             |   1 +
 board/varisys/common/sys_eeprom.c             |   2 +-
 .../work_92105/work_92105_display.c           |   6 +-
 board/xilinx/common/board.c                   |   1 +
 .../microblaze-generic/microblaze-generic.c   |   1 +
 board/xilinx/versal/board.c                   |   1 +
 board/xilinx/zynq/cmds.c                      |  16 +--
 board/xilinx/zynqmp/cmds.c                    |  23 ++--
 board/xilinx/zynqmp/zynqmp.c                  |   3 +-
 cmd/ab_select.c                               |   5 +-
 cmd/abootimg.c                                |  31 ++---
 cmd/acpi.c                                    |   4 +-
 cmd/adc.c                                     |   8 +-
 cmd/adtimg.c                                  |  26 ++--
 cmd/aes.c                                     |   2 +-
 cmd/arm/exception.c                           |  14 +--
 cmd/arm/exception64.c                         |   6 +-
 cmd/armflash.c                                |   2 +-
 cmd/avb.c                                     |  40 +++---
 cmd/axi.c                                     |  22 ++--
 cmd/bcb.c                                     |  30 ++---
 cmd/bdinfo.c                                  |  28 ++---
 cmd/bedbug.c                                  |  24 ++--
 cmd/bind.c                                    |   5 +-
 cmd/binop.c                                   |   3 +-
 cmd/blk_common.c                              |   3 +-
 cmd/blkcache.c                                |  17 +--
 cmd/blob.c                                    |   3 +-
 cmd/bmp.c                                     |  12 +-
 cmd/boot.c                                    |   4 +-
 cmd/bootcount.c                               |  16 +--
 cmd/bootefi.c                                 |   3 +-
 cmd/booti.c                                   |   6 +-
 cmd/bootm.c                                   |  23 ++--
 cmd/bootmenu.c                                |   2 +-
 cmd/bootstage.c                               |  19 +--
 cmd/bootz.c                                   |   6 +-
 cmd/btrfs.c                                   |   2 +-
 cmd/cache.c                                   |   6 +-
 cmd/cbfs.c                                    |   8 +-
 cmd/clk.c                                     |   8 +-
 cmd/cls.c                                     |   2 +-
 cmd/config.c                                  |   3 +-
 cmd/conitrace.c                               |   4 +-
 cmd/console.c                                 |   3 +-
 cmd/cpu.c                                     |  12 +-
 cmd/cramfs.c                                  |   5 +-
 cmd/cros_ec.c                                 |   7 +-
 cmd/dataflash_mmc_mux.c                       |   3 +-
 cmd/date.c                                    |   3 +-
 cmd/demo.c                                    |  22 ++--
 cmd/dfu.c                                     |   3 +-
 cmd/diag.c                                    |   2 +-
 cmd/disk.c                                    |   2 +-
 cmd/dm.c                                      |  22 ++--
 cmd/echo.c                                    |   3 +-
 cmd/eeprom.c                                  |   4 +-
 cmd/efi.c                                     |   9 +-
 cmd/efidebug.c                                |  68 +++++-----
 cmd/elf.c                                     |   6 +-
 cmd/ethsw.c                                   |   5 +-
 cmd/exit.c                                    |   3 +-
 cmd/ext2.c                                    |   7 +-
 cmd/ext4.c                                    |  10 +-
 cmd/fastboot.c                                |   3 +-
 cmd/fat.c                                     |  23 ++--
 cmd/fdt.c                                     |   4 +-
 cmd/fitupd.c                                  |   3 +-
 cmd/flash.c                                   |   9 +-
 cmd/fpga.c                                    |  41 +++---
 cmd/fpgad.c                                   |   2 +-
 cmd/fs.c                                      |  23 ++--
 cmd/fs_uuid.c                                 |   4 +-
 cmd/fuse.c                                    |   3 +-
 cmd/gettime.c                                 |   4 +-
 cmd/gpio.c                                    |   3 +-
 cmd/gpt.c                                     |   2 +-
 cmd/hash.c                                    |   3 +-
 cmd/help.c                                    |   9 +-
 cmd/host.c                                    |  37 +++---
 cmd/i2c.c                                     |  61 +++++----
 cmd/ide.c                                     |   4 +-
 cmd/ini.c                                     |   2 +-
 cmd/io.c                                      |   4 +-
 cmd/iotrace.c                                 |   6 +-
 cmd/irq.c                                     |   6 +-
 cmd/itest.c                                   |   3 +-
 cmd/jffs2.c                                   |   8 +-
 cmd/led.c                                     |   2 +-
 cmd/legacy_led.c                              |   2 +-
 cmd/license.c                                 |   3 +-
 cmd/load.c                                    |  11 +-
 cmd/log.c                                     |  17 +--
 cmd/lzmadec.c                                 |   3 +-
 cmd/mac.c                                     |   3 +-
 cmd/md5sum.c                                  |   5 +-
 cmd/mdio.c                                    |   3 +-
 cmd/mem.c                                     |  60 +++++----
 cmd/mfsl.c                                    |   6 +-
 cmd/mii.c                                     |   2 +-
 cmd/misc.c                                    |   6 +-
 cmd/mmc.c                                     | 111 +++++++++--------
 cmd/mp.c                                      |   2 +-
 cmd/mtd.c                                     |  17 +--
 cmd/mtdparts.c                                |   7 +-
 cmd/mvebu/bubt.c                              |   2 +-
 cmd/nand.c                                    |  11 +-
 cmd/net.c                                     |  38 +++---
 cmd/nvedit.c                                  |  62 +++++-----
 cmd/nvedit_efi.c                              |  12 +-
 cmd/nvme.c                                    |   3 +-
 cmd/onenand.c                                 |  33 +++--
 cmd/osd.c                                     |  27 ++--
 cmd/part.c                                    |  15 +--
 cmd/pcap.c                                    |  20 +--
 cmd/pci.c                                     |   2 +-
 cmd/pinmux.c                                  |  17 +--
 cmd/pmc.c                                     |  12 +-
 cmd/pmic.c                                    |  23 ++--
 cmd/pxe.c                                     |  19 +--
 cmd/pxe_utils.c                               |  28 +++--
 cmd/pxe_utils.h                               |  10 +-
 cmd/qfw.c                                     |  19 +--
 cmd/read.c                                    |   2 +-
 cmd/reginfo.c                                 |   4 +-
 cmd/regulator.c                               |  35 ++++--
 cmd/reiser.c                                  |   4 +-
 cmd/remoteproc.c                              |  14 +--
 cmd/riscv/exception.c                         |   6 +-
 cmd/rng.c                                     |   2 +-
 cmd/rockusb.c                                 |   3 +-
 cmd/sata.c                                    |   3 +-
 cmd/sb.c                                      |  13 +-
 cmd/scsi.c                                    |   6 +-
 cmd/setexpr.c                                 |   3 +-
 cmd/sf.c                                      |  15 +--
 cmd/sha1sum.c                                 |   2 +-
 cmd/smccc.c                                   |   3 +-
 cmd/sound.c                                   |  13 +-
 cmd/source.c                                  |   3 +-
 cmd/spi.c                                     |   2 +-
 cmd/spl.c                                     |  15 +--
 cmd/strings.c                                 |   2 +-
 cmd/sysboot.c                                 |  12 +-
 cmd/terminal.c                                |   2 +-
 cmd/test.c                                    |   9 +-
 cmd/thordown.c                                |   3 +-
 cmd/ti/ddr3.c                                 |   5 +-
 cmd/time.c                                    |   3 +-
 cmd/tlv_eeprom.c                              |   2 +-
 cmd/tpm-common.c                              |  10 +-
 cmd/tpm-user-utils.h                          |   9 +-
 cmd/tpm-v1.c                                  |  85 ++++++-------
 cmd/tpm-v2.c                                  |  43 +++----
 cmd/tpm_test.c                                |  11 +-
 cmd/trace.c                                   |   8 +-
 cmd/tsi148.c                                  |   2 +-
 cmd/ubi.c                                     |   2 +-
 cmd/ubifs.c                                   |  17 +--
 cmd/ufs.c                                     |   2 +-
 cmd/universe.c                                |   2 +-
 cmd/unlz4.c                                   |   3 +-
 cmd/unzip.c                                   |   7 +-
 cmd/usb.c                                     |   5 +-
 cmd/usb_gadget_sdp.c                          |   3 +-
 cmd/usb_mass_storage.c                        |   4 +-
 cmd/version.c                                 |   3 +-
 cmd/virtio.c                                  |   3 +-
 cmd/w1.c                                      |   2 +-
 cmd/wdt.c                                     |  12 +-
 cmd/wol.c                                     |   2 +-
 cmd/x86/exception.c                           |   6 +-
 cmd/x86/fsp.c                                 |   8 +-
 cmd/x86/hob.c                                 |   2 +-
 cmd/x86/mtrr.c                                |   6 +-
 cmd/ximg.c                                    |   2 +-
 cmd/yaffs2.c                                  |  28 ++---
 cmd/zfs.c                                     |   7 +-
 cmd/zip.c                                     |   2 +-
 common/board_r.c                              |   4 +-
 common/bootm.c                                |  27 ++--
 common/bootm_os.c                             |  46 +++----
 common/cli.c                                  |   4 +-
 common/cli_hush.c                             |   4 +-
 common/cli_readline.c                         |   1 +
 common/command.c                              |  75 +++++------
 common/dfu.c                                  |   1 +
 common/exports.c                              |   1 +
 common/flash.c                                |   8 +-
 common/hash.c                                 |   4 +-
 common/image-fdt.c                            |   4 +-
 common/image.c                                |  13 +-
 common/kgdb.c                                 |   2 +-
 common/lcd_console.c                          |   5 +-
 doc/README.commands                           |  12 +-
 doc/README.standalone                         |   2 +-
 drivers/clk/mpc83xx_clk.c                     |   4 +-
 drivers/ddr/fsl/interactive.c                 |   1 +
 drivers/firmware/psci.c                       |   3 +-
 drivers/gpio/pca953x.c                        |   8 +-
 drivers/gpio/tca642x.c                        |   8 +-
 drivers/misc/altera_sysid.c                   |   2 +-
 drivers/misc/ds4510.c                         |   6 +-
 drivers/misc/rockchip-efuse.c                 |   4 +-
 drivers/net/e1000.c                           |   5 +-
 drivers/net/e1000.h                           |   4 +-
 drivers/net/e1000_spi.c                       |  21 ++--
 drivers/net/fsl-mc/mc.c                       |   3 +-
 drivers/net/pfe_eth/pfe_cmd.c                 |  15 +--
 drivers/net/phy/b53.c                         |   7 +-
 drivers/net/phy/mv88e6352.c                   |   7 +-
 drivers/net/vsc9953.c                         |   1 +
 drivers/power/axp152.c                        |   2 +-
 drivers/power/axp209.c                        |   2 +-
 drivers/power/axp221.c                        |   2 +-
 drivers/power/axp809.c                        |   3 +-
 drivers/power/axp818.c                        |   3 +-
 drivers/power/mt6323.c                        |   2 +-
 drivers/power/power_core.c                    |   4 +-
 drivers/power/twl4030.c                       |   3 +-
 drivers/qe/qe.c                               |   2 +-
 drivers/ram/stm32mp1/stm32mp1_interactive.c   |  11 +-
 drivers/sysreset/sysreset-uclass.c            |   5 +-
 drivers/sysreset/sysreset_mpc83xx.c           |   1 +
 drivers/usb/gadget/f_fastboot.c               |   1 +
 drivers/usb/gadget/f_rockusb.c                |   1 +
 drivers/video/cfb_console.c                   |   4 +-
 drivers/video/lg4573.c                        |   5 +-
 drivers/video/vidconsole-uclass.c             |   5 +-
 examples/api/demo.c                           |   2 +-
 examples/api/libgenwrap.c                     |   3 +-
 examples/standalone/atmel_df_pow2.c           |   2 +-
 examples/standalone/hello_world.c             |   2 +-
 examples/standalone/smc91111_eeprom.c         |   2 +-
 examples/standalone/smc911x_eeprom.c          |   2 +-
 examples/standalone/stubs.c                   |   2 +
 fs/fs.c                                       |  29 ++---
 include/_exports.h                            |   2 +-
 include/bedbug/type.h                         |   5 +-
 include/blk.h                                 |   2 +-
 include/bootm.h                               |  16 +--
 include/command.h                             | 117 ++++++++++--------
 include/cpu_func.h                            |   2 +-
 include/exception.h                           |  12 +-
 include/exports.h                             |   1 +
 include/ext_common.h                          |  18 +--
 include/fs.h                                  |  39 +++---
 include/fsl_ddr.h                             |   4 +-
 include/fsl_validate.h                        |  14 +--
 include/hash.h                                |   6 +-
 include/image.h                               |  14 +--
 include/kgdb.h                                |   2 +-
 include/log.h                                 |   6 +-
 include/net.h                                 |   4 +-
 include/search.h                              |   2 +-
 include/test/suites.h                         |  29 +++--
 include/test/ut.h                             |   1 +
 include/tpm-common.h                          |  16 +--
 include/vxworks.h                             |   3 +-
 lib/dhry/cmd_dhry.c                           |   3 +-
 lib/efi_loader/efi_variable.c                 |   1 +
 lib/fdtdec_test.c                             |   5 +-
 lib/hashtable.c                               |   2 +-
 lib/uuid.c                                    |   3 +-
 net/arp.c                                     |   1 +
 net/fastboot.c                                |   1 +
 test/bloblist.c                               |   3 +-
 test/cmd_ut.c                                 |  14 ++-
 test/command_ut.c                             |   4 +-
 test/compression.c                            |   3 +-
 test/dm/test-main.c                           |   2 +-
 test/env/cmd_ut_env.c                         |   2 +-
 test/lib/cmd_ut_lib.c                         |   2 +-
 test/log/log_test.c                           |   3 +-
 test/log/test-main.c                          |   2 +-
 test/optee/cmd_ut_optee.c                     |   2 +-
 test/overlay/cmd_ut_overlay.c                 |   2 +-
 test/print_ut.c                               |   3 +-
 test/str_ut.c                                 |   2 +-
 test/time_ut.c                                |   2 +-
 test/unicode_ut.c                             |   2 +-
 tools/proftool.c                              |   2 +-
 463 files changed, 1986 insertions(+), 1526 deletions(-)
arch/arc/lib/bootm.c +1 -0
index 9fa6aaf3b2..8f611efb56 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <env.h>
 #include <image.h>
 #include <irq_func.h>
 #include <lmb.h>
arch/arc/lib/reset.c +1 -1
index 30dd4b5238..fbb56ec83a 100644
@@ -13,7 +13,7 @@ __weak void reset_cpu(ulong addr)
 	__builtin_arc_brk();
 }
 
-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 the board...\n");
 
arch/arm/cpu/arm1136/mx35/generic.c +3 -2
index 4c45810fbe..e6fff5b220 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <div64.h>
 #include <init.h>
 #include <net.h>
@@ -379,8 +380,8 @@ u32 imx_get_fecclk(void)
 }
 #endif
 
-int do_mx35_showclocks(cmd_tbl_t *cmdtp,
-	int flag, int argc, char * const argv[])
+int do_mx35_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	u32 cpufreq = get_mcu_main_clk();
 	printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000);
arch/arm/cpu/arm926ejs/mxs/mxs.c +3 -1
index 72988417ac..d742c0f151 100644
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
@@ -187,7 +188,8 @@ int print_cpuinfo(void)
 }
 #endif
 
-int do_mx28_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_mx28_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	printf("CPU:   %3d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
 	printf("BUS:   %3d MHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000000);
arch/arm/cpu/arm926ejs/spear/cpu.c +2 -1
index f5192240e4..2106541074 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
@@ -81,7 +82,7 @@ int print_cpuinfo(void)
 #endif
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC)
-static int do_switch_ecc(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	if (argc != 2)
arch/arm/cpu/arm926ejs/spear/spr_misc.c +2 -1
index d5be646555..998423b652 100644
@@ -182,7 +182,8 @@ static int write_mac(uchar *mac)
 }
 #endif
 
-int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_chip_config(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	void (*sram_setfreq) (unsigned int, unsigned int);
 	unsigned int frequency;
arch/arm/cpu/armv7/vf610/generic.c +3 -2
index da43e34394..fd2ab37a8f 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <net.h>
@@ -240,8 +241,8 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 }
 
 /* Dump some core clocks */
-int do_vf610_showclocks(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+int do_vf610_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	printf("\n");
 	printf("cpu clock : %8d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c +1 -0
index d143864af1..07a47d51e4 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
arch/arm/cpu/armv8/fsl-layerscape/mp.c +1 -1
index 4ef2a30278..31536b8181 100644
@@ -260,7 +260,7 @@ int cpu_status(u32 nr)
 	return 0;
 }
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	u64 boot_addr;
 	u64 *table = (u64 *)get_spin_tbl_addr();
arch/arm/include/asm/arch-mx6/clock.h +2 -2
index 769917679e..8ae4971578 100644
@@ -21,7 +21,7 @@
 #define MXC_CLK32	32768
 #endif
 
-struct cmd_tbl_s;
+struct cmd_tbl;
 
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
@@ -82,6 +82,6 @@ void enable_thermal_clk(void);
 void mxs_set_lcdclk(u32 base_addr, u32 freq);
 void select_ldb_di_clock_source(enum ldb_di_clock clk);
 void enable_eim_clk(unsigned char enable);
-int do_mx6_showclocks(struct cmd_tbl_s *cmdtp, int flag, int argc,
+int do_mx6_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
 		      char *const argv[]);
 #endif /* __ASM_ARCH_CLOCK_H */
arch/arm/lib/bootm.c +1 -1
index 68beea2c9d..0facd0c989 100644
@@ -422,7 +422,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
  * DIFFERENCE: Instead of calling prep and go at the end
  * they are called if subcommand is equal 0.
  */
-int do_bootm_linux(int flag, int argc, char * const argv[],
+int do_bootm_linux(int flag, int argc, char *const argv[],
 		   bootm_headers_t *images)
 {
 	/* No need for those on ARM */
arch/arm/lib/cmd_boot.c +1 -1
index 03dde84252..c905ecc4bd 100644
@@ -32,7 +32,7 @@
  *    instructions, otherwise a fault occurs."
  */
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	ulong addr = (ulong)entry | 1;
 	entry = (void *)addr;
arch/arm/lib/reset.c +3 -2
index 835a40e59d..65b4be20b8 100644
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
 
@@ -28,11 +29,11 @@ __weak void reset_misc(void)
 {
 }
 
-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[])
 {
 	puts ("resetting ...\n");
 
-	udelay (50000);				/* wait 50 ms */
+	mdelay(50);				/* wait 50 ms */
 
 	disable_interrupts();
 
arch/arm/lib/semihosting.c +3 -1
index 2658026cf4..1b365a970f 100644
@@ -13,6 +13,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <env.h>
 
 #define SYSOPEN		0x01
 #define SYSCLOSE	0x02
@@ -180,7 +181,8 @@ static int smh_load_file(const char * const name, ulong load_addr,
 	return 0;
 }
 
-static int do_smhload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_smhload(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	if (argc == 3 || argc == 4) {
 		ulong load_addr;
arch/arm/mach-imx/cmd_bmode.c +3 -3
index 2d4d6efe5a..19bfd9f9a0 100644
@@ -54,8 +54,8 @@ static int create_usage(char *dest)
 	return size;
 }
 
-static int do_boot_mode(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+static int do_boot_mode(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	const struct boot_mode *p;
 	int reset_requested = 1;
@@ -87,7 +87,7 @@ void add_board_boot_modes(const struct boot_mode *p)
 	int size;
 	char *dest;
 
-	cmd_tbl_t *entry = ll_entry_get(cmd_tbl_t, bmode, cmd);
+	struct cmd_tbl *entry = ll_entry_get(struct cmd_tbl, bmode, cmd);
 
 	if (entry->usage) {
 		free(entry->usage);
arch/arm/mach-imx/cmd_dek.c +2 -1
index 1b111ba26b..5f21d2b1c5 100644
@@ -54,7 +54,8 @@ static int blob_encap_dek(const u8 *src, u8 *dst, u32 len)
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_dek_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_dek_blob(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	uint32_t src_addr, dst_addr, len;
 	uint8_t *src_ptr, *dst_ptr;
arch/arm/mach-imx/cmd_hdmidet.c +3 -1
index 6aa7d82577..e2571adfb0 100644
@@ -3,11 +3,13 @@
  * Copyright (C) 2012 Boundary Devices Inc.
  */
 #include <common.h>
+#include <command.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/io.h>
 
-static int do_hdmidet(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hdmidet(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct hdmi_regs *hdmi	= (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 	return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;
arch/arm/mach-imx/cmd_nandbcb.c +5 -4
index b3e59b1b00..327b3ed5e8 100644
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <malloc.h>
 #include <nand.h>
 #include <dm/devres.h>
@@ -437,7 +438,7 @@ err:
 	return ret;
 }
 
-static int do_nandbcb_bcbonly(int argc, char * const argv[])
+static int do_nandbcb_bcbonly(int argc, char *const argv[])
 {
 	struct fcb_block *fcb;
 	struct dbbt_block *dbbt;
@@ -519,7 +520,7 @@ fcb_err:
 	return CMD_RET_SUCCESS;
 }
 
-static int do_nandbcb_update(int argc, char * const argv[])
+static int do_nandbcb_update(int argc, char *const argv[])
 {
 	struct mtd_info *mtd;
 	loff_t addr, offset, size, maxsize;
@@ -557,8 +558,8 @@ static int do_nandbcb_update(int argc, char * const argv[])
 	return ret == 0 ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
 }
 
-static int do_nandbcb(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_nandbcb(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	const char *cmd;
 	int ret = 0;
arch/arm/mach-imx/hab.c +11 -10
index 30db820b56..d0757d8b66 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <config.h>
 #include <fuse.h>
 #include <mapmem.h>
@@ -291,8 +292,8 @@ static int get_hab_status(void)
 	return 0;
 }
 
-static int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_hab_status(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	if ((argc != 1)) {
 		cmd_usage(cmdtp);
@@ -324,8 +325,8 @@ static ulong get_image_ivt_offset(ulong img_addr)
 	}
 }
 
-static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
-				 char * const argv[])
+static int do_authenticate_image(struct cmd_tbl *cmdtp, int flag, int argc,
+				 char *const argv[])
 {
 	ulong	addr, length, ivt_offset;
 	int	rcode = 0;
@@ -349,8 +350,8 @@ static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
 	return rcode;
 }
 
-static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_hab_failsafe(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	hab_rvt_failsafe_t *hab_rvt_failsafe;
 
@@ -365,8 +366,8 @@ static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_hab_version(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	struct hab_hdr *hdr = (struct hab_hdr *)HAB_RVT_BASE;
 
@@ -380,8 +381,8 @@ static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_authenticate_image_or_failover(cmd_tbl_t *cmdtp, int flag,
-					     int argc, char * const argv[])
+static int do_authenticate_image_or_failover(struct cmd_tbl *cmdtp, int flag,
+					     int argc, char *const argv[])
 {
 	int ret = CMD_RET_FAILURE;
 
arch/arm/mach-imx/imx8/ahab.c +7 -6
index 6d25abe5ce..64394473da 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <asm/io.h>
 #include <asm/arch/sci/sci.h>
@@ -149,8 +150,8 @@ exit:
 	return ret;
 }
 
-static int do_authenticate(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_authenticate(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	ulong addr;
 
@@ -250,8 +251,8 @@ static void display_ahab_auth_event(u32 event)
 	}
 }
 
-static int do_ahab_status(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_ahab_status(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int err;
 	u8 idx = 0U;
@@ -297,8 +298,8 @@ static int confirm_close(void)
 	return 0;
 }
 
-static int do_ahab_close(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_ahab_close(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int err;
 	u16 lc;
arch/arm/mach-imx/imx8/snvs_security_sc.c +7 -6
index 73f5651161..564d1bfdfb 100644
@@ -626,7 +626,8 @@ static char snvs_cfg_help_text[] =
 	"ALL values should be in hexadecimal format";
 
 #define NB_REGISTERS 18
-static int do_snvs_cfg(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_snvs_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	int err = 0;
 	u32 idx = 0;
@@ -677,7 +678,7 @@ static char snvs_dgo_cfg_help_text[] =
 	"\n"
 	"ALL values should be in hexadecimal format";
 
-static int do_snvs_dgo_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_snvs_dgo_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
 			   char *const argv[])
 {
 	int err = 0;
@@ -713,7 +714,7 @@ static char tamper_pin_cfg_help_text[] =
 	"\n"
 	"ALL values should be in hexadecimal format";
 
-static int do_tamper_pin_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tamper_pin_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
 			     char *const argv[])
 {
 	int err = 0;
@@ -748,8 +749,8 @@ static char snvs_clear_status_help_text[] =
 	"Write the status registers with the value provided,"
 	" clearing the status";
 
-static int do_snvs_clear_status(cmd_tbl_t *cmdtp, int flag, int argc,
-				  char *const argv[])
+static int do_snvs_clear_status(struct cmd_tbl *cmdtp, int flag, int argc,
+				char *const argv[])
 {
 	int scierr = 0;
 	u32 idx = 0;
@@ -788,7 +789,7 @@ static char snvs_sec_status_help_text[] =
 	"snvs_sec_status\n"
 	"Display information about the security related to tamper and secvio";
 
-static int do_snvs_sec_status(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_snvs_sec_status(struct cmd_tbl *cmdtp, int flag, int argc,
 			      char *const argv[])
 {
 	int scierr;
arch/arm/mach-imx/imx8m/clock_imx8mq.c +3 -2
index ee18cdee50..52205b044a 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
@@ -755,8 +756,8 @@ int clock_init(void)
  * Dump some clockes.
  */
 #ifndef CONFIG_SPL_BUILD
-static int do_imx8m_showclocks(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_imx8m_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	u32 freq;
 
arch/arm/mach-imx/imx_bootaux.c +2 -1
index ec0da1164f..ca823e6861 100644
@@ -92,7 +92,8 @@ int arch_auxiliary_core_check_up(u32 core_id)
  * The TCMUL is mapped to (M4_BOOTROM_BASE_ADDR) at A core side for
  * accessing the M4 TCMUL.
  */
-static int do_bootaux(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bootaux(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	ulong addr;
 	int ret, up;
arch/arm/mach-imx/mx5/clock.c +3 -1
index 2fabdd2eae..09c4c89664 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
@@ -943,7 +944,8 @@ void mxc_set_sata_internal_clock(void)
 /*
  * Dump some core clockes.
  */
-static int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mx5_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			     char *const argv[])
 {
 	u32 freq;
 
arch/arm/mach-imx/mx6/clock.c +3 -1
index 6a9e673ca2..9f3d62fa41 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <linux/errno.h>
@@ -1305,7 +1306,8 @@ void disable_ipu_clock(void)
 /*
  * Dump some core clockes.
  */
-int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mx6_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	u32 freq;
 	freq = decode_pll(PLL_SYS, MXC_HCLK);
arch/arm/mach-imx/mx7/clock.c +3 -1
index 75be4f8ad7..f5520374f1 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <linux/errno.h>
@@ -1100,7 +1101,8 @@ void epdc_clock_disable(void)
 /*
  * Dump some core clockes.
  */
-int do_mx7_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mx7_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	u32 freq;
 	freq = decode_pll(PLL_CORE, MXC_HCLK);
arch/arm/mach-imx/mx7ulp/clock.c +3 -1
index 3c0bcccd0d..a987ff22df 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <errno.h>
@@ -329,7 +330,8 @@ void hab_caam_clock_enable(unsigned char enable)
 /*
  * Dump some core clockes.
  */
-int do_mx7_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mx7_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	u32 addr = 0;
 	u32 freq;
arch/arm/mach-keystone/cmd_clock.c +4 -3
index 667826b9f6..7165d666e5 100644
@@ -19,7 +19,7 @@ struct pll_init_data cmd_pll_data = {
 	.pll_od = 2,
 };
 
-int do_pll_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_pll_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc != 5)
 		goto pll_cmd_usage;
@@ -63,7 +63,8 @@ U_BOOT_CMD(
 	PLLSET_CMD_LIST " <mult> <div> <OD>\n"
 );
 
-int do_getclk_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_getclk_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	unsigned int clk;
 	unsigned long freq;
@@ -92,7 +93,7 @@ U_BOOT_CMD(
 	CLOCK_INDEXES_LIST
 );
 
-int do_psc_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_psc_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int	psc_module;
 	int	res;
arch/arm/mach-keystone/cmd_mon.c +4 -4
index 8142039040..049d573473 100644
@@ -12,8 +12,8 @@
 #include <mach/mon.h>
 asm(".arch_extension sec\n\t");
 
-static int do_mon_install(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_mon_install(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size;
 	int     rcode = 0;
@@ -65,8 +65,8 @@ static void core_spin(void)
 	}
 }
 
-int do_mon_power(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+int do_mon_power(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	int     rcode = 0, core_id, on;
 	void (*fn)(void);
arch/arm/mach-keystone/cmd_poweroff.c +1 -1
index 89b18516cd..f0ad9173b9 100644
@@ -12,7 +12,7 @@
 #include <asm/arch/psc_defs.h>
 #include <asm/arch/hardware.h>
 
-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[])
 {
 	mon_power_off(0);
 
arch/arm/mach-keystone/ddr3.c +1 -0
index 23ff06466d..9ab6b53adb 100644
@@ -7,6 +7,7 @@
  */
 
 #include <cpu_func.h>
+#include <env.h>
 #include <asm/io.h>
 #include <common.h>
 #include <asm/arch/msmc.h>
arch/arm/mach-keystone/keystone.c +1 -0
index 1d79927ac7..efaabca5a7 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/psc_defs.h>
arch/arm/mach-meson/sm.c +8 -6
index dacc897533..725897a0ec 100644
@@ -6,6 +6,8 @@
  */
 
 #include <common.h>
+#include <command.h>
+#include <env.h>
 #include <asm/arch/sm.h>
 #include <asm/cache.h>
 #include <linux/err.h>
@@ -117,7 +119,7 @@ int meson_sm_get_reboot_reason(void)
 	return FIELD_GET(REBOOT_REASON_MASK, reason);
 }
 
-static int do_sm_serial(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sm_serial(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	ulong address;
@@ -153,8 +155,8 @@ static const char *reboot_reasons[MAX_REBOOT_REASONS] = {
 	[REBOOT_REASON_WATCHDOG_REBOOT] = "watchdog_reboot",
 };
 
-static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
-			char *const argv[])
+static int do_sm_reboot_reason(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	const char *reason_str;
 	char *destarg = NULL;
@@ -181,15 +183,15 @@ static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_sm_sub[] = {
+static struct cmd_tbl cmd_sm_sub[] = {
 	U_BOOT_CMD_MKENT(serial, 2, 1, do_sm_serial, "", ""),
 	U_BOOT_CMD_MKENT(reboot_reason, 1, 1, do_sm_reboot_reason, "", ""),
 };
 
-static int do_sm(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sm(struct cmd_tbl *cmdtp, int flag, int argc,
 		 char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
arch/arm/mach-omap2/omap3/board.c +3 -1
index b893fb732e..f08c8ab43a 100644
@@ -16,6 +16,7 @@
  *
  */
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <init.h>
 #include <spl.h>
@@ -280,7 +281,8 @@ void abort(void)
 /******************************************************************************
  * OMAP3 specific command to switch between NAND HW and SW ecc
  *****************************************************************************/
-static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int hw, strength = 1;
 
arch/arm/mach-omap2/sec-common.c +1 -0
index 28b929f84f..edfb40f00b 100644
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
arch/arm/mach-rockchip/boot_mode.c +2 -0
index 7598fe4c43..349c0648a6 100644
@@ -5,6 +5,8 @@
 
 #include <common.h>
 #include <adc.h>
+#include <command.h>
+#include <env.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/boot_mode.h>
 #include <dm/device.h>
arch/arm/mach-rockchip/cpu-info.c +1 -0
index 08b7d3519d..21ca9dedce 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
arch/arm/mach-rockchip/rk3288/rk3288.c +3 -2
index 812f3bd5f3..804abe8a1b 100644
@@ -3,6 +3,7 @@
  * Copyright (c) 2016 Rockchip Electronics Co., Ltd
  */
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <env.h>
 #include <clk.h>
@@ -114,8 +115,8 @@ int rk_board_late_init(void)
 	return rk3288_board_late_init();
 }
 
-static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_clock(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	static const struct {
 		char *name;
arch/arm/mach-socfpga/clock_manager.c +3 -1
index 0a6025fffa..a4a97b6a0f 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <wait_bit.h>
 #include <asm/io.h>
@@ -62,7 +63,8 @@ int set_cpu_clk_info(void)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	cm_print_clock_quick_summary();
 	return 0;
arch/arm/mach-socfpga/misc.c +3 -1
index 557305c703..ac2b891fad 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <asm/cache.h>
@@ -178,7 +179,8 @@ int arch_cpu_init(void)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_bridge(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bridge(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	unsigned int mask = ~0;
 
arch/arm/mach-stm32mp/cmd_stm32key.c +2 -2
index f1f26e7c94..f191085a12 100644
@@ -66,8 +66,8 @@ static int confirm_prog(void)
 	return 0;
 }
 
-static int do_stm32key(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_stm32key(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	u32 addr;
 	const char *op = argc >= 2 ? argv[1] : NULL;
arch/arm/mach-tegra/cmd_enterrcm.c +3 -2
index b2252f3621..110d441d9b 100644
@@ -25,13 +25,14 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/pmc.h>
 
-static int do_enterrcm(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_enterrcm(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	puts("Entering RCM...\n");
 	udelay(50000);
arch/arm/mach-uniphier/boot-device/boot-device.c +3 -1
index 83f8c6a428..777946970b 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <spl.h>
 #include <stdio.h>
 #include <linux/io.h>
@@ -205,7 +206,8 @@ int uniphier_boot_from_backend(void)
 
 #ifndef CONFIG_SPL_BUILD
 
-static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pinmon(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	const struct uniphier_boot_device_info *info;
 	u32 pinmon;
arch/arm/mach-uniphier/dram/cmd_ddrmphy.c +3 -1
index 9a25bba599..a6c0735198 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <stdio.h>
 #include <linux/io.h>
 #include <linux/printk.h>
@@ -291,7 +292,8 @@ static void reg_dump(const struct uniphier_ddrmphy_param *param)
 	}
 }
 
-static int do_ddrm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ddrm(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	const struct uniphier_ddrmphy_param *param;
 	char *cmd;
arch/arm/mach-uniphier/dram/cmd_ddrphy.c +3 -1
index a616a2aafb..476c5b3582 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <stdio.h>
 #include <linux/io.h>
 #include <linux/printk.h>
@@ -261,7 +262,8 @@ static void reg_dump(const struct uniphier_ddrphy_param *param)
 	}
 }
 
-static int do_ddr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ddr(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	const struct uniphier_ddrphy_param *param;
 	char *cmd;
arch/arm/mach-uniphier/mmc-first-dev.c +5 -2
index e2f4f4eb5c..7f29b6bccd 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <mmc.h>
 #include <linux/errno.h>
@@ -28,7 +29,8 @@ int mmc_get_env_dev(void)
 	return find_first_mmc_device(false);
 }
 
-static int do_mmcsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mmcsetn(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int dev;
 
@@ -46,7 +48,8 @@ U_BOOT_CMD(
 	""
 );
 
-static int do_sdsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sdsetn(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int dev;
 
arch/arm/mach-zynqmp/mp.c +1 -1
index fbb551151a..cc07db4831 100644
@@ -221,7 +221,7 @@ void initialize_tcm(bool mode)
 	}
 }
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	if (nr >= ZYNQMP_CORE_APU0 && nr <= ZYNQMP_CORE_APU3) {
 		u64 boot_addr = simple_strtoull(argv[0], NULL, 16);
arch/m68k/cpu/mcf5227x/cpu.c +1 -1
index 1590d4a954..200c53eaf3 100644
@@ -19,7 +19,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-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[])
 {
 	rcm_t *rcm = (rcm_t *) (MMAP_RCM);
 	udelay(1000);
arch/m68k/cpu/mcf523x/cpu.c +1 -1
index 225bdc2d25..d521a8a2e4 100644
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-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[])
 {
 	ccm_t *ccm = (ccm_t *) MMAP_CCM;
 
arch/m68k/cpu/mcf52x2/cpu.c +7 -7
index 1f70d90f0b..8c91e0e193 100644
@@ -27,7 +27,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef	CONFIG_M5208
-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[])
 {
 	rcm_t *rcm = (rcm_t *)(MMAP_RCM);
 
@@ -140,7 +140,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-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[])
 {
 	/* Call the board specific reset actions first. */
 	if(board_reset) {
@@ -175,7 +175,7 @@ int watchdog_init(void)
 #endif
 
 #ifdef	CONFIG_M5272
-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[])
 {
 	wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
 
@@ -264,7 +264,7 @@ int watchdog_init(void)
 #endif				/* #ifdef CONFIG_M5272 */
 
 #ifdef	CONFIG_M5275
-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[])
 {
 	rcm_t *rcm = (rcm_t *)(MMAP_RCM);
 
@@ -354,7 +354,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-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[])
 {
 	MCFRESET_RCR = MCFRESET_RCR_SOFTRST;
 	return 0;
@@ -373,7 +373,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-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[])
 {
 	/* enable watchdog, set timeout to 0 and wait */
 	mbar_writeByte(MCFSIM_SYPCR, 0xc0);
@@ -405,7 +405,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-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[])
 {
 	/* enable watchdog, set timeout to 0 and wait */
 	mbar_writeByte(SIM_SYPCR, 0xc0);
arch/m68k/cpu/mcf530x/cpu.c +2 -1
index bef9047b35..0659bf6558 100644
@@ -5,13 +5,14 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <vsprintf.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 
 #ifdef CONFIG_M5307
-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[])
 {
 	sim_t *sim = (sim_t *)(MMAP_SIM);
 
arch/m68k/cpu/mcf532x/cpu.c +1 -1
index 52b64a94a7..87b77f42de 100644
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-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[])
 {
 	rcm_t *rcm = (rcm_t *) (MMAP_RCM);
 
arch/m68k/cpu/mcf5445x/cpu.c +1 -1
index cb1514c600..2608fdd76f 100644
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-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[])
 {
 	rcm_t *rcm = (rcm_t *) (MMAP_RCM);
 	udelay(1000);
arch/m68k/cpu/mcf547x_8x/cpu.c +1 -1
index 2a64c7b6f6..59cdfe70e4 100644
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-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[])
 {
 	gptmr_t *gptmr = (gptmr_t *) (MMAP_GPTMR);
 
arch/m68k/lib/bootm.c +2 -1
index c36ee79c92..b912d130d6 100644
@@ -49,7 +49,8 @@ void arch_lmb_reserve(struct lmb *lmb)
 	lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	int ret;
 	bd_t  *kbd;
arch/microblaze/cpu/interrupts.c +1 -1
index 910c596884..a6a52f8527 100644
@@ -187,7 +187,7 @@ void interrupt_handler(void)
 }
 
 #if defined(CONFIG_CMD_IRQ)
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, const char *argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, const char *argv[])
 {
 	int i;
 	struct irq_action *act = vecs;
arch/microblaze/cpu/spl.c +2 -1
index 070c12cce9..c633e83853 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <spl.h>
 #include <asm/io.h>
@@ -48,7 +49,7 @@ int spl_start_uboot(void)
 	return 1;
 }
 
-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[])
 {
 	__asm__ __volatile__ ("mts rmsr, r0;" \
 			      "bra r0");
arch/microblaze/lib/bootm.c +1 -1
index 592ac97f82..93f95b1e26 100644
@@ -108,7 +108,7 @@ static void boot_prep_linux(bootm_headers_t *images)
 	}
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
+int do_bootm_linux(int flag, int argc, char *const argv[],
 		   bootm_headers_t *images)
 {
 	images->cmdline_start = (ulong)env_get("bootargs");
arch/mips/cpu/cpu.c +1 -1
index 682bee6be2..7d5c9fd83a 100644
@@ -21,7 +21,7 @@ void __weak _machine_restart(void)
 		/* NOP */;
 }
 
-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[])
 {
 	_machine_restart();
 
arch/mips/lib/bootm.c +2 -2
index ce2b076b7d..cbc4413d5d 100644
@@ -306,8 +306,8 @@ static void boot_jump_linux(bootm_headers_t *images)
 			linux_extra);
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
-			bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	/* No need for those on MIPS */
 	if (flag & BOOTM_STATE_OS_BD_T)
arch/mips/mach-ath79/ar934x/clk.c +3 -1
index 09bdc253ae..5d0d4550db 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <hang.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
@@ -319,7 +320,8 @@ ulong get_ddr_freq(ulong dummy)
 	return gd->mem_clk;
 }
 
-int do_ar934x_showclk(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ar934x_showclk(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	ar934x_update_clock();
 	printf("CPU:       %8ld MHz\n", gd->cpu_clk / 1000000);
arch/nds32/cpu/n1213/ae3xx/cpu.c +1 -1
index 0660fffa45..c3efa31f59 100644
@@ -39,7 +39,7 @@ int cleanup_before_linux(void)
 	return 0;
 }
 
-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[])
 {
 	disable_interrupts();
 	panic("AE3XX wdt not support yet.\n");
arch/nds32/cpu/n1213/ag101/cpu.c +1 -1
index 3ae87a21bb..9d99c83bf3 100644
@@ -39,7 +39,7 @@ int cleanup_before_linux(void)
 	return 0;
 }
 
-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[])
 {
 	disable_interrupts();
 
arch/nds32/lib/boot.c +1 -1
index c50e8e5168..da2fd36a16 100644
@@ -9,7 +9,7 @@
 #include <command.h>
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	cleanup_before_linux();
 
arch/nios2/cpu/cpu.c +2 -1
index 9008db6aa5..756535a0b4 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu.h>
 #include <cpu_func.h>
 #include <dm.h>
@@ -31,7 +32,7 @@ int checkboard(void)
 }
 #endif
 
-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[])
 {
 	disable_interrupts();
 	/* indirect call to go beyond 256MB limitation of toolchain */
arch/nios2/cpu/interrupts.c +1 -1
index e9d1ff911b..90cabb6757 100644
@@ -118,7 +118,7 @@ int interrupt_init(void)
 
 /*************************************************************************/
 #if defined(CONFIG_CMD_IRQ)
-int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i;
 	struct irq_action *act = vecs;
arch/nios2/lib/bootm.c +3 -1
index bec18fe28f..fed412907f 100644
@@ -6,12 +6,14 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <image.h>
 #include <irq_func.h>
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
 
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	void (*kernel)(int, int, int, char *) = (void *)images->ep;
 	char *commandline = env_get("bootargs");
arch/powerpc/cpu/mpc83xx/cpu.c +1 -2
index f0e3ada195..0307039f37 100644
@@ -123,8 +123,7 @@ int checkcpu(void)
 #endif
 
 #ifndef CONFIG_SYSRESET
-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[])
 {
 	ulong msr;
 #ifndef MPC83xx_RESET
arch/powerpc/cpu/mpc83xx/ecc.c +1 -1
index a6eb7cb97c..1343dd3d3a 100644
@@ -96,7 +96,7 @@ void ecc_print_status(void)
 	       ddr->capture_attributes & ECC_CAPT_ATTR_VLD);
 }
 
-int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_ecc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
 #ifdef CONFIG_SYS_FSL_DDR2
arch/powerpc/cpu/mpc83xx/interrupts.c +2 -2
index e83895deab..8d525dc837 100644
@@ -71,8 +71,8 @@ void timer_interrupt_cpu (struct pt_regs *regs)
  * irqinfo - print information about PCI devices
  */
 
-void
-do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[])
+void do_irqinfo(struct cmd_tbl *cmdtp, bd_t *bd, int flag, int argc,
+		char *const argv[])
 {
 }
 
arch/powerpc/cpu/mpc83xx/speed.c +2 -1
index e2fc0b1e8a..5c14aa1f32 100644
@@ -523,7 +523,8 @@ int get_serial_clock(void)
 	return get_bus_freq(0);
 }
 
-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[])
 {
 	char buf[32];
 
arch/powerpc/cpu/mpc85xx/cmd_errata.c +2 -1
index d3167f6cb9..ff73596ba9 100644
@@ -129,7 +129,8 @@ static void check_erratum_a007212(void)
 }
 #endif
 
-static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_errata(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
 	extern int enable_cpu_a011_workaround;
arch/powerpc/cpu/mpc85xx/cpu.c +1 -1
index eff0d5d7e2..10c4bb91d7 100644
@@ -295,7 +295,7 @@ int checkcpu (void)
 
 /* ------------------------------------------------------------------------- */
 
-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[])
 {
 /* Everything after the first generation of PQ3 parts has RSTCR */
 #if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_ARCH_MPC8541) || \
arch/powerpc/cpu/mpc85xx/interrupts.c +1 -1
index 6f539d2677..43f7919b04 100644
@@ -102,7 +102,7 @@ void timer_interrupt_cpu(struct pt_regs *regs)
 
 #if defined(CONFIG_CMD_IRQ)
 /* irqinfo - print information about PCI devices,not implemented. */
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return 0;
 }
arch/powerpc/cpu/mpc85xx/mp.c +1 -1
index 9757bffe02..0f8c8cd667 100644
@@ -140,7 +140,7 @@ static u8 boot_entry_map[4] = {
 	BOOT_ENTRY_R3_LOWER,
 };
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	u32 i, val, *table = (u32 *)&__spin_table + nr * NUM_BOOT_ENTRY;
 	u64 boot_addr;
arch/powerpc/cpu/mpc86xx/cpu.c +1 -1
index 97b93f0213..fe35744b70 100644
@@ -107,7 +107,7 @@ checkcpu(void)
 }
 
 
-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[])
 {
 	volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
 	volatile ccsr_gur_t *gur = &immap->im_gur;
arch/powerpc/cpu/mpc86xx/interrupts.c +1 -1
index eb8e73e41c..8e4a66d23e 100644
@@ -100,7 +100,7 @@ void irq_free_handler(int vec)
 /*
  * irqinfo - print information about PCI devices,not implemented.
  */
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return 0;
 }
arch/powerpc/cpu/mpc86xx/mp.c +1 -1
index 07c4c079df..08d11ad4f2 100644
@@ -67,7 +67,7 @@ int is_core_disabled(int nr) {
 	return 0;
 }
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	/* dummy function so common/cmd_mp.c will build
 	 * should be implemented in the future */
arch/powerpc/cpu/mpc8xx/cpu.c +1 -1
index 9d6c08f17a..1b7c7fa01b 100644
@@ -195,7 +195,7 @@ void upmconfig(uint upm, uint *table, uint size)
 
 /* ------------------------------------------------------------------------- */
 
-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[])
 {
 	ulong msr, addr;
 
arch/powerpc/cpu/mpc8xx/immap.c +12 -7
index 442c01ac6f..e5b62e9f4a 100644
@@ -18,7 +18,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_siuinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
@@ -35,8 +36,8 @@ static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_memcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	memctl8xx_t __iomem *memctl = &immap->im_memctl;
@@ -58,7 +59,8 @@ static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_carinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	car8xx_t __iomem *car = &immap->im_clkrst;
@@ -119,7 +121,8 @@ static void binary(char *label, uint value, int nbits)
 #define PC_NBITS	12
 #define PD_NBITS	13
 
-static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	iop8xx_t __iomem *iop = &immap->im_ioport;
@@ -172,7 +175,8 @@ static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * this needs a clean up for smaller tighter code
  * use *uint and set the address based on cmd + port
  */
-static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopset(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	uint rcode = 0;
 	iopin_t iopin;
@@ -328,7 +332,8 @@ static void prbrg(int n, uint val)
 	putc('\n');
 }
 
-static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_brginfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	cpm8xx_t __iomem *cp = &immap->im_cpm;
arch/powerpc/lib/bootm.c +2 -2
index 8aec8c9fd3..59062ca654 100644
@@ -232,8 +232,8 @@ static int boot_body_linux(bootm_headers_t *images)
 	return 0;
 }
 
-noinline
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+noinline int do_bootm_linux(int flag, int argc, char *const argv[],
+			    bootm_headers_t *images)
 {
 	int	ret;
 
arch/powerpc/lib/kgdb.c +1 -1
index f580c023e5..4a3e26cffc 100644
@@ -252,7 +252,7 @@ kgdb_putregs(struct pt_regs *regs, char *buf, int length)
    the debugger. */
 
 void
-kgdb_breakpoint(int argc, char * const argv[])
+kgdb_breakpoint(int argc, char *const argv[])
 {
 	asm("	.globl breakinst\n\
 	     breakinst: .long 0x7d821008\n\
arch/riscv/lib/boot.c +1 -1
index 42b15a13a2..778d011f7c 100644
@@ -8,7 +8,7 @@
 #include <command.h>
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	cleanup_before_linux();
 
arch/riscv/lib/bootm.c +2 -2
index c24aba1dc9..98f2c76860 100644
@@ -106,7 +106,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
 	}
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
+int do_bootm_linux(int flag, int argc, char *const argv[],
 		   bootm_headers_t *images)
 {
 	/* No need for those on RISC-V */
@@ -128,7 +128,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
 	return 0;
 }
 
-int do_bootm_vxworks(int flag, int argc, char * const argv[],
+int do_bootm_vxworks(int flag, int argc, char *const argv[],
 		     bootm_headers_t *images)
 {
 	return do_bootm_linux(flag, argc, argv, images);
arch/riscv/lib/reset.c +1 -1
index ce3c1cf872..8779c619cc 100644
@@ -7,7 +7,7 @@
 #include <command.h>
 #include <hang.h>
 
-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");
 
arch/sh/cpu/sh4/cpu.c +1 -1
index e94e980c0e..f032d88159 100644
@@ -29,7 +29,7 @@ int cleanup_before_linux (void)
 	return 0;
 }
 
-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[])
 {
 	disable_interrupts();
 	reset_cpu(0);
arch/sh/lib/bootm.c +3 -1
index 5f14a04ab4..dc94f83785 100644
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <image.h>
 #include <asm/byteorder.h>
 #include <asm/zimage.h>
@@ -50,7 +51,8 @@ static unsigned long sh_check_cmd_arg(char *cmdline, char *key, int base)
 	return val;
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	/* Linux kernel load address */
 	void (*kernel) (void) = (void (*)(void))images->ep;
arch/sh/lib/zimageboot.c +4 -1
index 602776a474..c38f0933f8 100644
@@ -10,11 +10,14 @@
  */
 
 #include <common.h>
+#include <command.h>
+#include <env.h>
 #include <irq_func.h>
 #include <asm/io.h>
 #include <asm/zimage.h>
 
-int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sh_zimageboot(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	ulong (*zboot_entry)(int, char * const []) = NULL;
 	char *s0, *s1;
arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h +2 -0
index a3bde3d8e7..f2260ae90e 100644
@@ -7,6 +7,8 @@
 #ifndef __FSP_VPD_H__
 #define __FSP_VPD_H__
 
+#include <stddef.h>
+
 struct __packed memory_upd {
 	u64 signature;				/* Offset 0x0020 */
 	u8 revision;				/* Offset 0x0028 */
arch/x86/lib/bootm.c +2 -2
index 0837655e12..1569d30f8e 100644
@@ -206,8 +206,8 @@ static int boot_jump_linux(bootm_headers_t *images)
 				 images->os.arch == IH_ARCH_X86_64);
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
-		bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	/* No need for those on x86 */
 	if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
arch/x86/lib/cmd_boot.c +1 -1
index 9fce021c79..baaf3d13ad 100644
@@ -22,7 +22,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	unsigned long ret = 0;
 	char **argv_tmp;
arch/x86/lib/interrupts.c +1 -1
index b23b8fd402..40ba7fcfec 100644
@@ -127,7 +127,7 @@ void do_irq(int hw_irq)
 #endif
 
 #if defined(CONFIG_CMD_IRQ)
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 #if !CONFIG_IS_ENABLED(X86_64)
 	int irq;
arch/x86/lib/zimage.c +2 -1
index ffc09630b7..64d14e8911 100644
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <irq_func.h>
 #include <malloc.h>
@@ -310,7 +311,7 @@ void __setup_pcat_compatibility(void)
 {
 }
 
-int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct boot_params *base_ptr;
 	void *bzImage_addr = NULL;
board/Arcturus/ucp1020/cmd_arc.c +3 -1
index 2b4853f8f9..3656cf4cbc 100644
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <div64.h>
 #include <env.h>
@@ -376,7 +377,8 @@ void get_arc_info(void)
 		do_get_arc_info();
 }
 
-static int do_arc_cmd(cmd_tbl_t * cmdtp, int flag, int argc, char *const argv[])
+static int do_arc_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	const char *cmd;
 	int ret = -1;
board/BuS/eb_cpu5282/eb_cpu5282.c +1 -1
index a667413bfc..1d05e40c20 100644
@@ -226,7 +226,7 @@ int drv_video_init(void)
 /*---------------------------------------------------------------------------*/
 
 #ifdef CONFIG_VIDEO
-int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_brightness(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rcode = 0;
 	ulong side;
board/LaCie/net2big_v2/net2big_v2.c +2 -1
index 8b97e1a533..dbd8b5755d 100644
@@ -246,7 +246,8 @@ void reset_phy(void)
 #if defined(CONFIG_KIRKWOOD_GPIO)
 /* Return GPIO push button status */
 static int
-do_read_push_button(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_read_push_button(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	return !kw_gpio_get_value(NET2BIG_V2_GPIO_PUSH_BUTTON);
 }
board/LaCie/netspace_v2/netspace_v2.c +1 -1
index f9bf527739..011cc563d1 100644
@@ -110,7 +110,7 @@ void reset_phy(void)
 #if defined(CONFIG_KIRKWOOD_GPIO)
 /* Return GPIO button status */
 static int
-do_read_button(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_read_button(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return kw_gpio_get_value(NETSPACE_V2_GPIO_BUTTON);
 }
board/Synology/ds414/cmd_syno.c +5 -4
index bd6eefd773..a120c3123f 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <div64.h>
 #include <env.h>
 #include <net.h>
@@ -21,7 +22,7 @@
 #define SYNO_CHKSUM_TAG		"CHK="
 
 
-static int do_syno_populate(int argc, char * const argv[])
+static int do_syno_populate(int argc, char *const argv[])
 {
 	unsigned int bus = CONFIG_SF_DEFAULT_BUS;
 	unsigned int cs = CONFIG_SF_DEFAULT_CS;
@@ -152,7 +153,7 @@ static const char * const pwr_mng_bit_func[] = {
 	NULL,
 };
 
-static int do_syno_clk_gate(int argc, char * const argv[])
+static int do_syno_clk_gate(int argc, char *const argv[])
 {
 	u32 pwr_mng_ctrl_reg = reg_read(POWER_MNG_CTRL_REG);
 	const char *func, *state;
@@ -195,8 +196,8 @@ static int do_syno_clk_gate(int argc, char * const argv[])
 	return 0;
 }
 
-static int do_syno(cmd_tbl_t *cmdtp, int flag,
-                   int argc, char * const argv[])
+static int do_syno(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	const char *cmd;
 	int ret = 0;
board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c +1 -0
index 772e21b9c5..6168dc9220 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <errno.h>
 #include <init.h>
 #include <linux/libfdt.h>
board/amlogic/sei510/sei510.c +1 -0
index 70fe3559f6..5a5148ea68 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <env_internal.h>
 #include <init.h>
 #include <net.h>
board/amlogic/sei610/sei610.c +1 -0
index 3c44fba516..27dba93582 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <env_internal.h>
 #include <init.h>
 #include <net.h>
board/aristainetos/aristainetos.c +1 -0
index 3a59b51c1c..14931120f6 100644
@@ -9,6 +9,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <command.h>
 #include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
board/bosch/guardian/board.c +1 -0
index b8dbe8ac53..1d8fa78154 100644
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <cpsw.h>
 #include <dm.h>
+#include <env.h>
 #include <env_internal.h>
 #include <errno.h>
 #include <i2c.h>
board/boundary/nitrogen6x/nitrogen6x.c +2 -1
index 8e29fd0095..92a7a2fc6e 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <init.h>
 #include <net.h>
@@ -988,7 +989,7 @@ static int read_keys(char *buf)
 	return numpressed;
 }
 
-static int do_kbd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_kbd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char envvalue[ARRAY_SIZE(buttons)+1];
 	int numpressed = read_keys(envvalue);
board/buffalo/lsxl/lsxl.c +1 -0
index 6afb6bbdb5..712ef11666 100644
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <command.h>
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
board/cavium/thunderx/atf.c +2 -1
index ea2f2bade0..f01ead4e23 100644
@@ -4,6 +4,7 @@
 **/
 
 #include <common.h>
+#include <command.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 
@@ -224,7 +225,7 @@ static void atf_print_part_table(void)
 	}
 }
 
-int do_atf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_atf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ssize_t ret;
 	size_t size, offset;
board/corscience/tricorder/tricorder-eeprom.c +2 -1
index 23c2ea9186..192af304d9 100644
@@ -5,6 +5,7 @@
  * Andreas Bie?mann <[email protected]>
  */
 #include <common.h>
+#include <command.h>
 #include <eeprom.h>
 #include <i2c.h>
 #include <u-boot/crc.h>
@@ -186,7 +187,7 @@ int tricorder_eeprom_write(unsigned devaddr, const char *name,
 	return ret;
 }
 
-int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_tricorder_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *argv[])
 {
 	if (argc == 3) {
 		ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
board/egnite/ethernut5/ethernut5_pwrman.c +2 -1
index aa99d29c21..7dbb6e8f2b 100644
@@ -32,6 +32,7 @@
  * http://www.ethernut.de/
  */
 #include <common.h>
+#include <command.h>
 #include <asm/arch/at91sam9260.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/gpio.h>
@@ -215,7 +216,7 @@ void ethernut5_print_voltage(void)
 /*
  * Process the board specific 'pwrman' command.
  */
-int do_pwrman(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_pwrman(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	u8 val;
 	int i;
board/esd/vme8349/caddy.c +2 -1
index db8d7bfe9b..ba91f4b3c8 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <ioports.h>
 #include <mpc83xx.h>
@@ -36,7 +37,7 @@ void generate_answer(struct caddy_cmd *cmd, uint32_t status, uint32_t *result)
 		caddy_interface->answer_in = ptr;
 }
 
-int do_caddy(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_caddy(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long base_addr;
 	uint32_t ptr;
board/freescale/c29xpcie/cpld.c +1 -1
index f57047d1d3..b864a60c44 100644
@@ -89,7 +89,7 @@ static void cpld_dump_regs(void)
 #endif
 
 #ifndef CONFIG_SPL_BUILD
-int cpld_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int cpld_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 	unsigned char value;
board/freescale/common/cmd_esbc_validate.c +4 -4
index 36b620ca23..638aa3c19a 100644
@@ -8,8 +8,8 @@
 #include <env.h>
 #include <fsl_validate.h>
 
-int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	if (fsl_check_boot_mode_secure() == 0) {
 		printf("Boot Mode is Non-Secure. Not entering spin loop.\n");
@@ -24,8 +24,8 @@ loop:
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_esbc_validate(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	char *hash_str = NULL;
 	uintptr_t haddr;
board/freescale/common/ngpixis.c +2 -1
index d7254010bf..37a6f775a0 100644
@@ -171,7 +171,8 @@ void pixis_sysclk_set(unsigned long sysclk)
 	PIXIS_WRITE(sclk[2], sclk2);
 }
 
-int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int pixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	unsigned int i;
 	unsigned long sysclk;
board/freescale/common/pixis.c +6 -4
index e9b7127833..4127fbc139 100644
@@ -266,8 +266,8 @@ static void set_px_go_with_watchdog(void)
 /* Disable the watchdog
  *
  */
-static int pixis_disable_watchdog_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-				      char * const argv[])
+static int pixis_disable_watchdog_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+				      char *const argv[])
 {
 	/* Disable the VELA sequencer and the watchdog */
 	clrbits_8(pixis_base + PIXIS_VCTL, 9);
@@ -285,7 +285,8 @@ U_BOOT_CMD(
 
 /* Enable or disable SGMII mode for a TSEC
  */
-static int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int pixis_set_sgmii(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	int which_tsec = -1;
 	unsigned char mask;
@@ -411,7 +412,8 @@ static unsigned long strfractoint(char *strptr)
 	return intval + decval;
 }
 
-static int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int pixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	unsigned int i;
 	char *p_cf = NULL;
board/freescale/common/qixis.c +2 -1
index dd1ee90b3c..591203132f 100644
@@ -233,7 +233,8 @@ void __weak qixis_dump_switch(void)
 	puts("Reverse engineering switch is not implemented for this board\n");
 }
 
-static int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int qixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	int i;
 
board/freescale/common/sys_eeprom.c +1 -1
index 71af645b03..b3421052a5 100644
@@ -383,7 +383,7 @@ static void set_mac_address(unsigned int index, const char *string)
 	update_crc();
 }
 
-int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char cmd;
 
board/freescale/common/vid.c +4 -5
index 20852476dd..dfc6a91d1a 100644
@@ -925,9 +925,9 @@ exit:
 
 }
 
-static int do_vdd_override(cmd_tbl_t *cmdtp,
+static int do_vdd_override(struct cmd_tbl *cmdtp,
 			   int flag, int argc,
-			   char * const argv[])
+			   char *const argv[])
 {
 	ulong override;
 
@@ -941,9 +941,8 @@ static int do_vdd_override(cmd_tbl_t *cmdtp,
 	return 0;
 }
 
-static int do_vdd_read(cmd_tbl_t *cmdtp,
-			 int flag, int argc,
-			 char * const argv[])
+static int do_vdd_read(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc < 1)
 		return CMD_RET_USAGE;
board/freescale/imx8mm_evk/imx8mm_evk.c +1 -0
index 1f95f3b0c4..c43af9bc48 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 #include <miiphy.h>
 #include <netdev.h>
board/freescale/imx8mm_evk/spl.c +1 -0
index 3abf6be482..42b637be5c 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
board/freescale/imx8mn_evk/imx8mn_evk.c +1 -0
index 8bd54ea2aa..ea02bb75f4 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
board/freescale/imx8mn_evk/spl.c +1 -0
index fae1f0c9c7..486863e367 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
board/freescale/imx8mp_evk/imx8mp_evk.c +1 -0
index aa5100f5bf..97ba15645a 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <init.h>
 #include <asm/mach-imx/iomux-v3.h>
board/freescale/imx8mp_evk/spl.c +1 -0
index e84e470ac2..e03c2c1118 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
board/freescale/imxrt1020-evk/imxrt1020-evk.c +1 -0
index 06ad524d5d..08f6ca9c52 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/io.h>
board/freescale/ls1012ardb/ls1012ardb.c +3 -2
index fc929c441c..5b814f7abf 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <fdt_support.h>
 #include <hang.h>
 #include <i2c.h>
@@ -394,8 +395,8 @@ static int convert_flash_bank(int bank)
 	return ret;
 }
 
-static int flash_bank_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int flash_bank_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
board/freescale/ls1021atwr/ls1021atwr.c +7 -6
index acf146de4d..c7f7baa8e6 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
@@ -612,8 +613,8 @@ static void convert_flash_bank(char bank)
 	cpld_data->system_rst = CONFIG_RESET;
 }
 
-static int flash_bank_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int flash_bank_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
@@ -633,8 +634,8 @@ U_BOOT_CMD(
 	"bank[0-upper bank/1-lower bank] (e.g. boot_bank 0)"
 );
 
-static int cpld_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int cpld_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
 
@@ -692,8 +693,8 @@ static void print_serdes_mux(void)
 		printf("B.\n");
 }
 
-static int serdes_mux_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int serdes_mux_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
board/freescale/ls1043ardb/cpld.c +1 -1
index 00c70b1e49..5d2e8015a0 100644
@@ -133,7 +133,7 @@ void cpld_rev_bit(unsigned char *value)
 	*value = rev_val;
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
board/freescale/ls1046ardb/cpld.c +1 -1
index a65751986a..548601a5ae 100644
@@ -129,7 +129,7 @@ void cpld_rev_bit(unsigned char *value)
 	*value = rev_val;
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
board/freescale/p1010rdb/p1010rdb.c +3 -2
index 1adc898441..66ccc0bd1e 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <init.h>
 #include <net.h>
@@ -708,8 +709,8 @@ int misc_init_r(void)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int pin_mux_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int pin_mux_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
board/freescale/p2041rdb/cpld.c +1 -1
index 3037ef89f1..b042fe3bcb 100644
@@ -87,7 +87,7 @@ static void cpld_dump_regs(void)
 }
 #endif
 
-int cpld_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int cpld_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
board/freescale/t102xrdb/cpld.c +1 -1
index 2b640e0450..47c3b1627e 100644
@@ -72,7 +72,7 @@ static void cpld_dump_regs(void)
 	putc('\n');
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
board/freescale/t102xrdb/t102xrdb.c +2 -2
index 983c723a10..754fcb0ad5 100644
@@ -368,8 +368,8 @@ static u32 t1023rdb_ctrl(u32 ctrl_type)
 	return 0;
 }
 
-static int switch_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-		    char * const argv[])
+static int switch_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
board/freescale/t104xrdb/cpld.c +1 -1
index f9c8ab3752..ac34095f3b 100644
@@ -82,7 +82,7 @@ static void cpld_dump_regs(void)
 }
 #endif
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
board/freescale/t208xrdb/cpld.c +1 -1
index 9a9b9d8e77..b9ba62adff 100644
@@ -43,7 +43,7 @@ void cpld_set_defbank(void)
 	CPLD_WRITE(reset_ctl, CPLD_LBMAP_RESET);
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
board/freescale/t4qds/t4240qds.c +2 -2
index 0b00ec6e29..08ecf9a636 100644
@@ -902,9 +902,9 @@ void qixis_dump_switch(void)
 	}
 }
 
-static int do_vdd_adjust(cmd_tbl_t *cmdtp,
+static int do_vdd_adjust(struct cmd_tbl *cmdtp,
 			 int flag, int argc,
-			 char * const argv[])
+			 char *const argv[])
 {
 	ulong override;
 
board/freescale/t4rdb/cpld.c +1 -1
index 470b5f9154..d484509bc2 100644
@@ -95,7 +95,7 @@ static void cpld_dump_regs(void)
 #endif
 
 #ifndef CONFIG_SPL_BUILD
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
board/gardena/smart-gateway-mt7688/board.c +2 -1
index 89844ee69e..768e7acc35 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
@@ -206,7 +207,7 @@ static void copy_or_generate_uuid(char *fd_ptr, const char *env_var_name)
  * Helper function to provide some sane factory-data values for testing
  * purpose, when these values are not programmed correctly
  */
-int do_fd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct factory_data_values *fd;
 	struct spi_flash *sf;
board/gateworks/gw_ventana/eeprom.c +3 -1
index 5e9cf11575..a833657b15 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <hexdump.h>
 #include <i2c.h>
@@ -158,7 +159,8 @@ static struct ventana_eeprom_config *get_config(const char *name)
 static u8 econfig_bytes[sizeof(ventana_info.config)];
 static int econfig_init = -1;
 
-static int do_econfig(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_econfig(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct ventana_eeprom_config *cfg;
 	struct ventana_board_info *info = &ventana_info;
board/gateworks/gw_ventana/gsc.c +6 -4
index 068f8cd9e7..6d9565ccfe 100644
@@ -5,6 +5,7 @@
  * Author: Tim Harvey <[email protected]>
  */
 
+#include <command.h>
 #include <linux/errno.h>
 #include <common.h>
 #include <i2c.h>
@@ -176,8 +177,8 @@ int gsc_boot_wd_disable(void)
 }
 
 #if defined(CONFIG_CMD_GSC) && !defined(CONFIG_SPL_BUILD)
-static int do_gsc_sleep(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_gsc_sleep(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	unsigned char reg;
 	unsigned long secs = 0;
@@ -218,7 +219,8 @@ error:
 	return CMD_RET_FAILURE;
 }
 
-static int do_gsc_wd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_gsc_wd(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	unsigned char reg;
 
@@ -257,7 +259,7 @@ static int do_gsc_wd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_gsc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_gsc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc < 2)
 		return gsc_info(1);
board/gdsys/a38x/controlcenterdc.c +1 -0
index 7aad683127..0d53d69ecc 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <init.h>
 #include <miiphy.h>
board/gdsys/a38x/hydra.c +2 -1
index fa50ad2830..daade6da0a 100644
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <command.h>
 #include <console.h> /* ctrlc */
 #include <asm/io.h>
 
@@ -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 +
board/gdsys/common/cmd_ioloop.c +5 -5
index 05a14ff103..88ab8233d5 100644
@@ -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;
board/gdsys/common/osd.c +6 -4
index 10c4329146..cda0cc6b48 100644
@@ -7,6 +7,7 @@
 #ifdef CONFIG_GDSYS_LEGACY_DRIVERS
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <malloc.h>
 
@@ -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 */
board/gdsys/common/osd_cmd.c +7 -6
index 53179b9811..fe6249794e 100644
@@ -10,13 +10,14 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <hexdump.h>
 #include <video_osd.h>
 #include <malloc.h>
 
-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;
board/gdsys/mpc8308/gazerbeam.c +1 -0
index 8c9636d292..b64a6d992d 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <board.h>
+#include <command.h>
 #include <dm.h>
 #include <env.h>
 #include <fdt_support.h>
board/gdsys/p1022/controlcenterd.c +1 -1
index b39b0b6002..e960fa71ac 100644
@@ -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);
 }
board/google/chromebook_coral/coral.c +1 -0
index 4e34710b97..12d4fe63cb 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 
 int arch_misc_init(void)
 {
board/keymile/common/common.c +6 -6
index 08f7f8d884..f592eba9e5 100644
@@ -157,8 +157,8 @@ int board_eth_init(bd_t *bis)
  * read out the board id and the hw key from the intventory EEPROM and set
  * this values as environment variables.
  */
-static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
-				char *const argv[])
+static int do_setboardid(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	unsigned char buf[32];
 	char *p;
@@ -203,8 +203,8 @@ U_BOOT_CMD(km_setboardid, 1, 0, do_setboardid, "setboardid", "read out bid and "
  *				application and in the init scripts (?)
  *	return 0 in case of match, 1 if not match or error
  */
-static int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc,
-			char *const argv[])
+static int do_checkboardidhwk(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	unsigned long ivmbid = 0, ivmhwkey = 0;
 	unsigned long envbid = 0, envhwkey = 0;
@@ -344,8 +344,8 @@ U_BOOT_CMD(km_checkbidhwk, 2, 0, do_checkboardidhwk,
  *  if the testpin of the board is asserted, return 1
  *  *	else return 0
  */
-static int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc,
-			char *const argv[])
+static int do_checktestboot(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	int testpin = 0;
 	char *s = NULL;
board/mediatek/mt7622/mt7622_rfb.c +1 -0
index 912b993240..6a5f936635 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <env.h>
 #include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
board/phytium/durian/durian.c +1 -0
index 7dceebdeae..414360fe47 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/armv8/mmu.h>
board/renesas/sh7752evb/sh7752evb.c +2 -1
index 565ce5f5d1..c6e0c12976 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <flash.h>
 #include <init.h>
@@ -245,7 +246,7 @@ int board_late_init(void)
 }
 
 #ifdef CONFIG_DEPRECATED
-int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_write_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i, ret;
 	char mac_string[256];
board/renesas/sh7753evb/sh7753evb.c +2 -1
index 0a762bc553..cdeacb8aae 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <flash.h>
 #include <init.h>
@@ -261,7 +262,7 @@ int board_late_init(void)
 }
 
 #ifdef CONFIG_DEPRECATED
-int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_write_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i, ret;
 	char mac_string[256];
board/renesas/sh7757lcr/sh7757lcr.c +3 -2
index eef5d36fd5..5e76b9e7b4 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <flash.h>
 #include <init.h>
@@ -344,7 +345,7 @@ int board_late_init(void)
 	return 0;
 }
 
-int do_sh_g200(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sh_g200(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct gctrl_regs *gctrl = GCTRL_BASE;
 	unsigned long graofst;
@@ -363,7 +364,7 @@ U_BOOT_CMD(
 );
 
 #ifdef CONFIG_DEPRECATED
-int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_write_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i, ret;
 	char mac_string[256];
board/renesas/stout/cpld.c +3 -1
index e6c2051bd4..b56ed1703f 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
@@ -124,7 +125,8 @@ void cpld_init(void)
 #endif
 }
 
-static int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	u32 addr, val;
 
board/renesas/ulcb/cpld.c +3 -1
index 528675651d..a20a34a92a 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
@@ -82,7 +83,8 @@ static void cpld_write(struct udevice *dev, u8 addr, u32 data)
 	dm_gpio_set_value(&priv->sstbz, 1);
 }
 
-static int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 	u32 addr, val;
board/rockchip/kylin_rk3036/kylin_rk3036.c +1 -0
index c5e28df258..0ca91cdeb0 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/uart.h>
board/samsung/common/board.c +1 -0
index 948007c4a8..c54de9fc12 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cros_ec.h>
+#include <env.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <hang.h>
board/samsung/common/misc.c +1 -1
index 9117669f71..146843d348 100644
@@ -262,7 +262,7 @@ static int mode_leave_menu(int mode)
 	char *exit_option;
 	char *exit_reset = "reset";
 	char *exit_back = "back";
-	cmd_tbl_t *cmd;
+	struct cmd_tbl *cmd;
 	int cmd_result;
 	int leave;
 
board/siemens/capricorn/board.c +4 -2
index b4eae7f027..ef6630f4f0 100644
@@ -6,7 +6,9 @@
  *
  */
 #include <common.h>
+#include <command.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <init.h>
 #include <netdev.h>
@@ -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);
board/siemens/common/board.c +5 -4
index f1bca4b27f..e0bd8590bc 100644
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <errno.h>
 #include <init.h>
@@ -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;
board/siemens/draco/board.c +3 -2
index 963de15fa8..b4893d39ae 100644
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <errno.h>
 #include <init.h>
@@ -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");
board/siemens/taurus/taurus.c +2 -2
index 9f9cdfa234..927ef59650 100644
@@ -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;
board/sifive/fu540/fu540.c +1 -0
index e9d1cf9a4b..d2a1ed0a3e 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 #include <linux/delay.h>
 #include <linux/io.h>
board/sks-kinkel/sksimx6/sksimx6.c +1 -0
index e5f6e90e0c..235d87c053 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
board/solidrun/clearfog/clearfog.c +1 -0
index b8391a35c0..9430097432 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <i2c.h>
 #include <init.h>
 #include <miiphy.h>
board/st/common/cmd_stboard.c +3 -2
index 915164aa0b..e1038619f0 100644
@@ -31,6 +31,7 @@
 
 #ifndef CONFIG_SPL_BUILD
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <misc.h>
 #include <dm/device.h>
@@ -67,8 +68,8 @@ static void display_stboard(u32 otp)
 	       otp & 0xF);
 }
 
-static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int ret;
 	u32 otp, lock;
board/st/stm32f429-discovery/stm32f429-discovery.c +1 -0
index 5b0744ff6b..d0948b7962 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 
 #include <asm/io.h>
board/st/stm32f429-evaluation/stm32f429-evaluation.c +1 -0
index 1570d110bf..680f69dfd1 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 
 #include <asm/io.h>
board/st/stm32f469-discovery/stm32f469-discovery.c +1 -0
index d9bcb39bea..4b71d40056 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 
 #include <asm/io.h>
board/synopsys/emsdp/emsdp.c +7 -4
index d98e606426..c1746b6110 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <dwmmc.h>
 #include <init.h>
@@ -102,7 +103,8 @@ void reset_cpu(ulong addr)
 		; /* loop forever till reset */
 }
 
-static int do_emsdp_rom(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_emsdp_rom(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	u32 creg_boot = readl(CREG_BOOT);
 
@@ -118,13 +120,14 @@ static int do_emsdp_rom(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]
 	return CMD_RET_SUCCESS;
 }
 
-cmd_tbl_t cmd_emsdp[] = {
+struct cmd_tbl cmd_emsdp[] = {
 	U_BOOT_CMD_MKENT(rom, 2, 0, do_emsdp_rom, "", ""),
 };
 
-static int do_emsdp(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_emsdp(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	c = find_cmd_tbl(argv[1], cmd_emsdp, ARRAY_SIZE(cmd_emsdp));
 
board/synopsys/hsdk/hsdk.c +13 -9
index 5f61fc0d7b..906a8eab87 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <config.h>
 #include <cpu_func.h>
 #include <env.h>
@@ -929,7 +930,8 @@ static int hsdk_go_prepare_and_run(void)
 	return hsdk_go_run(reg);
 }
 
-static int do_hsdk_go(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_go(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int ret;
 
@@ -994,7 +996,8 @@ static void init_mark_done(void)
 	writel(~INIT_MARKER_PENDING, INIT_MARKER_REGISTER);
 }
 
-static int do_hsdk_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_init(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	int ret;
 
@@ -1022,7 +1025,7 @@ U_BOOT_CMD(
 	"- Init HSDK HW\n"
 );
 
-static int do_hsdk_clock_set(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_set(struct cmd_tbl *cmdtp, int flag, int argc,
 			     char *const argv[])
 {
 	int ret = 0;
@@ -1054,7 +1057,7 @@ static int do_hsdk_clock_set(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_hsdk_clock_get(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_get(struct cmd_tbl *cmdtp, int flag, int argc,
 			     char *const argv[])
 {
 	ulong rate;
@@ -1082,7 +1085,7 @@ static int do_hsdk_clock_get(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_hsdk_clock_print(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_print(struct cmd_tbl *cmdtp, int flag, int argc,
 			       char *const argv[])
 {
 	/* Main clocks */
@@ -1094,7 +1097,7 @@ static int do_hsdk_clock_print(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_hsdk_clock_print_all(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_print_all(struct cmd_tbl *cmdtp, int flag, int argc,
 				   char *const argv[])
 {
 	/*
@@ -1155,16 +1158,17 @@ static int do_hsdk_clock_print_all(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-cmd_tbl_t cmd_hsdk_clock[] = {
+struct cmd_tbl cmd_hsdk_clock[] = {
 	U_BOOT_CMD_MKENT(set, 3, 0, do_hsdk_clock_set, "", ""),
 	U_BOOT_CMD_MKENT(get, 3, 0, do_hsdk_clock_get, "", ""),
 	U_BOOT_CMD_MKENT(print, 4, 0, do_hsdk_clock_print, "", ""),
 	U_BOOT_CMD_MKENT(print_all, 4, 0, do_hsdk_clock_print_all, "", ""),
 };
 
-static int do_hsdk_clock(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_clock(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
board/syteco/zmx25/zmx25.c +1 -0
index 715e20dbd0..9ea62bb796 100644
@@ -15,6 +15,7 @@
  */
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <init.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
board/technexion/pico-imx6/pico-imx6.c +1 -0
index eac30368f7..c60ce4b138 100644
@@ -6,6 +6,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <env.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
board/theadorable/theadorable.c +2 -1
index 9af1799fa5..6ee09034ea 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <i2c.h>
 #include <init.h>
@@ -309,7 +310,7 @@ int board_late_init(void)
 #endif
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_PCI)
-int do_pcie_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_pcie_test(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pci_dev_t bdf;
 	u16 ven_id, dev_id;
board/ti/j721e/evm.c +1 -0
index d9af309818..c4d1cddc1d 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <fdt_support.h>
 #include <image.h>
 #include <init.h>
board/ti/sdp4430/cmd_bat.c +1 -1
index c820435386..6c1e6ca393 100644
@@ -9,7 +9,7 @@
 #ifdef CONFIG_CMD_BAT
 #include <twl6030.h>
 
-int do_vbat(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_vbat(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc == 2) {
 		if (strncmp(argv[1], "startcharge", 12) == 0)
board/toradex/apalis-tk1/apalis-tk1.c +1 -0
index 81329a6131..3b7fa4b237 100644
@@ -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>
board/toradex/apalis_imx6/do_fuse.c +5 -4
index 22d191f52a..6991b1bc13 100644
@@ -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;
board/toradex/apalis_imx6/pf0100.c +3 -2
index ebd6418fd4..f8d0494332 100644
@@ -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...");
board/toradex/colibri_imx6/do_fuse.c +5 -4
index 22d191f52a..6991b1bc13 100644
@@ -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;
board/toradex/colibri_imx6/pf0100.c +3 -2
index e744243297..149e9bd3b9 100644
@@ -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...");
board/toradex/common/tdx-cfg-block.c +5 -4
index bd7d8b7f53..75216ecf6d 100644
@@ -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;
 
board/toradex/verdin-imx8mm/spl.c +1 -0
index 338952ea71..eedca1e218 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
board/varisys/common/sys_eeprom.c +1 -1
index 4c025087db..134c307e5d 100644
@@ -306,7 +306,7 @@ static void set_mac_address(unsigned int index, const char *string)
 	update_crc();
 }
 
-int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char cmd;
 
board/work-microwave/work_92105/work_92105_display.c +4 -2
index db04dcabc7..3dd60ec827 100644
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/emc.h>
@@ -266,7 +267,7 @@ void work_92105_display_init(void)
 
 #ifdef CONFIG_CMD_MAX6957
 
-static int do_max6957aax(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_max6957aax(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	int reg, val;
@@ -315,7 +316,8 @@ U_BOOT_CMD(
 #error CONFIG_CMD_HD44760 requires CONFIG_HUSH_PARSER
 #endif
 
-static int do_hd44780(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hd44780(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	char *cmd;
 
board/xilinx/common/board.c +1 -0
index 294a59df77..b8cdaaada1 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <i2c.h>
board/xilinx/microblaze-generic/microblaze-generic.c +1 -0
index 0e33f6af0b..0f81df3acc 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <env.h>
 #include <init.h>
 #include <dm/lists.h>
 #include <fdtdec.h>
board/xilinx/versal/board.c +1 -0
index 24cff0c370..44cc65e023 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <fdtdec.h>
 #include <init.h>
 #include <malloc.h>
board/xilinx/zynq/cmds.c +9 -7
index 27d44b760d..33589347da 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
@@ -408,8 +409,8 @@ static int zynq_verify_image(u32 src_ptr)
 	return 0;
 }
 
-static int do_zynq_rsa(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_zynq_rsa(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	u32 src_ptr;
 	char *endp;
@@ -429,8 +430,8 @@ static int do_zynq_rsa(cmd_tbl_t *cmdtp, int flag, int argc,
 #endif
 
 #ifdef CONFIG_CMD_ZYNQ_AES
-static int zynq_decrypt_image(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int zynq_decrypt_image(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	char *endp;
 	u32 srcaddr, srclen, dstaddr, dstlen;
@@ -469,7 +470,7 @@ static int zynq_decrypt_image(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 #endif
 
-static cmd_tbl_t zynq_commands[] = {
+static struct cmd_tbl zynq_commands[] = {
 #ifdef CONFIG_CMD_ZYNQ_RSA
 	U_BOOT_CMD_MKENT(rsa, 3, 1, do_zynq_rsa, "", ""),
 #endif
@@ -478,9 +479,10 @@ static cmd_tbl_t zynq_commands[] = {
 #endif
 };
 
-static int do_zynq(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zynq(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
-	cmd_tbl_t *zynq_cmd;
+	struct cmd_tbl *zynq_cmd;
 	int ret;
 
 	if (!ARRAY_SIZE(zynq_commands)) {
board/xilinx/zynqmp/cmds.c +12 -11
index 893616b6a1..0f1f26986f 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <malloc.h>
@@ -13,8 +14,8 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 
-static int do_zynqmp_verify_secure(cmd_tbl_t *cmdtp, int flag, int argc,
-				   char * const argv[])
+static int do_zynqmp_verify_secure(struct cmd_tbl *cmdtp, int flag, int argc,
+				   char *const argv[])
 {
 	u64 src_addr, addr;
 	u32 len, src_lo, src_hi;
@@ -65,8 +66,8 @@ static int do_zynqmp_verify_secure(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-static int do_zynqmp_mmio_read(cmd_tbl_t *cmdtp, int flag, int argc,
-			       char * const argv[])
+static int do_zynqmp_mmio_read(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	u32 read_val, addr;
 	int ret;
@@ -86,8 +87,8 @@ static int do_zynqmp_mmio_read(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-static int do_zynqmp_mmio_write(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_zynqmp_mmio_write(struct cmd_tbl *cmdtp, int flag, int argc,
+				char *const argv[])
 {
 	u32 addr, mask, val;
 	int ret;
@@ -107,8 +108,8 @@ static int do_zynqmp_mmio_write(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 
 #ifdef CONFIG_DEFINE_TCM_OCM_MMAP
-static int do_zynqmp_tcm_init(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_zynqmp_tcm_init(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	u8 mode;
 
@@ -129,7 +130,7 @@ static int do_zynqmp_tcm_init(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 #endif
 
-static cmd_tbl_t cmd_zynqmp_sub[] = {
+static struct cmd_tbl cmd_zynqmp_sub[] = {
 	U_BOOT_CMD_MKENT(secure, 5, 0, do_zynqmp_verify_secure, "", ""),
 	U_BOOT_CMD_MKENT(mmio_read, 3, 0, do_zynqmp_mmio_read, "", ""),
 	U_BOOT_CMD_MKENT(mmio_write, 5, 0, do_zynqmp_mmio_write, "", ""),
@@ -149,10 +150,10 @@ static cmd_tbl_t cmd_zynqmp_sub[] = {
  *
  * Return: return 0 on success and CMD_RET_USAGE incase of misuse and error
  */
-static int do_zynqmp(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_zynqmp(struct cmd_tbl *cmdtp, int flag, int argc,
 		     char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
board/xilinx/zynqmp/zynqmp.c +2 -1
index 6aad1352c4..7a8c745f9b 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <debug_uart.h>
 #include <env.h>
@@ -415,7 +416,7 @@ int board_early_init_r(void)
 }
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
-			 char * const argv[])
+			 char *const argv[])
 {
 	int ret = 0;
 
cmd/ab_select.c +3 -2
index 7a4e51571b..6298fcfb60 100644
@@ -6,10 +6,11 @@
 #include <common.h>
 #include <android_ab.h>
 #include <command.h>
+#include <env.h>
 #include <part.h>
 
-static int do_ab_select(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_ab_select(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	int ret;
 	struct blk_desc *dev_desc;
cmd/abootimg.c +16 -15
index 15e727f4a2..40e8978f15 100644
@@ -6,6 +6,7 @@
 
 #include <android_image.h>
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <mapmem.h>
 
@@ -15,7 +16,7 @@
 /* Please use abootimg_addr() macro to obtain the boot image address */
 static ulong _abootimg_addr = -1;
 
-static int abootimg_get_ver(int argc, char * const argv[])
+static int abootimg_get_ver(int argc, char *const argv[])
 {
 	const struct andr_img_hdr *hdr;
 	int res = CMD_RET_SUCCESS;
@@ -40,7 +41,7 @@ exit:
 	return res;
 }
 
-static int abootimg_get_recovery_dtbo(int argc, char * const argv[])
+static int abootimg_get_recovery_dtbo(int argc, char *const argv[])
 {
 	ulong addr;
 	u32 size;
@@ -62,7 +63,7 @@ static int abootimg_get_recovery_dtbo(int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int abootimg_get_dtb_load_addr(int argc, char * const argv[])
+static int abootimg_get_dtb_load_addr(int argc, char *const argv[])
 {
 	const struct andr_img_hdr *hdr;
 	int res = CMD_RET_SUCCESS;
@@ -93,7 +94,7 @@ exit:
 	return res;
 }
 
-static int abootimg_get_dtb_by_index(int argc, char * const argv[])
+static int abootimg_get_dtb_by_index(int argc, char *const argv[])
 {
 	const char *index_str;
 	u32 num;
@@ -140,7 +141,7 @@ static int abootimg_get_dtb_by_index(int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int abootimg_get_dtb(int argc, char * const argv[])
+static int abootimg_get_dtb(int argc, char *const argv[])
 {
 	if (argc < 1)
 		return CMD_RET_USAGE;
@@ -151,8 +152,8 @@ static int abootimg_get_dtb(int argc, char * const argv[])
 	return CMD_RET_USAGE;
 }
 
-static int do_abootimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
-			    char * const argv[])
+static int do_abootimg_addr(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	char *endp;
 	ulong img_addr;
@@ -170,8 +171,8 @@ static int do_abootimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_abootimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_abootimg_get(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	const char *param;
 
@@ -193,8 +194,8 @@ static int do_abootimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_USAGE;
 }
 
-static int do_abootimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
-			    char * const argv[])
+static int do_abootimg_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
@@ -209,16 +210,16 @@ static int do_abootimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_abootimg_sub[] = {
+static struct cmd_tbl cmd_abootimg_sub[] = {
 	U_BOOT_CMD_MKENT(addr, 2, 1, do_abootimg_addr, "", ""),
 	U_BOOT_CMD_MKENT(dump, 2, 1, do_abootimg_dump, "", ""),
 	U_BOOT_CMD_MKENT(get, 5, 1, do_abootimg_get, "", ""),
 };
 
-static int do_abootimg(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_abootimg(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	cp = find_cmd_tbl(argv[1], cmd_abootimg_sub,
 			  ARRAY_SIZE(cmd_abootimg_sub));
cmd/acpi.c +2 -2
index 203bd93bd5..e9a9161a91 100644
@@ -137,7 +137,7 @@ static int list_rsdp(struct acpi_rsdp *rsdp)
 	return 0;
 }
 
-static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_acpi_list(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	struct acpi_rsdp *rsdp;
@@ -153,7 +153,7 @@ static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_acpi_dump(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_acpi_dump(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	const char *name;
cmd/adc.c +4 -4
index 381961cf51..16f914a030 100644
@@ -8,7 +8,7 @@
 #include <dm.h>
 #include <adc.h>
 
-static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_list(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	struct udevice *dev;
@@ -31,7 +31,7 @@ static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_info(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	struct udevice *dev;
@@ -68,7 +68,7 @@ static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	struct udevice *dev;
@@ -95,7 +95,7 @@ static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adc_scan(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_scan(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	struct adc_channel ch[ADC_MAX_CHANNEL];
cmd/adtimg.c +14 -12
index 60bb01c349..aa943007f3 100644
@@ -5,6 +5,7 @@
  * Eugeniu Rosca <[email protected]>
  */
 
+#include <command.h>
 #include <env.h>
 #include <image-android-dt.h>
 #include <common.h>
@@ -17,8 +18,8 @@
  */
 static ulong working_img;
 
-static int do_adtimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_adtimg_addr(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	char *endp;
 	ulong hdr_addr;
@@ -56,8 +57,8 @@ static int adtimg_check_working_img(void)
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_adtimg_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 1)
 		return CMD_RET_USAGE;
@@ -99,7 +100,7 @@ static int adtimg_getopt_u32(char * const opt, char * const name, u32 *optval)
 	return CMD_RET_SUCCESS;
 }
 
-static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
+static int adtimg_getopt_index(int argc, char *const argv[], u32 *index,
 			       char **avar, char **svar)
 {
 	int ret;
@@ -124,7 +125,7 @@ static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
 	return CMD_RET_SUCCESS;
 }
 
-static int adtimg_get_dt_by_index(int argc, char * const argv[])
+static int adtimg_get_dt_by_index(int argc, char *const argv[])
 {
 	ulong addr;
 	u32 index, size;
@@ -163,7 +164,7 @@ static int adtimg_get_dt_by_index(int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int adtimg_get_dt(int argc, char * const argv[])
+static int adtimg_get_dt(int argc, char *const argv[])
 {
 	if (argc < 2) {
 		printf("Error: No options passed to '%s'\n", argv[0]);

Lines of this file are not shown. View the raw message.

cmd/aes.c +1 -1
index 8c5b42fd2c..4c0dad9932 100644

Lines of this file are not shown. View the raw message.

cmd/arm/exception.c +7 -7
index 33bc75976f..522f6dff53 100644

Lines of this file are not shown. View the raw message.

cmd/arm/exception64.c +3 -3
index a363818532..d5de50a080 100644

Lines of this file are not shown. View the raw message.

cmd/armflash.c +1 -1
index f82f3dd1a3..5e7315eb7c 100644

Lines of this file are not shown. View the raw message.

cmd/avb.c +22 -18
index a4de5c40a2..398ad3ba97 100644

Lines of this file are not shown. View the raw message.

cmd/axi.c +12 -10
index 588098fddd..18533efc0d 100644

Lines of this file are not shown. View the raw message.

cmd/bcb.c +15 -15
index b944e62b6a..d99a698012 100644

Lines of this file are not shown. View the raw message.

cmd/bdinfo.c +14 -14
index ec399c07ae..dba552b03f 100644

Lines of this file are not shown. View the raw message.

cmd/bedbug.c +16 -8
index d3e31212ea..425ba4af1f 100644

Lines of this file are not shown. View the raw message.

cmd/bind.c +3 -2
index 44a5f17f0d..068b1399ab 100644

Lines of this file are not shown. View the raw message.

cmd/binop.c +2 -1
index 6d2df5f3dd..c85cb51568 100644

Lines of this file are not shown. View the raw message.

cmd/blk_common.c +2 -1
index cc6e161ba0..87f94b5abb 100644

Lines of this file are not shown. View the raw message.

cmd/blkcache.c +9 -8
index 2cc65a9ee7..25f252e455 100644

Lines of this file are not shown. View the raw message.

cmd/blob.c +2 -1
index 80478b8802..c80e6977b4 100644

Lines of this file are not shown. View the raw message.

cmd/bmp.c +7 -5
index edf4f56426..0ad23231cb 100644

Lines of this file are not shown. View the raw message.

cmd/boot.c +2 -2
index 9150fce80b..36aba22b30 100644

Lines of this file are not shown. View the raw message.

cmd/bootcount.c +8 -8
index c358418ebe..654bbb805c 100644

Lines of this file are not shown. View the raw message.

cmd/bootefi.c +2 -1
index b0ba7316fb..e7cce785d1 100644

Lines of this file are not shown. View the raw message.

cmd/booti.c +3 -3
index 4fff8cfcf6..ead2332631 100644

Lines of this file are not shown. View the raw message.

cmd/bootm.c +13 -10
index 931d53f0c7..d5f877cb54 100644

Lines of this file are not shown. View the raw message.

cmd/bootmenu.c +1 -1
index f1562883f5..c89fb1f5b8 100644

Lines of this file are not shown. View the raw message.

cmd/bootstage.c +10 -9
index f1ea4e9598..0e623f216b 100644

Lines of this file are not shown. View the raw message.

cmd/bootz.c +3 -3
index f14a5fefbf..ac15856f8d 100644

Lines of this file are not shown. View the raw message.

cmd/btrfs.c +1 -1
index faa1239cc8..7e3cbe12ce 100644

Lines of this file are not shown. View the raw message.

cmd/cache.c +4 -2
index 7678615dd8..b68d45b98b 100644

Lines of this file are not shown. View the raw message.

cmd/cbfs.c +4 -4
index 98e652a4e7..8e91d4bb8c 100644

Lines of this file are not shown. View the raw message.

cmd/clk.c +4 -4
index 74ad868500..439736d072 100644

Lines of this file are not shown. View the raw message.

cmd/cls.c +1 -1
index f1ce6e8df1..eab4e6993b 100644

Lines of this file are not shown. View the raw message.

cmd/config.c +2 -1
index d2810d573b..cf30841a35 100644

Lines of this file are not shown. View the raw message.

cmd/conitrace.c +2 -2
index 85c5422b7e..e45e87a64c 100644

Lines of this file are not shown. View the raw message.

cmd/console.c +2 -1
index 3f1d98b17b..9a1db83c7c 100644

Lines of this file are not shown. View the raw message.

cmd/cpu.c +6 -6
index 8c0abc1756..ff553c16c4 100644

Lines of this file are not shown. View the raw message.

cmd/cramfs.c +3 -2
index ad232deae0..1aeb56702c 100644

Lines of this file are not shown. View the raw message.

cmd/cros_ec.c +4 -3
index c6bbed9c4a..3c7dd4db9b 100644

Lines of this file are not shown. View the raw message.

cmd/dataflash_mmc_mux.c +2 -1
index 9f271b6f61..73876e9464 100644

Lines of this file are not shown. View the raw message.

cmd/date.c +2 -1
index 7fa950a902..75a032cd27 100644

Lines of this file are not shown. View the raw message.

cmd/demo.c +12 -10
index 52c6e7ec15..9da06f5e4d 100644

Lines of this file are not shown. View the raw message.

cmd/dfu.c +2 -1
index b30f8a5667..7310595a02 100644

Lines of this file are not shown. View the raw message.

cmd/diag.c +1 -1
index 8d21c7dde8..f51536dbfa 100644

Lines of this file are not shown. View the raw message.

cmd/disk.c +1 -1
index da0660148c..dbd08a06b2 100644

Lines of this file are not shown. View the raw message.

cmd/dm.c +11 -11
index 7a90685f8b..4e307ac524 100644

Lines of this file are not shown. View the raw message.

cmd/echo.c +2 -1
index 5b018d9349..d02a4cfd58 100644

Lines of this file are not shown. View the raw message.

cmd/eeprom.c +2 -2
index 792415ef93..f61a5510e8 100644

Lines of this file are not shown. View the raw message.

cmd/efi.c +5 -4
index ea239a01f0..c7640c862e 100644

Lines of this file are not shown. View the raw message.

cmd/efidebug.c +34 -34

68 lines not on this page · raw message

cmd/elf.c +3 -3
index 0d6d2ce604..4f2969a6d9 100644

Lines of this file are not shown. View the raw message.

cmd/ethsw.c +3 -2
index d178a0c10d..f8b8a798bf 100644

Lines of this file are not shown. View the raw message.

cmd/exit.c +2 -1
index f40d0686e1..7bf241ec73 100644

Lines of this file are not shown. View the raw message.

cmd/ext2.c +5 -2
index dc56ab25ff..57a99516a6 100644

Lines of this file are not shown. View the raw message.

cmd/ext4.c +4 -6
index d2fa7f1db1..4791b69fd9 100644

Lines of this file are not shown. View the raw message.

cmd/fastboot.c +2 -1
index 1b4215114d..4f35108a36 100644

Lines of this file are not shown. View the raw message.

cmd/fat.c +13 -10
index a063a623ce..b438ce16c9 100644

Lines of this file are not shown. View the raw message.

cmd/fdt.c +2 -2
index f66ceca2c7..99b1b5b3fc 100644

Lines of this file are not shown. View the raw message.

cmd/fitupd.c +2 -1
index 1e5edd9f9b..f6270d9c15 100644

Lines of this file are not shown. View the raw message.

cmd/flash.c +6 -3
index df97fe740d..452b040dbc 100644

Lines of this file are not shown. View the raw message.

cmd/fpga.c +21 -20

41 lines not on this page · raw message

cmd/fpgad.c +1 -1
index 0d55453eaa..fb2fe63e78 100644

Lines of this file are not shown. View the raw message.

cmd/fs.c +12 -11
index db74767b7b..3a0c465c15 100644

Lines of this file are not shown. View the raw message.

cmd/fs_uuid.c +2 -2
index 02ae9b7f3c..5dc94aa640 100644

Lines of this file are not shown. View the raw message.

cmd/fuse.c +2 -1
index 42d74fa883..e001619d17 100644

Lines of this file are not shown. View the raw message.

cmd/gettime.c +2 -2
index 863bd87590..2e74e02b49 100644

Lines of this file are not shown. View the raw message.

cmd/gpio.c +2 -1
index 408a942455..24053e6ad9 100644

Lines of this file are not shown. View the raw message.

cmd/gpt.c +1 -1
index c2964d8508..05f5f943a8 100644

Lines of this file are not shown. View the raw message.

cmd/hash.c +2 -1
index dff943ac9f..e163cd6774 100644

Lines of this file are not shown. View the raw message.

cmd/help.c +5 -4
index a1a0b99b6f..8d67d977bf 100644

Lines of this file are not shown. View the raw message.

cmd/host.c +19 -18
index eefc4f255e..cd9c9677f0 100644

Lines of this file are not shown. View the raw message.

cmd/i2c.c +37 -24

61 lines not on this page · raw message

cmd/ide.c +2 -2
index 2f93ba7904..b78c38e159 100644

Lines of this file are not shown. View the raw message.

cmd/ini.c +1 -1
index 0c425262d0..c075be623c 100644

Lines of this file are not shown. View the raw message.

cmd/io.c +2 -2
index 7fee9674a2..c7e964153b 100644

Lines of this file are not shown. View the raw message.

cmd/iotrace.c +3 -3
index fa6c68b198..652ebefb89 100644

Lines of this file are not shown. View the raw message.

cmd/irq.c +3 -3
index 52d06b3eed..1d3e28cb3c 100644

Lines of this file are not shown. View the raw message.

cmd/itest.c +2 -1
index e21e1f1b1b..a0cf4bee04 100644

Lines of this file are not shown. View the raw message.

cmd/jffs2.c +5 -3
index 748a73e2af..bb4790402e 100644

Lines of this file are not shown. View the raw message.

cmd/led.c +1 -1
index 50ffa509ab..9433fa886c 100644

Lines of this file are not shown. View the raw message.

cmd/legacy_led.c +1 -1
index 7d40d8db58..86cd969e40 100644

Lines of this file are not shown. View the raw message.

cmd/license.c +2 -1
index c5b04c331b..15411b5a92 100644

Lines of this file are not shown. View the raw message.

cmd/load.c +6 -5
index 36db571cea..85e5540f2c 100644

Lines of this file are not shown. View the raw message.

cmd/log.c +9 -8
index 1e3936aeeb..664f7bd7ac 100644

Lines of this file are not shown. View the raw message.

cmd/lzmadec.c +2 -1
index e3b9cc75ac..3b8db0a853 100644

Lines of this file are not shown. View the raw message.

cmd/mac.c +2 -1
index 4227d10936..a39e1168a5 100644

Lines of this file are not shown. View the raw message.

cmd/md5sum.c +3 -2
index 4e30334951..5ae3ddf85f 100644

Lines of this file are not shown. View the raw message.

cmd/mdio.c +2 -1
index 22c8fbe856..c48bb51237 100644

Lines of this file are not shown. View the raw message.

cmd/mem.c +38 -22

60 lines not on this page · raw message

cmd/mfsl.c +3 -3
index 583762a345..31f5b36ade 100644

Lines of this file are not shown. View the raw message.

cmd/mii.c +1 -1
index 23ee1e6cfa..b52a55dc33 100644

Lines of this file are not shown. View the raw message.

cmd/misc.c +4 -2
index a1eef72a6c..d33219308b 100644

Lines of this file are not shown. View the raw message.

cmd/mmc.c +62 -49

111 lines not on this page · raw message

cmd/mp.c +1 -1
index 4c8f5fc3fa..c2b5235a37 100644

Lines of this file are not shown. View the raw message.

cmd/mtd.c +9 -8
index f407c5e445..485a963bdd 100644

Lines of this file are not shown. View the raw message.

cmd/mtdparts.c +4 -3
index b40c2afadd..9fca08562b 100644

Lines of this file are not shown. View the raw message.

cmd/mvebu/bubt.c +1 -1
index c5af669d0d..a27b0df8ae 100644

Lines of this file are not shown. View the raw message.

cmd/nand.c +6 -5
index c42ab24ec0..92d039af8f 100644

Lines of this file are not shown. View the raw message.

cmd/net.c +22 -16
index 282b38ccf9..25390b0474 100644

Lines of this file are not shown. View the raw message.

cmd/nvedit.c +32 -30

62 lines not on this page · raw message

cmd/nvedit_efi.c +7 -5
index 75e4e51495..29cad38e19 100644

Lines of this file are not shown. View the raw message.

cmd/nvme.c +2 -1
index 9ae91ce9cb..e715c570a3 100644

Lines of this file are not shown. View the raw message.

cmd/onenand.c +21 -12
index d97844fa7a..216458bb47 100644

Lines of this file are not shown. View the raw message.

cmd/osd.c +14 -13
index 0b1fa49936..bdad5d8e96 100644

Lines of this file are not shown. View the raw message.

cmd/part.c +8 -7
index 4b2e06e615..216f14bf5d 100644

Lines of this file are not shown. View the raw message.

cmd/pcap.c +10 -10
index 980603f7bd..d0172f3fff 100644

Lines of this file are not shown. View the raw message.

cmd/pci.c +1 -1
index b2174e2a9c..f91a4eb8ed 100644

Lines of this file are not shown. View the raw message.

cmd/pinmux.c +10 -7
index de909a163d..9942b15419 100644

Lines of this file are not shown. View the raw message.

cmd/pmc.c +7 -5
index cafeba9fcc..9a3ba2bffc 100644

Lines of this file are not shown. View the raw message.

cmd/pmic.c +14 -9
index 2400bfb601..3bda0534a3 100644

Lines of this file are not shown. View the raw message.

cmd/pxe.c +10 -9
index bce6728875..6372fc9871 100644

Lines of this file are not shown. View the raw message.

cmd/pxe_utils.c +15 -13
index 8fc33670c8..ba4bb6347e 100644

Lines of this file are not shown. View the raw message.

cmd/pxe_utils.h +5 -5
index a38ac81a47..77d2588875 100644

Lines of this file are not shown. View the raw message.

cmd/qfw.c +10 -9
index af826627a2..bb571487f0 100644

Lines of this file are not shown. View the raw message.

cmd/read.c +1 -1
index 7977e9d847..34f53f9a29 100644

Lines of this file are not shown. View the raw message.

cmd/reginfo.c +2 -2
index de94dd8071..c8a04b1754 100644

Lines of this file are not shown. View the raw message.

cmd/regulator.c +22 -13
index ed8d778c82..aa06c9a9fc 100644

Lines of this file are not shown. View the raw message.

cmd/reiser.c +2 -2
index 28e827796b..3db926f806 100644

Lines of this file are not shown. View the raw message.

cmd/remoteproc.c +7 -7
index da6f3fc8cc..e8b9178e74 100644

Lines of this file are not shown. View the raw message.

cmd/riscv/exception.c +3 -3
index 547fb7d132..3c8dbbec0e 100644

Lines of this file are not shown. View the raw message.

cmd/rng.c +1 -1
index 76367fed94..9747c11be4 100644

Lines of this file are not shown. View the raw message.

cmd/rockusb.c +2 -1
index 9b70c6a6af..f181ec6111 100644

Lines of this file are not shown. View the raw message.

cmd/sata.c +2 -1
index c507e9dbd8..aa396c1bbd 100644

Lines of this file are not shown. View the raw message.

cmd/sb.c +7 -6
index 5701e03797..f7eb921f43 100644

Lines of this file are not shown. View the raw message.

cmd/scsi.c +4 -2
index e81194de0f..5f710d2895 100644

Lines of this file are not shown. View the raw message.

cmd/setexpr.c +2 -1
index 0182f19938..1d81ecfa6a 100644

Lines of this file are not shown. View the raw message.

cmd/sf.c +8 -7
index 69e0d46a55..367df576b8 100644

Lines of this file are not shown. View the raw message.

cmd/sha1sum.c +1 -1
index 3c50fc27ce..bcc665a5a6 100644

Lines of this file are not shown. View the raw message.

cmd/smccc.c +2 -1
index 8b1475c2fe..0b19f6c68c 100644

Lines of this file are not shown. View the raw message.

cmd/sound.c +8 -5
index 638f29df21..7fc19678ea 100644

Lines of this file are not shown. View the raw message.

cmd/source.c +2 -1
index 92f8f77ee6..5b0b79aadb 100644

Lines of this file are not shown. View the raw message.

cmd/spi.c +1 -1
index bfa185b6ae..aec912167c 100644

Lines of this file are not shown. View the raw message.

cmd/spl.c +8 -7
index 61256f4830..b8e0aa4253 100644

Lines of this file are not shown. View the raw message.

cmd/strings.c +1 -1
index 41b1665926..85fdc34f08 100644

Lines of this file are not shown. View the raw message.

cmd/sysboot.c +8 -4
index 793d67d2f5..af6a2f1b7f 100644

Lines of this file are not shown. View the raw message.

cmd/terminal.c +1 -1
index e1ec66ed71..f6e4d2539e 100644

Lines of this file are not shown. View the raw message.

cmd/test.c +6 -3
index 258bfd8806..dd49d0e00a 100644

Lines of this file are not shown. View the raw message.

cmd/thordown.c +2 -1
index 8dae024e31..ae20dddfdd 100644

Lines of this file are not shown. View the raw message.

cmd/ti/ddr3.c +3 -2
index a452fe7876..756aa9eb3e 100644

Lines of this file are not shown. View the raw message.

cmd/time.c +2 -1
index 51cde9749f..db8c1892df 100644

Lines of this file are not shown. View the raw message.

cmd/tlv_eeprom.c +1 -1
index b5f293ba7f..eab0531c96 100644

Lines of this file are not shown. View the raw message.

cmd/tpm-common.c +5 -5
index 3014255229..88c9e08e31 100644

Lines of this file are not shown. View the raw message.

cmd/tpm-user-utils.h +5 -4
index a851d9c4af..358ddff576 100644

Lines of this file are not shown. View the raw message.

cmd/tpm-v1.c +43 -42

85 lines not on this page · raw message

cmd/tpm-v2.c +22 -21

43 lines not on this page · raw message

cmd/tpm_test.c +6 -5
index 2cde517d7a..a6a4636ef6 100644

Lines of this file are not shown. View the raw message.

cmd/trace.c +4 -4
index 392b129536..4ce47c7627 100644

Lines of this file are not shown. View the raw message.

cmd/tsi148.c +1 -1
index 369a2b5ab3..25f98acdf7 100644

Lines of this file are not shown. View the raw message.

cmd/ubi.c +1 -1
index 54d128dbc5..171377cc66 100644

Lines of this file are not shown. View the raw message.

cmd/ubifs.c +9 -8
index e4000b7ad1..e798b833dd 100644

Lines of this file are not shown. View the raw message.

cmd/ufs.c +1 -1
index 5b25788656..858cd49b59 100644

Lines of this file are not shown. View the raw message.

cmd/universe.c +1 -1
index dc9a8b5617..5ff47dde4f 100644

Lines of this file are not shown. View the raw message.

cmd/unlz4.c +2 -1
index 5320b378d3..4ae7f34d36 100644

Lines of this file are not shown. View the raw message.

cmd/unzip.c +4 -3
index 725624627c..9b28328a1d 100644

Lines of this file are not shown. View the raw message.

cmd/usb.c +3 -2
index 858be726a4..b9ec29a845 100644

Lines of this file are not shown. View the raw message.

cmd/usb_gadget_sdp.c +2 -1
index 2ead06be9f..1af82e1136 100644

Lines of this file are not shown. View the raw message.

cmd/usb_mass_storage.c +2 -2
index b603730248..a117ab213a 100644

Lines of this file are not shown. View the raw message.

cmd/version.c +2 -1
index b2fffe9977..3686b87332 100644

Lines of this file are not shown. View the raw message.

cmd/virtio.c +2 -1
index f38cc56598..3dace5344f 100644

Lines of this file are not shown. View the raw message.

cmd/w1.c +1 -1
index 9c95fcf9cd..92be1f2531 100644

Lines of this file are not shown. View the raw message.

cmd/wdt.c +6 -6
index 647d9899b4..27410981e7 100644

Lines of this file are not shown. View the raw message.

cmd/wol.c +1 -1
index 8a756f373c..f0d6343227 100644

Lines of this file are not shown. View the raw message.

cmd/x86/exception.c +3 -3
index ade1e2ea92..82faaa913e 100644

Lines of this file are not shown. View the raw message.

cmd/x86/fsp.c +4 -4
index 6e485fb144..8017eda387 100644

Lines of this file are not shown. View the raw message.

cmd/x86/hob.c +1 -1
index 29d9e3d5a2..6b1f7bda5b 100644

Lines of this file are not shown. View the raw message.

cmd/x86/mtrr.c +4 -2
index d3fd959235..2c40e711a1 100644

Lines of this file are not shown. View the raw message.

cmd/ximg.c +1 -1
index 73c764255f..159ba51648 100644

Lines of this file are not shown. View the raw message.

cmd/yaffs2.c +14 -14
index 9244606bda..f29ebcc026 100644

Lines of this file are not shown. View the raw message.

cmd/zfs.c +4 -3
index 2b622a8f53..e429ac88d7 100644

Lines of this file are not shown. View the raw message.

cmd/zip.c +1 -1
index 8ef46e9815..b433f1889f 100644

Lines of this file are not shown. View the raw message.

common/board_r.c +2 -2
index a47b60a7a9..4e7edac29d 100644

Lines of this file are not shown. View the raw message.

common/bootm.c +14 -13
index 96cba01589..c3b3ee371c 100644

Lines of this file are not shown. View the raw message.

common/bootm_os.c +23 -23

46 lines not on this page · raw message

common/cli.c +2 -2
index e5e5894b2f..6635ab2bcf 100644

Lines of this file are not shown. View the raw message.

common/cli_hush.c +2 -2
index a62af07cc5..5b1f119074 100644

Lines of this file are not shown. View the raw message.

common/cli_readline.c +1 -0
index 6ef7a3e564..1f1e28c6d8 100644

Lines of this file are not shown. View the raw message.

common/command.c +39 -36

75 lines not on this page · raw message

common/dfu.c +1 -0
index da6289b218..cd60f9a1e2 100644

Lines of this file are not shown. View the raw message.

common/exports.c +1 -0
index 18af38a5f6..6253b55694 100644

Lines of this file are not shown. View the raw message.

common/flash.c +4 -4
index 4a28ac5d34..cde648d4b8 100644

Lines of this file are not shown. View the raw message.

common/hash.c +2 -2
index 810854ce0f..34f00890b4 100644

Lines of this file are not shown. View the raw message.

common/image-fdt.c +2 -2
index 270732278e..1d2263de5d 100644

Lines of this file are not shown. View the raw message.

common/image.c +7 -6
index 6a24abf6ff..9e4e23cac4 100644

Lines of this file are not shown. View the raw message.

common/kgdb.c +1 -1
index daf53bed7a..312e14960a 100644

Lines of this file are not shown. View the raw message.

common/lcd_console.c +3 -2
index d34bc2fa83..ad5f307af4 100644

Lines of this file are not shown. View the raw message.

doc/README.commands +6 -6
index 4e9e8098fa..716ad227aa 100644

Lines of this file are not shown. View the raw message.

doc/README.standalone +1 -1
index 28ebde1dec..874ca2f7c6 100644

Lines of this file are not shown. View the raw message.

drivers/clk/mpc83xx_clk.c +3 -1
index 4183db2845..fa519a4430 100644

Lines of this file are not shown. View the raw message.

drivers/ddr/fsl/interactive.c +1 -0
index 8e171e67fe..8c82d524a3 100644

Lines of this file are not shown. View the raw message.

drivers/firmware/psci.c +2 -1
index 394f30fa88..572abfa536 100644

Lines of this file are not shown. View the raw message.

drivers/gpio/pca953x.c +5 -3
index fda8054d53..4ab8cee2d1 100644

Lines of this file are not shown. View the raw message.

drivers/gpio/tca642x.c +5 -3
index 730460a999..463cfe879a 100644

Lines of this file are not shown. View the raw message.

drivers/misc/altera_sysid.c +1 -1
index eff33f7343..387c70b070 100644

Lines of this file are not shown. View the raw message.

drivers/misc/ds4510.c +3 -3
index bf20a833ec..0b37e8a4e4 100644

Lines of this file are not shown. View the raw message.

drivers/misc/rockchip-efuse.c +2 -2
index 2520c6a38e..46ce6305fe 100644

Lines of this file are not shown. View the raw message.

drivers/net/e1000.c +3 -2
index 7e98449cfa..82b1db3fb3 100644

Lines of this file are not shown. View the raw message.

drivers/net/e1000.h +2 -2
index 2ae3085515..19ed4777d9 100644

Lines of this file are not shown. View the raw message.

drivers/net/e1000_spi.c +11 -10
index 52b3c79794..dcb561ff79 100644

Lines of this file are not shown. View the raw message.

drivers/net/fsl-mc/mc.c +2 -1
index da0815a46f..39824094f9 100644

Lines of this file are not shown. View the raw message.

drivers/net/pfe_eth/pfe_cmd.c +8 -7
index dd8c68d57d..bae5f8a479 100644

Lines of this file are not shown. View the raw message.

drivers/net/phy/b53.c +4 -3
index 30c4812d82..f039f895c8 100644

Lines of this file are not shown. View the raw message.

drivers/net/phy/mv88e6352.c +4 -3
index 6fe08b80c1..a27a9cc03e 100644

Lines of this file are not shown. View the raw message.

drivers/net/vsc9953.c +1 -0
index f17839c70f..93eb2b158c 100644

Lines of this file are not shown. View the raw message.

drivers/power/axp152.c +1 -1
index 361be6c31c..d6e36125c1 100644

Lines of this file are not shown. View the raw message.

drivers/power/axp209.c +1 -1
index 67b420910c..60f69ec27a 100644

Lines of this file are not shown. View the raw message.

drivers/power/axp221.c +1 -1
index c440047d36..3446fe7365 100644

Lines of this file are not shown. View the raw message.

drivers/power/axp809.c +2 -1
index 7de92f4f61..6323492b66 100644

Lines of this file are not shown. View the raw message.

drivers/power/axp818.c +2 -1
index 834919ddd4..0531707c8a 100644

Lines of this file are not shown. View the raw message.

drivers/power/mt6323.c +1 -1
index 566be5f39e..f5b27548d3 100644

Lines of this file are not shown. View the raw message.

drivers/power/power_core.c +3 -1
index 095d8a51be..5a18dedada 100644

Lines of this file are not shown. View the raw message.

drivers/power/twl4030.c +2 -1
index 42c9001518..4cc261aced 100644

Lines of this file are not shown. View the raw message.

drivers/qe/qe.c +1 -1
index fbad124b51..61ca4760c8 100644

Lines of this file are not shown. View the raw message.

drivers/ram/stm32mp1/stm32mp1_interactive.c +6 -5
index 805c9ddaad..47e176b282 100644

Lines of this file are not shown. View the raw message.

drivers/sysreset/sysreset-uclass.c +3 -2
index 51fdb1055e..9e990339a6 100644

Lines of this file are not shown. View the raw message.

drivers/sysreset/sysreset_mpc83xx.c +1 -0
index 9092764e0b..39f4671fad 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/f_fastboot.c +1 -0
index fc27dbe8de..d1be3f5e13 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/f_rockusb.c +1 -0
index da3d63c0f0..0c4c83f89d 100644

Lines of this file are not shown. View the raw message.

drivers/video/cfb_console.c +3 -1
index 5442bac4c6..8918d83723 100644

Lines of this file are not shown. View the raw message.

drivers/video/lg4573.c +3 -2
index 997e854ef8..74a2388924 100644

Lines of this file are not shown. View the raw message.

drivers/video/vidconsole-uclass.c +3 -2
index 8e0fc7f3ec..dd6786ffae 100644

Lines of this file are not shown. View the raw message.

examples/api/demo.c +1 -1
index e7523786b4..d586174ce8 100644

Lines of this file are not shown. View the raw message.

examples/api/libgenwrap.c +2 -1
index 769dcc7038..51d6273a93 100644

Lines of this file are not shown. View the raw message.

examples/standalone/atmel_df_pow2.c +1 -1
index b7bd243730..b71b406126 100644

Lines of this file are not shown. View the raw message.

examples/standalone/hello_world.c +1 -1
index 1f61bb4777..263cd9ca07 100644

Lines of this file are not shown. View the raw message.

examples/standalone/smc91111_eeprom.c +1 -1
index 5ffefc8f36..a43d14f396 100644

Lines of this file are not shown. View the raw message.

examples/standalone/smc911x_eeprom.c +1 -1
index 8acfcb9a0b..9bd9a6efa3 100644

Lines of this file are not shown. View the raw message.

examples/standalone/stubs.c +2 -0
index 0827bde35e..5fb460454f 100644

Lines of this file are not shown. View the raw message.

fs/fs.c +15 -14
index 061917a984..5591c65eaa 100644

Lines of this file are not shown. View the raw message.

include/_exports.h +1 -1
index 0dee05f077..1e9ba86108 100644

Lines of this file are not shown. View the raw message.

include/bedbug/type.h +4 -1
index 3754c7f2b2..f7a719caf0 100644

Lines of this file are not shown. View the raw message.

include/blk.h +1 -1
index 6f541bb2ba..abcd4bedbb 100644

Lines of this file are not shown. View the raw message.

include/bootm.h +9 -7
index edeeacb0df..1e7f29e134 100644

Lines of this file are not shown. View the raw message.

include/command.h +64 -53

117 lines not on this page · raw message

include/cpu_func.h +1 -1
index f701f02bfe..8aa825daa4 100644

Lines of this file are not shown. View the raw message.

include/exception.h +7 -5
index fc02490223..a7f21e73d7 100644

Lines of this file are not shown. View the raw message.

include/exports.h +1 -0
index cbd16fc518..85f9a7a708 100644

Lines of this file are not shown. View the raw message.

include/ext_common.h +10 -8
index 1c10c50474..bc3324172a 100644

Lines of this file are not shown. View the raw message.

include/fs.h +21 -18
index 9fdb4a3424..29f737b8c2 100644

Lines of this file are not shown. View the raw message.

include/fsl_ddr.h +3 -1
index 2476f40c56..025d7a1e74 100644

Lines of this file are not shown. View the raw message.

include/fsl_validate.h +7 -7
index 06951fccf4..252d499e7b 100644

Lines of this file are not shown. View the raw message.

include/hash.h +4 -2
index f4019a9791..835962e7f6 100644

Lines of this file are not shown. View the raw message.

include/image.h +7 -7
index de55b2fb57..ad81dad444 100644

Lines of this file are not shown. View the raw message.

include/kgdb.h +1 -1
index b6ba742ad3..616ce4451f 100644

Lines of this file are not shown. View the raw message.

include/log.h +4 -2
index ffc739b560..df65398c04 100644

Lines of this file are not shown. View the raw message.

include/net.h +2 -2
index 3ef212dd00..00a8ec0c78 100644

Lines of this file are not shown. View the raw message.

include/search.h +1 -1
index 8f87dc72ce..bca36d3abc 100644

Lines of this file are not shown. View the raw message.

include/test/suites.h +17 -12
index 213e3cee77..f120b3a82a 100644

Lines of this file are not shown. View the raw message.

include/test/ut.h +1 -0
index b05d719ed0..7ddd6e8872 100644

Lines of this file are not shown. View the raw message.

include/tpm-common.h +9 -7
index 702cd6e93b..e29b10b176 100644

Lines of this file are not shown. View the raw message.

include/vxworks.h +2 -1
index 10c5e116d5..c2585e61ce 100644

Lines of this file are not shown. View the raw message.

lib/dhry/cmd_dhry.c +2 -1
index 29504833ef..d55ab54df9 100644

Lines of this file are not shown. View the raw message.

lib/efi_loader/efi_variable.c +1 -0
index b58963fa1d..c357ebe7d0 100644

Lines of this file are not shown. View the raw message.

lib/fdtdec_test.c +3 -2
index e8bfd1fb1e..e0c6e0971c 100644

Lines of this file are not shown. View the raw message.

lib/hashtable.c +1 -1
index f82f2463cf..e3be563565 100644

Lines of this file are not shown. View the raw message.

lib/uuid.c +2 -1
index f94c6abd29..e62d5ca264 100644

Lines of this file are not shown. View the raw message.

net/arp.c +1 -0
index 4b12b699d0..8fc744d932 100644

Lines of this file are not shown. View the raw message.

net/fastboot.c +1 -0
index 8afc5529cd..0c57fb9947 100644

Lines of this file are not shown. View the raw message.

test/bloblist.c +2 -1
index bdcca0291c..4e537ee1b9 100644

Lines of this file are not shown. View the raw message.

test/cmd_ut.c +8 -6
index bd20a69c55..cc9543c315 100644

Lines of this file are not shown. View the raw message.

test/command_ut.c +3 -1
index 8e268e5ee5..d6e6777bd4 100644

Lines of this file are not shown. View the raw message.

test/compression.c +2 -1
index bceb2c273c..0b57b7bb40 100644

Lines of this file are not shown. View the raw message.

test/dm/test-main.c +1 -1
index d7dc8d1f91..62a0c692c8 100644

Lines of this file are not shown. View the raw message.

test/env/cmd_ut_env.c +1 -1
index ad67dbe792..a440b1bfb0 100644

Lines of this file are not shown. View the raw message.

test/lib/cmd_ut_lib.c +1 -1
index c73e8d7b05..f5c7bf3d3b 100644

Lines of this file are not shown. View the raw message.

test/log/log_test.c +2 -1
index febc2c1252..d29b559410 100644

Lines of this file are not shown. View the raw message.

test/log/test-main.c +1 -1
index 855de47f33..faf920d8e9 100644

Lines of this file are not shown. View the raw message.

test/optee/cmd_ut_optee.c +1 -1
index 092710326a..01f829756f 100644

Lines of this file are not shown. View the raw message.

test/overlay/cmd_ut_overlay.c +1 -1
index c8d41a4dca..da05079596 100644

Lines of this file are not shown. View the raw message.

test/print_ut.c +2 -1
index a3b9974ad2..1cc2a7b8f1 100644

Lines of this file are not shown. View the raw message.

test/str_ut.c +1 -1
index 7c8015050a..ef1205dbbd 100644

Lines of this file are not shown. View the raw message.

test/time_ut.c +1 -1
index 40a19a50d9..70a866b441 100644

Lines of this file are not shown. View the raw message.

test/unicode_ut.c +1 -1
index 4d99c20bc0..9939480ed9 100644

Lines of this file are not shown. View the raw message.

tools/proftool.c +1 -1
index fecb9d6e99..ea7d07a277 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.26.2.645.ge9eca65c58-goog

Part of the diff is not shown here. View the raw message.

#27 lore raw

PATCH v3 12/22 command: Remove the cmd_tbl_t typedef

Quoted 10 lines · Simon Glass

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/c20efcc0/attachment.sig>
#28 lore raw

PATCH v3 13/22 Fix some checkpatch warnings in calls to debug()

In reply to Simon Glass

Fix up some incorrect code style in calls to functions in the log.h header, mostly debug().

---

Changes in v3: None
Changes in v2:
- Split out code-style changes for log functions into a new patch

 arch/powerpc/lib/bootm.c                | 10 +++++-----
 board/freescale/mpc8568mds/mpc8568mds.c |  2 +-
 board/sbc8641d/sbc8641d.c               |  2 +-
 cmd/flash.c                             | 19 +++++++++----------
 cmd/source.c                            | 10 +++++-----
 common/flash.c                          |  6 +++---
 drivers/rtc/m41t11.c                    | 12 ++++++------
 7 files changed, 30 insertions(+), 31 deletions(-)
arch/powerpc/lib/bootm.c +5 -5
index 59062ca654..a9bcb6614f 100644
@@ -53,8 +53,8 @@ static void boot_jump_linux(bootm_headers_t *images)
 
 	kernel = (void (*)(bd_t *, ulong, ulong, ulong,
 			   ulong, ulong, ulong))images->ep;
-	debug ("## Transferring control to Linux (at address %08lx) ...\n",
-		(ulong)kernel);
+	debug("## Transferring control to Linux (at address %08lx) ...\n",
+	      (ulong)kernel);
 
 	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 
@@ -81,7 +81,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 		 *   r8: 0
 		 *   r9: 0
 		 */
-		debug ("   Booting using OF flat tree...\n");
+		debug("   Booting using OF flat tree...\n");
 		WATCHDOG_RESET ();
 		(*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC,
 			   env_get_bootm_mapsize(), 0, 0);
@@ -105,7 +105,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 		ulong initrd_end = images->initrd_end;
 		bd_t *kbd = images->kbd;
 
-		debug ("   Booting using board info...\n");
+		debug("   Booting using board info...\n");
 		WATCHDOG_RESET ();
 		(*kernel) (kbd, initrd_start, initrd_end,
 			   cmd_start, cmd_end, 0, 0);
@@ -149,7 +149,7 @@ void arch_lmb_reserve(struct lmb *lmb)
 	 * pointer.
 	 */
 	sp = get_sp();
-	debug ("## Current stack ends at 0x%08lx\n", sp);
+	debug("## Current stack ends at 0x%08lx\n", sp);
 
 	/* adjust sp by 4K to be safe */
 	sp -= 4096;
board/freescale/mpc8568mds/mpc8568mds.c +1 -1
index da97495664..3e804c85c4 100644
@@ -303,7 +303,7 @@ void pci_init_board(void)
 	porpllsr = in_be32(&gur->porpllsr);
 	io_sel = (pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;
 
-	debug ("   pci_init_board: devdisr=%x, io_sel=%x\n", devdisr, io_sel);
+	debug("   %s: devdisr=%x, io_sel=%x\n", __func__, devdisr, io_sel);
 
 	pci_speed = 66666000;
 	pci_32 = 1;
board/sbc8641d/sbc8641d.c +1 -1
index d053eaeec3..4163fd2ccf 100644
@@ -49,7 +49,7 @@ int dram_init(void)
 	dram_size = fixed_sdram ();
 #endif
 
-	debug ("    DDR: ");
+	debug("    DDR: ");
 	gd->ram_size = dram_size;
 
 	return 0;
cmd/flash.c +9 -10
index 452b040dbc..77979e4412 100644
@@ -411,13 +411,12 @@ int flash_sect_erase(ulong addr_first, ulong addr_last)
 		     ++bank, ++info) {
 			if (s_first[bank]>=0) {
 				erased += s_last[bank] - s_first[bank] + 1;
-				debug ("Erase Flash from 0x%08lx to 0x%08lx "
-					"in Bank # %ld ",
-					info->start[s_first[bank]],
-					(s_last[bank] == info->sector_count) ?
-						info->start[0] + info->size - 1:
-						info->start[s_last[bank]+1] - 1,
-					bank+1);
+				debug("Erase Flash from 0x%08lx to 0x%08lx in Bank # %ld ",
+				      info->start[s_first[bank]],
+				      (s_last[bank] == info->sector_count) ?
+				      info->start[0] + info->size - 1 :
+				      info->start[s_last[bank] + 1] - 1,
+				      bank + 1);
 				rcode = flash_erase(info, s_first[bank],
 						    s_last[bank]);
 			}
@@ -612,9 +611,9 @@ int flash_sect_protect(int p, ulong addr_first, ulong addr_last)
 			}
 
 			if (s_first[bank]>=0 && s_first[bank]<=s_last[bank]) {
-				debug ("%sProtecting sectors %d..%d in bank %ld\n",
-					p ? "" : "Un-",
-					s_first[bank], s_last[bank], bank+1);
+				debug("%sProtecting sectors %d..%d in bank %ld\n",
+				      p ? "" : "Un-", s_first[bank],
+				      s_last[bank], bank + 1);
 				protected += s_last[bank] - s_first[bank] + 1;
 				for (i=s_first[bank]; i<=s_last[bank]; ++i) {
 #if defined(CONFIG_SYS_FLASH_PROTECTION)
cmd/source.c +5 -5
index 5b0b79aadb..cd58924eeb 100644
@@ -154,7 +154,7 @@ int image_source_script(ulong addr, const char *fit_uname)
 		return 1;
 	}
 
-	debug ("** Script length: %ld\n", len);
+	debug("** Script length: %ld\n", len);
 	return run_command_list((char *)data, len, 0);
 }
 
@@ -170,16 +170,16 @@ static int do_source(struct cmd_tbl *cmdtp, int flag, int argc,
 	/* Find script image */
 	if (argc < 2) {
 		addr = CONFIG_SYS_LOAD_ADDR;
-		debug ("*  source: default load address = 0x%08lx\n", addr);
+		debug("*  source: default load address = 0x%08lx\n", addr);
 #if defined(CONFIG_FIT)
 	} else if (fit_parse_subimage(argv[1], image_load_addr, &addr,
 				      &fit_uname)) {
-		debug ("*  source: subimage '%s' from FIT image at 0x%08lx\n",
-				fit_uname, addr);
+		debug("*  source: subimage '%s' from FIT image at 0x%08lx\n",
+		      fit_uname, addr);
 #endif
 	} else {
 		addr = simple_strtoul(argv[1], NULL, 16);
-		debug ("*  source: cmdline image address = 0x%08lx\n", addr);
+		debug("*  source: cmdline image address = 0x%08lx\n", addr);
 	}
 
 	printf ("## Executing script@%08lx\n", addr);
common/flash.c +3 -3
index cde648d4b8..115062a45c 100644
@@ -41,7 +41,7 @@ flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 
 	debug("%s %s: from 0x%08lX to 0x%08lX\n", __func__,
 	      (flag & FLAG_PROTECT_SET) ? "ON" :
-		      (flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
+	      (flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
 	      from, to);
 
 	/* There is nothing to do if we have no data about the flash
@@ -67,7 +67,7 @@ flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 #else
 				info->protect[i] = 0;
 #endif	/* CONFIG_SYS_FLASH_PROTECTION */
-				debug ("protect off %d\n", i);
+				debug("protect off %d\n", i);
 			}
 			else if (flag & FLAG_PROTECT_SET) {
 #if defined(CONFIG_SYS_FLASH_PROTECTION)
@@ -75,7 +75,7 @@ flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 #else
 				info->protect[i] = 1;
 #endif	/* CONFIG_SYS_FLASH_PROTECTION */
-				debug ("protect on %d\n", i);
+				debug("protect on %d\n", i);
 			}
 		}
 	}
drivers/rtc/m41t11.c +6 -6
index 960348bb3e..b09d08d65c 100644
@@ -109,9 +109,9 @@ int rtc_get (struct rtc_time *tmp)
 	tmp->tm_yday = 0;
 	tmp->tm_isdst= 0;
 
-	debug ( "Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
-		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
-		tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+	debug("Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
+	      tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
+	      tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
 
 	return rel;
 }
@@ -120,9 +120,9 @@ int rtc_set (struct rtc_time *tmp)
 {
 	uchar data[RTC_REG_CNT];
 
-	debug ( "Set DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
-		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
-		tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+	debug("Set DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
+	      tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
+	      tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
 
 	data[RTC_SEC_ADDR]    = bin2bcd(tmp->tm_sec) &  0x7F;/*just in case*/
 	data[RTC_MIN_ADDR]    = bin2bcd(tmp->tm_min);
Signature · 1 line
2.26.2.645.ge9eca65c58-goog
#29 lore raw

PATCH v3 13/22 Fix some checkpatch warnings in calls to debug()

Quoted 4 lines · Simon Glass

Fix up some incorrect code style in calls to functions in the log.h header, mostly debug().

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/856fb611/attachment.sig>