From patchwork Thu Apr 9 20:14:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 237577 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Thu, 9 Apr 2020 14:14:56 -0600 Subject: [PATCH v2 12/22] command: Remove the cmd_tbl_t typedef In-Reply-To: <20200409201506.133129-1-sjg@chromium.org> References: <20200409201506.133129-1-sjg@chromium.org> Message-ID: <20200409141439.v2.12.I125b806669195c049161db769507356be46c47f7@changeid> We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass --- 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/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 | 3 +- board/freescale/imx8mn_evk/imx8mn_evk.c | 1 + board/freescale/imx8mn_evk/spl.c | 3 +- board/freescale/imx8mp_evk/imx8mp_evk.c | 1 + board/freescale/imx8mp_evk/spl.c | 3 +- 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 | 3 +- board/varisys/common/sys_eeprom.c | 2 +- .../work_92105/work_92105_display.c | 6 +- .../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/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 | 60 ++++----- 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 | 22 ++-- 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 | 56 +++++---- cmd/mfsl.c | 6 +- cmd/mii.c | 2 +- cmd/misc.c | 6 +- cmd/mmc.c | 109 +++++++++------- 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/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 | 25 ++-- 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/optee/cmd_ut_optee.c | 2 +- test/overlay/cmd_ut_overlay.c | 2 +- test/print_ut.c | 3 +- test/time_ut.c | 2 +- test/unicode_ut.c | 2 +- tools/proftool.c | 2 +- 456 files changed, 1963 insertions(+), 1512 deletions(-) diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 9fa6aaf3b2d..8f611efb561 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c index 30dd4b5238b..fbb56ec83af 100644 --- a/arch/arc/lib/reset.c +++ b/arch/arc/lib/reset.c @@ -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"); diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c index 4c45810fbe3..e6fff5b2207 100644 --- a/arch/arm/cpu/arm1136/mx35/generic.c +++ b/arch/arm/cpu/arm1136/mx35/generic.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -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); diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index 72988417ac8..d742c0f1516 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -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); diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c index f5192240e4d..21065410746 100644 --- a/arch/arm/cpu/arm926ejs/spear/cpu.c +++ b/arch/arm/cpu/arm926ejs/spear/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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) diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c index d5be646555e..998423b6525 100644 --- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c +++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c @@ -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; diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index da43e34394c..fd2ab37a8fe 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -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); diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c index d143864af1c..07a47d51e44 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c index 4ef2a302785..31536b81811 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c @@ -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(); diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index 769917679e5..8ae49715789 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -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 */ diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 1d2a84a3b04..1c21ab2a9dc 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -419,7 +419,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 */ diff --git a/arch/arm/lib/cmd_boot.c b/arch/arm/lib/cmd_boot.c index 03dde842528..c905ecc4bd9 100644 --- a/arch/arm/lib/cmd_boot.c +++ b/arch/arm/lib/cmd_boot.c @@ -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; diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c index 835a40e59d9..65b4be20b81 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -21,6 +21,7 @@ */ #include +#include #include #include @@ -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(); diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index 2658026cf49..1b365a970fa 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/arm/lib/semihosting.c @@ -13,6 +13,7 @@ */ #include #include +#include #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; diff --git a/arch/arm/mach-imx/cmd_bmode.c b/arch/arm/mach-imx/cmd_bmode.c index 2d4d6efe5ab..19bfd9f9a03 100644 --- a/arch/arm/mach-imx/cmd_bmode.c +++ b/arch/arm/mach-imx/cmd_bmode.c @@ -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); diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c index 1b111ba26b1..5f21d2b1c50 100644 --- a/arch/arm/mach-imx/cmd_dek.c +++ b/arch/arm/mach-imx/cmd_dek.c @@ -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; diff --git a/arch/arm/mach-imx/cmd_hdmidet.c b/arch/arm/mach-imx/cmd_hdmidet.c index 6aa7d82577d..e2571adfb00 100644 --- a/arch/arm/mach-imx/cmd_hdmidet.c +++ b/arch/arm/mach-imx/cmd_hdmidet.c @@ -3,11 +3,13 @@ * Copyright (C) 2012 Boundary Devices Inc. */ #include +#include #include #include #include -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; diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c index b3e59b1b003..327b3ed5e8f 100644 --- a/arch/arm/mach-imx/cmd_nandbcb.c +++ b/arch/arm/mach-imx/cmd_nandbcb.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index 30db820b565..d0757d8b66a 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c index cf3c7d762a7..9eeb2e6d39b 100644 --- a/arch/arm/mach-imx/imx8/ahab.c +++ b/arch/arm/mach-imx/imx8/ahab.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -150,8 +151,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; @@ -251,8 +252,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; @@ -298,8 +299,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; diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c index aad9cf13ef2..714b6d333a0 100644 --- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c +++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -740,8 +741,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; diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c index ec0da1164f3..ca823e68616 100644 --- a/arch/arm/mach-imx/imx_bootaux.c +++ b/arch/arm/mach-imx/imx_bootaux.c @@ -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; diff --git a/arch/arm/mach-imx/mx5/clock.c b/arch/arm/mach-imx/mx5/clock.c index 2fabdd2eae8..09c4c896647 100644 --- a/arch/arm/mach-imx/mx5/clock.c +++ b/arch/arm/mach-imx/mx5/clock.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c index 6a9e673ca27..9f3d62fa413 100644 --- a/arch/arm/mach-imx/mx6/clock.c +++ b/arch/arm/mach-imx/mx6/clock.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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); diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c index 75be4f8ad79..f5520374f1c 100644 --- a/arch/arm/mach-imx/mx7/clock.c +++ b/arch/arm/mach-imx/mx7/clock.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -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); diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c index 3c0bcccd0dc..a987ff22dfd 100644 --- a/arch/arm/mach-imx/mx7ulp/clock.c +++ b/arch/arm/mach-imx/mx7ulp/clock.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c index 667826b9f67..7165d666e5e 100644 --- a/arch/arm/mach-keystone/cmd_clock.c +++ b/arch/arm/mach-keystone/cmd_clock.c @@ -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 "
\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; diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c index 8142039040a..049d5734734 100644 --- a/arch/arm/mach-keystone/cmd_mon.c +++ b/arch/arm/mach-keystone/cmd_mon.c @@ -12,8 +12,8 @@ #include 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); diff --git a/arch/arm/mach-keystone/cmd_poweroff.c b/arch/arm/mach-keystone/cmd_poweroff.c index 89b18516cdf..f0ad9173b96 100644 --- a/arch/arm/mach-keystone/cmd_poweroff.c +++ b/arch/arm/mach-keystone/cmd_poweroff.c @@ -12,7 +12,7 @@ #include #include -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); diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c index 23ff06466dd..9ab6b53adbe 100644 --- a/arch/arm/mach-keystone/ddr3.c +++ b/arch/arm/mach-keystone/ddr3.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index 1d79927ac74..efaabca5a7e 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c index dacc897533c..725897a0ec7 100644 --- a/arch/arm/mach-meson/sm.c +++ b/arch/arm/mach-meson/sm.c @@ -6,6 +6,8 @@ */ #include +#include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c index b893fb732e0..f08c8ab43a0 100644 --- a/arch/arm/mach-omap2/omap3/board.c +++ b/arch/arm/mach-omap2/omap3/board.c @@ -16,6 +16,7 @@ * */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index 28b929f84f3..edfb40f00bf 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c index 7598fe4c43d..349c0648a6d 100644 --- a/arch/arm/mach-rockchip/boot_mode.c +++ b/arch/arm/mach-rockchip/boot_mode.c @@ -5,6 +5,8 @@ #include #include +#include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c index 08b7d3519de..21ca9dedce7 100644 --- a/arch/arm/mach-rockchip/cpu-info.c +++ b/arch/arm/mach-rockchip/cpu-info.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c index 812f3bd5f31..804abe8a1b7 100644 --- a/arch/arm/mach-rockchip/rk3288/rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c @@ -3,6 +3,7 @@ * Copyright (c) 2016 Rockchip Electronics Co., Ltd */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c index 0a6025fffac..a4a97b6a0fc 100644 --- a/arch/arm/mach-socfpga/clock_manager.c +++ b/arch/arm/mach-socfpga/clock_manager.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c index 557305c7036..ac2b891fade 100644 --- a/arch/arm/mach-socfpga/misc.c +++ b/arch/arm/mach-socfpga/misc.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c index f1f26e7c943..f191085a12d 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32key.c +++ b/arch/arm/mach-stm32mp/cmd_stm32key.c @@ -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; diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c index b2252f36219..110d441d9bc 100644 --- a/arch/arm/mach-tegra/cmd_enterrcm.c +++ b/arch/arm/mach-tegra/cmd_enterrcm.c @@ -25,13 +25,14 @@ */ #include +#include #include #include #include #include -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); diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.c b/arch/arm/mach-uniphier/boot-device/boot-device.c index 83f8c6a428c..777946970b0 100644 --- a/arch/arm/mach-uniphier/boot-device/boot-device.c +++ b/arch/arm/mach-uniphier/boot-device/boot-device.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c index 9a25bba5997..a6c0735198b 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c index a616a2aafb7..476c5b35823 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-uniphier/mmc-first-dev.c b/arch/arm/mach-uniphier/mmc-first-dev.c index e2f4f4eb5c7..7f29b6bccd4 100644 --- a/arch/arm/mach-uniphier/mmc-first-dev.c +++ b/arch/arm/mach-uniphier/mmc-first-dev.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c index fbb551151ab..cc07db48319 100644 --- a/arch/arm/mach-zynqmp/mp.c +++ b/arch/arm/mach-zynqmp/mp.c @@ -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); diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c index 1590d4a9543..200c53eaf35 100644 --- a/arch/m68k/cpu/mcf5227x/cpu.c +++ b/arch/m68k/cpu/mcf5227x/cpu.c @@ -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); diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c index 225bdc2d257..d521a8a2e41 100644 --- a/arch/m68k/cpu/mcf523x/cpu.c +++ b/arch/m68k/cpu/mcf523x/cpu.c @@ -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; diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c index 1f70d90f0b2..8c91e0e193b 100644 --- a/arch/m68k/cpu/mcf52x2/cpu.c +++ b/arch/m68k/cpu/mcf52x2/cpu.c @@ -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); diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c index bef9047b358..0659bf65581 100644 --- a/arch/m68k/cpu/mcf530x/cpu.c +++ b/arch/m68k/cpu/mcf530x/cpu.c @@ -5,13 +5,14 @@ */ #include +#include #include #include #include #include #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); diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c index 52b64a94a71..87b77f42def 100644 --- a/arch/m68k/cpu/mcf532x/cpu.c +++ b/arch/m68k/cpu/mcf532x/cpu.c @@ -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); diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c index cb1514c6005..2608fdd76f1 100644 --- a/arch/m68k/cpu/mcf5445x/cpu.c +++ b/arch/m68k/cpu/mcf5445x/cpu.c @@ -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); diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c index 2a64c7b6f65..59cdfe70e48 100644 --- a/arch/m68k/cpu/mcf547x_8x/cpu.c +++ b/arch/m68k/cpu/mcf547x_8x/cpu.c @@ -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); diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index c36ee79c923..b912d130d6a 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -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; diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index 910c5968848..a6a52f85270 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -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; diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c index 070c12cce9e..c633e83853e 100644 --- a/arch/microblaze/cpu/spl.c +++ b/arch/microblaze/cpu/spl.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -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"); diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 592ac97f827..93f95b1e26f 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -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"); diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c index 682bee6be2c..7d5c9fd83ae 100644 --- a/arch/mips/cpu/cpu.c +++ b/arch/mips/cpu/cpu.c @@ -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(); diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 8a65912ceaf..8b98f566e57 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -303,8 +303,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) diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c index 09bdc253ae2..5d0d4550db5 100644 --- a/arch/mips/mach-ath79/ar934x/clk.c +++ b/arch/mips/mach-ath79/ar934x/clk.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -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); diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c index 0660fffa45f..c3efa31f594 100644 --- a/arch/nds32/cpu/n1213/ae3xx/cpu.c +++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c @@ -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"); diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c index 3ae87a21bb9..9d99c83bf3a 100644 --- a/arch/nds32/cpu/n1213/ag101/cpu.c +++ b/arch/nds32/cpu/n1213/ag101/cpu.c @@ -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(); diff --git a/arch/nds32/lib/boot.c b/arch/nds32/lib/boot.c index c50e8e51687..da2fd36a16c 100644 --- a/arch/nds32/lib/boot.c +++ b/arch/nds32/lib/boot.c @@ -9,7 +9,7 @@ #include unsigned long do_go_exec(ulong (*entry)(int, char * const []), - int argc, char * const argv[]) + int argc, char *const argv[]) { cleanup_before_linux(); diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c index 9008db6aa51..756535a0b45 100644 --- a/arch/nios2/cpu/cpu.c +++ b/arch/nios2/cpu/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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 */ diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c index e9d1ff911be..90cabb67571 100644 --- a/arch/nios2/cpu/interrupts.c +++ b/arch/nios2/cpu/interrupts.c @@ -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; diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index bec18fe28f6..fed412907fc 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -6,12 +6,14 @@ #include #include +#include #include #include #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"); diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index f0e3ada1952..0307039f372 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -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 diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c index a6eb7cb97cb..1343dd3d3a3 100644 --- a/arch/powerpc/cpu/mpc83xx/ecc.c +++ b/arch/powerpc/cpu/mpc83xx/ecc.c @@ -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 diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c index e83895deabb..8d525dc8373 100644 --- a/arch/powerpc/cpu/mpc83xx/interrupts.c +++ b/arch/powerpc/cpu/mpc83xx/interrupts.c @@ -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[]) { } diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index e2fc0b1e8a2..5c14aa1f32e 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -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]; diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c index d3167f6cb9d..ff73596ba90 100644 --- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c +++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c @@ -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; diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index eff0d5d7e20..10c4bb91d7d 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -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) || \ diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c index 6f539d26776..43f7919b04c 100644 --- a/arch/powerpc/cpu/mpc85xx/interrupts.c +++ b/arch/powerpc/cpu/mpc85xx/interrupts.c @@ -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; } diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 9757bffe025..0f8c8cd6677 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -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; diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index 97b93f02131..fe35744b708 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -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; diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c index eb8e73e41c6..8e4a66d23e4 100644 --- a/arch/powerpc/cpu/mpc86xx/interrupts.c +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c @@ -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; } diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c index 07c4c079df3..08d11ad4f2e 100644 --- a/arch/powerpc/cpu/mpc86xx/mp.c +++ b/arch/powerpc/cpu/mpc86xx/mp.c @@ -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 */ diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 9d6c08f17a0..1b7c7fa01b8 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -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; diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c index 442c01ac6f4..e5b62e9f4ac 100644 --- a/arch/powerpc/cpu/mpc8xx/immap.c +++ b/arch/powerpc/cpu/mpc8xx/immap.c @@ -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; diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 8aec8c9fd3b..59062ca654e 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -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; diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c index f580c023e58..4a3e26cffc0 100644 --- a/arch/powerpc/lib/kgdb.c +++ b/arch/powerpc/lib/kgdb.c @@ -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\ diff --git a/arch/riscv/lib/boot.c b/arch/riscv/lib/boot.c index 42b15a13a23..778d011f7ce 100644 --- a/arch/riscv/lib/boot.c +++ b/arch/riscv/lib/boot.c @@ -8,7 +8,7 @@ #include unsigned long do_go_exec(ulong (*entry)(int, char * const []), - int argc, char * const argv[]) + int argc, char *const argv[]) { cleanup_before_linux(); diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index d2f7ddcd2d1..5213b68eb66 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -111,7 +111,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 */ @@ -133,7 +133,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); diff --git a/arch/riscv/lib/reset.c b/arch/riscv/lib/reset.c index ce3c1cf872b..8779c619cc5 100644 --- a/arch/riscv/lib/reset.c +++ b/arch/riscv/lib/reset.c @@ -7,7 +7,7 @@ #include #include -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"); diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index e94e980c0e5..f032d88159d 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -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); diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c index 5f14a04ab41..dc94f837856 100644 --- a/arch/sh/lib/bootm.c +++ b/arch/sh/lib/bootm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -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; diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c index 602776a4742..c38f0933f89 100644 --- a/arch/sh/lib/zimageboot.c +++ b/arch/sh/lib/zimageboot.c @@ -10,11 +10,14 @@ */ #include +#include +#include #include #include #include -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; diff --git a/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h b/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h index a3bde3d8e75..f2260ae90e8 100644 --- a/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h +++ b/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h @@ -7,6 +7,8 @@ #ifndef __FSP_VPD_H__ #define __FSP_VPD_H__ +#include + struct __packed memory_upd { u64 signature; /* Offset 0x0020 */ u8 revision; /* Offset 0x0028 */ diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 0837655e124..1569d30f8ed 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -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) diff --git a/arch/x86/lib/cmd_boot.c b/arch/x86/lib/cmd_boot.c index 9fce021c796..baaf3d13ad4 100644 --- a/arch/x86/lib/cmd_boot.c +++ b/arch/x86/lib/cmd_boot.c @@ -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; diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c index b23b8fd4021..40ba7fcfec7 100644 --- a/arch/x86/lib/interrupts.c +++ b/arch/x86/lib/interrupts.c @@ -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; diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 9b5e767ccc2..9e899ddcbae 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index 2b4853f8f91..3656cf4cbc4 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index a667413bfc8..1d05e40c209 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -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; diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c index 8b97e1a533f..dbd8b5755da 100644 --- a/board/LaCie/net2big_v2/net2big_v2.c +++ b/board/LaCie/net2big_v2/net2big_v2.c @@ -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); } diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c index f9bf5277397..011cc563d19 100644 --- a/board/LaCie/netspace_v2/netspace_v2.c +++ b/board/LaCie/netspace_v2/netspace_v2.c @@ -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); } diff --git a/board/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c index bd6eefd7735..a120c3123ff 100644 --- a/board/Synology/ds414/cmd_syno.c +++ b/board/Synology/ds414/cmd_syno.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c index 772e21b9c51..6168dc92205 100644 --- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c +++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/amlogic/sei510/sei510.c b/board/amlogic/sei510/sei510.c index 70fe3559f62..5a5148ea68e 100644 --- a/board/amlogic/sei510/sei510.c +++ b/board/amlogic/sei510/sei510.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/amlogic/sei610/sei610.c b/board/amlogic/sei610/sei610.c index 3c44fba5161..27dba935824 100644 --- a/board/amlogic/sei610/sei610.c +++ b/board/amlogic/sei610/sei610.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c index 3a59b51c1c7..14931120f6f 100644 --- a/board/aristainetos/aristainetos.c +++ b/board/aristainetos/aristainetos.c @@ -9,6 +9,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index fd2a229bf74..42d83c5c4d5 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 8e29fd0095c..92a7a2fc6e6 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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); diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 6afb6bbdb5c..712ef116667 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c index ea2f2bade00..f01ead4e235 100644 --- a/board/cavium/thunderx/atf.c +++ b/board/cavium/thunderx/atf.c @@ -4,6 +4,7 @@ **/ #include +#include #include #include @@ -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; diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c index 23c2ea91862..192af304d9f 100644 --- a/board/corscience/tricorder/tricorder-eeprom.c +++ b/board/corscience/tricorder/tricorder-eeprom.c @@ -5,6 +5,7 @@ * Andreas Bie?mann */ #include +#include #include #include #include @@ -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); diff --git a/board/egnite/ethernut5/ethernut5_pwrman.c b/board/egnite/ethernut5/ethernut5_pwrman.c index aa99d29c21a..7dbb6e8f2bb 100644 --- a/board/egnite/ethernut5/ethernut5_pwrman.c +++ b/board/egnite/ethernut5/ethernut5_pwrman.c @@ -32,6 +32,7 @@ * http://www.ethernut.de/ */ #include +#include #include #include #include @@ -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; diff --git a/board/esd/vme8349/caddy.c b/board/esd/vme8349/caddy.c index db8d7bfe9b3..ba91f4b3c84 100644 --- a/board/esd/vme8349/caddy.c +++ b/board/esd/vme8349/caddy.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/freescale/c29xpcie/cpld.c b/board/freescale/c29xpcie/cpld.c index f57047d1d39..b864a60c446 100644 --- a/board/freescale/c29xpcie/cpld.c +++ b/board/freescale/c29xpcie/cpld.c @@ -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; diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c index 36b620ca23a..638aa3c19a4 100644 --- a/board/freescale/common/cmd_esbc_validate.c +++ b/board/freescale/common/cmd_esbc_validate.c @@ -8,8 +8,8 @@ #include #include -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; diff --git a/board/freescale/common/ngpixis.c b/board/freescale/common/ngpixis.c index d7254010bff..37a6f775a05 100644 --- a/board/freescale/common/ngpixis.c +++ b/board/freescale/common/ngpixis.c @@ -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; diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c index e9b71278333..4127fbc1396 100644 --- a/board/freescale/common/pixis.c +++ b/board/freescale/common/pixis.c @@ -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; diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c index dd1ee90b3c7..591203132f9 100644 --- a/board/freescale/common/qixis.c +++ b/board/freescale/common/qixis.c @@ -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; diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index 7c301c8545e..b0edc4dfdee 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -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; diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index 20852476dd5..dfc6a91d1af 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -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; diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c index 0e249f1bc8d..60767a0b7fe 100644 --- a/board/freescale/imx8mm_evk/imx8mm_evk.c +++ b/board/freescale/imx8mm_evk/imx8mm_evk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c index 77b768aef03..9b97d1e5dc8 100644 --- a/board/freescale/imx8mm_evk/spl.c +++ b/board/freescale/imx8mm_evk/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -164,7 +165,7 @@ void board_init_f(ulong dummy) board_init_r(NULL, 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[]) { puts ("resetting ...\n"); diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c index 8bd54ea2aa6..ea02bb75f41 100644 --- a/board/freescale/imx8mn_evk/imx8mn_evk.c +++ b/board/freescale/imx8mn_evk/imx8mn_evk.c @@ -4,6 +4,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index 4795e2a4e3d..0a1f0291fc6 100644 --- a/board/freescale/imx8mn_evk/spl.c +++ b/board/freescale/imx8mn_evk/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -117,7 +118,7 @@ void board_init_f(ulong dummy) board_init_r(NULL, 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[]) { puts("resetting ...\n"); diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c index aa5100f5bf6..97ba15645a2 100644 --- a/board/freescale/imx8mp_evk/imx8mp_evk.c +++ b/board/freescale/imx8mp_evk/imx8mp_evk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index cc600fd693b..430ce5f4ffe 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -152,7 +153,7 @@ void board_init_f(ulong dummy) board_init_r(NULL, 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[]) { puts("resetting ...\n"); diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index fc929c441c2..5b814f7abf5 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index acf146de4d6..c7f7baa8e67 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -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; diff --git a/board/freescale/ls1043ardb/cpld.c b/board/freescale/ls1043ardb/cpld.c index 00c70b1e49d..5d2e8015a05 100644 --- a/board/freescale/ls1043ardb/cpld.c +++ b/board/freescale/ls1043ardb/cpld.c @@ -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; diff --git a/board/freescale/ls1046ardb/cpld.c b/board/freescale/ls1046ardb/cpld.c index a65751986a1..548601a5ae1 100644 --- a/board/freescale/ls1046ardb/cpld.c +++ b/board/freescale/ls1046ardb/cpld.c @@ -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; diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c index ef8b4916100..c6db690f560 100644 --- a/board/freescale/p1010rdb/p1010rdb.c +++ b/board/freescale/p1010rdb/p1010rdb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -554,8 +555,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; diff --git a/board/freescale/p2041rdb/cpld.c b/board/freescale/p2041rdb/cpld.c index 3037ef89f11..b042fe3bcbc 100644 --- a/board/freescale/p2041rdb/cpld.c +++ b/board/freescale/p2041rdb/cpld.c @@ -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; diff --git a/board/freescale/t102xrdb/cpld.c b/board/freescale/t102xrdb/cpld.c index 2b640e0450e..47c3b1627e3 100644 --- a/board/freescale/t102xrdb/cpld.c +++ b/board/freescale/t102xrdb/cpld.c @@ -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; diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index 601c2ecadfa..561f5bf8f88 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -305,8 +305,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; diff --git a/board/freescale/t104xrdb/cpld.c b/board/freescale/t104xrdb/cpld.c index f9c8ab3752e..ac34095f3b6 100644 --- a/board/freescale/t104xrdb/cpld.c +++ b/board/freescale/t104xrdb/cpld.c @@ -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; diff --git a/board/freescale/t208xrdb/cpld.c b/board/freescale/t208xrdb/cpld.c index 9a9b9d8e779..b9ba62adffc 100644 --- a/board/freescale/t208xrdb/cpld.c +++ b/board/freescale/t208xrdb/cpld.c @@ -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; diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index 1d449afb2a3..877a9a6e2ff 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -869,9 +869,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; diff --git a/board/freescale/t4rdb/cpld.c b/board/freescale/t4rdb/cpld.c index 470b5f91549..d484509bc20 100644 --- a/board/freescale/t4rdb/cpld.c +++ b/board/freescale/t4rdb/cpld.c @@ -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; diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index 0fcb605e1b9..94e28b3f550 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c index 5e9cf115752..a833657b152 100644 --- a/board/gateworks/gw_ventana/eeprom.c +++ b/board/gateworks/gw_ventana/eeprom.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c index 068f8cd9e73..6d9565ccfe7 100644 --- a/board/gateworks/gw_ventana/gsc.c +++ b/board/gateworks/gw_ventana/gsc.c @@ -5,6 +5,7 @@ * Author: Tim Harvey */ +#include #include #include #include @@ -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); diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c index 7aad6831273..0d53d69ecc9 100644 --- a/board/gdsys/a38x/controlcenterdc.c +++ b/board/gdsys/a38x/controlcenterdc.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c index fa50ad28303..daade6da0af 100644 --- a/board/gdsys/a38x/hydra.c +++ b/board/gdsys/a38x/hydra.c @@ -1,4 +1,5 @@ #include +#include #include /* ctrlc */ #include @@ -89,7 +90,7 @@ void hydra_initialize(void) #define REFL_PATTERN (0xdededede) #define REFL_PATTERN_INV (~REFL_PATTERN) -int do_hydrate(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_hydrate(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint k = 0; void __iomem *pcie2_base = (void __iomem *)(MVEBU_REG_PCIE_BASE + diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c index 05a14ff1038..88ab8233d5c 100644 --- a/board/gdsys/common/cmd_ioloop.c +++ b/board/gdsys/common/cmd_ioloop.c @@ -264,7 +264,7 @@ static void io_reflect(struct udevice *dev) * Syntax: * ioreflect {fpga} {reportrate} */ -int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioreflect(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint fpga; uint rate = 0; @@ -321,7 +321,7 @@ int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * Syntax: * ioreflect {reportrate} */ -int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioreflect(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *fpga; struct regmap *map; @@ -374,7 +374,7 @@ int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * Syntax: * ioloop {fpga} {size} {rate} */ -int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint fpga; uint size; @@ -440,7 +440,7 @@ int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * Syntax: * ioloop {size} {rate} */ -int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint size; uint rate = 0; @@ -501,7 +501,7 @@ int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ #ifndef CONFIG_GDSYS_LEGACY_DRIVERS -int do_iodev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_iodev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *ioep = NULL; struct udevice *board; diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c index 10c43291469..cda0cc6b482 100644 --- a/board/gdsys/common/osd.c +++ b/board/gdsys/common/osd.c @@ -7,6 +7,7 @@ #ifdef CONFIG_GDSYS_LEGACY_DRIVERS #include +#include #include #include @@ -259,7 +260,8 @@ static int osd_write_videomem(unsigned screen, unsigned offset, return charcount; } -static int osd_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int osd_print(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned screen; @@ -396,7 +398,7 @@ int osd_probe(unsigned screen) return 0; } -int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int osd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned screen; @@ -449,7 +451,7 @@ int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -int osd_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int osd_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned screen; unsigned x; @@ -500,4 +502,4 @@ U_BOOT_CMD( ") size_y(max. " __stringify(MAX_Y_CHARS) ")\n" ); -#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ \ No newline at end of file +#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ diff --git a/board/gdsys/common/osd_cmd.c b/board/gdsys/common/osd_cmd.c index 53179b98113..fe6249794e7 100644 --- a/board/gdsys/common/osd_cmd.c +++ b/board/gdsys/common/osd_cmd.c @@ -10,13 +10,14 @@ */ #include +#include #include #include #include #include -static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; uint x, y; @@ -68,8 +69,8 @@ static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_print(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; uint x, y; @@ -99,8 +100,8 @@ static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_osd_size(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; uint x, y; diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c index 8c9636d292e..b64a6d992d5 100644 --- a/board/gdsys/mpc8308/gazerbeam.c +++ b/board/gdsys/mpc8308/gazerbeam.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c index b39b0b60022..e960fa71aca 100644 --- a/board/gdsys/p1022/controlcenterd.c +++ b/board/gdsys/p1022/controlcenterd.c @@ -223,7 +223,7 @@ void hw_watchdog_reset(void) } #ifdef CONFIG_TRAILBLAZER -int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { return run_command(env_get("bootcmd"), flag); } diff --git a/board/google/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c index 4e34710b97d..12d4fe63cb0 100644 --- a/board/google/chromebook_coral/coral.c +++ b/board/google/chromebook_coral/coral.c @@ -4,6 +4,7 @@ */ #include +#include int arch_misc_init(void) { diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 08f7f8d8845..f592eba9e50 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -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; diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c index 912b9932406..6a5f936635c 100644 --- a/board/mediatek/mt7622/mt7622_rfb.c +++ b/board/mediatek/mt7622/mt7622_rfb.c @@ -6,6 +6,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c index 7dceebdeaeb..414360fe479 100644 --- a/board/phytium/durian/durian.c +++ b/board/phytium/durian/durian.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c index 565ce5f5d1c..c6e0c12976e 100644 --- a/board/renesas/sh7752evb/sh7752evb.c +++ b/board/renesas/sh7752evb/sh7752evb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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]; diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c index 0a762bc5536..cdeacb8aaee 100644 --- a/board/renesas/sh7753evb/sh7753evb.c +++ b/board/renesas/sh7753evb/sh7753evb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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]; diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c index eef5d36fd5d..5e76b9e7b4c 100644 --- a/board/renesas/sh7757lcr/sh7757lcr.c +++ b/board/renesas/sh7757lcr/sh7757lcr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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]; diff --git a/board/renesas/stout/cpld.c b/board/renesas/stout/cpld.c index e6c2051bd4b..b56ed1703f5 100644 --- a/board/renesas/stout/cpld.c +++ b/board/renesas/stout/cpld.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/renesas/ulcb/cpld.c b/board/renesas/ulcb/cpld.c index 528675651db..a20a34a92a8 100644 --- a/board/renesas/ulcb/cpld.c +++ b/board/renesas/ulcb/cpld.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c index c5e28df258f..0ca91cdeb01 100644 --- a/board/rockchip/kylin_rk3036/kylin_rk3036.c +++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 948007c4a83..c54de9fc12b 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 9117669f715..146843d3482 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -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; diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c index b4eae7f027c..ef6630f4f0b 100644 --- a/board/siemens/capricorn/board.c +++ b/board/siemens/capricorn/board.c @@ -6,7 +6,9 @@ * */ #include +#include #include +#include #include #include #include @@ -411,7 +413,7 @@ unsigned char get_button_state(char * const envname, unsigned char def) * 0 if button is not held down */ static int -do_userbutton(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_userbutton(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int button = 0; @@ -432,7 +434,7 @@ U_BOOT_CMD( #define ERST IMX_GPIO_NR(0, 3) static int -do_eth_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_eth_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { gpio_request(ERST, "ERST"); gpio_direction_output(ERST, 0); diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c index f1bca4b27f6..e0bd8590bc9 100644 --- a/board/siemens/common/board.c +++ b/board/siemens/common/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -151,7 +152,7 @@ unsigned char get_button_state(char * const envname, unsigned char def) * 0 if button is not held down */ static int -do_userbutton(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_userbutton(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int button = 0; button = get_button_state("button_dfu0", BOARD_DFU_BUTTON_GPIO); @@ -167,7 +168,7 @@ U_BOOT_CMD( #endif static int -do_usertestwdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +do_usertestwdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { printf("\n\n\n Go into infinite loop\n\n\n"); while (1) @@ -251,8 +252,8 @@ void set_env_gpios(unsigned char state) } /* loop through defined led in environment */ } -static int do_board_led(cmd_tbl_t *cmdtp, int flag, int argc, - char *const argv[]) +static int do_board_led(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { if (argc != 2) return CMD_RET_USAGE; diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c index 963de15fa87..b4893d39ae8 100644 --- a/board/siemens/draco/board.c +++ b/board/siemens/draco/board.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -343,8 +344,8 @@ int board_eth_init(bd_t *bis) return n; } -static int do_switch_reset(cmd_tbl_t *cmdtp, int flag, int argc, - char *const argv[]) +static int do_switch_reset(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* Reset SMSC LAN9303 switch for default configuration */ gpio_request(GPIO_LAN9303_NRST, "nRST"); diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index 9f9cdfa2346..927ef596506 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -386,8 +386,8 @@ static int upgrade_failure_fallback(void) return 0; } -static int do_upgrade_available(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_upgrade_available(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long upgrade_available = 0; unsigned long boot_retry = 0; diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c index e9d1cf9a4b6..d2a1ed0a3ea 100644 --- a/board/sifive/fu540/fu540.c +++ b/board/sifive/fu540/fu540.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c index e5f6e90e0c0..235d87c053c 100644 --- a/board/sks-kinkel/sksimx6/sksimx6.c +++ b/board/sks-kinkel/sksimx6/sksimx6.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c index a3c8042e14e..1d49ff2907a 100644 --- a/board/solidrun/clearfog/clearfog.c +++ b/board/solidrun/clearfog/clearfog.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c index 915164aa0b4..e1038619f0c 100644 --- a/board/st/common/cmd_stboard.c +++ b/board/st/common/cmd_stboard.c @@ -31,6 +31,7 @@ #ifndef CONFIG_SPL_BUILD #include +#include #include #include #include @@ -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; diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c index 5b0744ff6ba..d0948b7962f 100644 --- a/board/st/stm32f429-discovery/stm32f429-discovery.c +++ b/board/st/stm32f429-discovery/stm32f429-discovery.c @@ -12,6 +12,7 @@ #include #include +#include #include #include diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c index 1570d110bfd..680f69dfd16 100644 --- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c +++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c index d9bcb39bea6..4b71d400560 100644 --- a/board/st/stm32f469-discovery/stm32f469-discovery.c +++ b/board/st/stm32f469-discovery/stm32f469-discovery.c @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c index d98e6064269..c1746b61109 100644 --- a/board/synopsys/emsdp/emsdp.c +++ b/board/synopsys/emsdp/emsdp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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)); diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 44d95951988..72125c6ef91 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -756,7 +757,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; @@ -795,7 +797,8 @@ U_BOOT_CMD( "hsdk_go halt - Boot stand-alone application on HSDK, halt CPU just before application run\n" ); -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[]) { static bool done = false; int ret; @@ -819,7 +822,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; @@ -851,7 +854,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; @@ -879,7 +882,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 */ @@ -891,7 +894,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[]) { /* @@ -945,16 +948,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; diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c index 715e20dbd05..9ea62bb7960 100644 --- a/board/syteco/zmx25/zmx25.c +++ b/board/syteco/zmx25/zmx25.c @@ -15,6 +15,7 @@ */ #include #include +#include #include #include #include diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c index eac30368f7d..c60ce4b138c 100644 --- a/board/technexion/pico-imx6/pico-imx6.c +++ b/board/technexion/pico-imx6/pico-imx6.c @@ -6,6 +6,7 @@ * Author: Fabio Estevam */ +#include #include #include #include diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c index 9af1799fa5e..6ee09034ea4 100644 --- a/board/theadorable/theadorable.c +++ b/board/theadorable/theadorable.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index d9af309818d..c4d1cddc1da 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/sdp4430/cmd_bat.c b/board/ti/sdp4430/cmd_bat.c index c820435386d..6c1e6ca393c 100644 --- a/board/ti/sdp4430/cmd_bat.c +++ b/board/ti/sdp4430/cmd_bat.c @@ -9,7 +9,7 @@ #ifdef CONFIG_CMD_BAT #include -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) diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c index 81329a61318..3b7fa4b237c 100644 --- a/board/toradex/apalis-tk1/apalis-tk1.c +++ b/board/toradex/apalis-tk1/apalis-tk1.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c index 22d191f52ae..6991b1bc136 100644 --- a/board/toradex/apalis_imx6/do_fuse.c +++ b/board/toradex/apalis_imx6/do_fuse.c @@ -9,6 +9,7 @@ #include #ifndef CONFIG_SPL_BUILD +#include #include #include @@ -35,8 +36,8 @@ static int mfgr_fuse(void) return CMD_RET_SUCCESS; } -int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Fusing...\n"); @@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned val; int ret; diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c index ebd6418fd47..f8d0494332e 100644 --- a/board/toradex/apalis_imx6/pf0100.c +++ b/board/toradex/apalis_imx6/pf0100.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -261,8 +262,8 @@ static int pf0100_prog(void) return CMD_RET_SUCCESS; } -static int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_pf0100_prog(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Programming PMIC OTP..."); diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c index 22d191f52ae..6991b1bc136 100644 --- a/board/toradex/colibri_imx6/do_fuse.c +++ b/board/toradex/colibri_imx6/do_fuse.c @@ -9,6 +9,7 @@ #include #ifndef CONFIG_SPL_BUILD +#include #include #include @@ -35,8 +36,8 @@ static int mfgr_fuse(void) return CMD_RET_SUCCESS; } -int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Fusing...\n"); @@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned val; int ret; diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c index e744243297b..149e9bd3b94 100644 --- a/board/toradex/colibri_imx6/pf0100.c +++ b/board/toradex/colibri_imx6/pf0100.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -246,8 +247,8 @@ static int pf0100_prog(void) return CMD_RET_SUCCESS; } -static int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_pf0100_prog(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; puts("Programming PMIC OTP..."); diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index bd7d8b7f53f..75216ecf6d3 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -5,6 +5,7 @@ #include #include "tdx-cfg-block.h" +#include #include #if defined(CONFIG_TARGET_APALIS_IMX6) || \ @@ -514,8 +515,8 @@ static int get_cfgblock_barcode(char *barcode) return 0; } -static int do_cfgblock_create(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_cfgblock_create(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { u8 *config_block; struct toradex_tag *tag; @@ -643,8 +644,8 @@ out: return ret; } -static int do_cfgblock(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_cfgblock(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index 17da1e9f55c..3c0e16460a7 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -172,7 +173,7 @@ void board_init_f(ulong dummy) board_init_r(NULL, 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[]) { puts("resetting ...\n"); diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c index 4c025087db0..134c307e5df 100644 --- a/board/varisys/common/sys_eeprom.c +++ b/board/varisys/common/sys_eeprom.c @@ -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; diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c index db04dcabc7b..3dd60ec8274 100644 --- a/board/work-microwave/work_92105/work_92105_display.c +++ b/board/work-microwave/work_92105/work_92105_display.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 0e33f6af0b7..0f81df3acc2 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index e7169ea393c..86f52f3355e 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c index 27d44b760da..33589347da3 100644 --- a/board/xilinx/zynq/cmds.c +++ b/board/xilinx/zynq/cmds.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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)) { diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c index 893616b6a19..0f1f26986f2 100644 --- a/board/xilinx/zynqmp/cmds.c +++ b/board/xilinx/zynqmp/cmds.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -13,8 +14,8 @@ #include #include -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; diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index b127e872326..1035ffe5417 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -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; diff --git a/cmd/ab_select.c b/cmd/ab_select.c index 7a4e51571b6..6298fcfb604 100644 --- a/cmd/ab_select.c +++ b/cmd/ab_select.c @@ -6,10 +6,11 @@ #include #include #include +#include #include -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; diff --git a/cmd/abootimg.c b/cmd/abootimg.c index 15e727f4a2d..40e8978f152 100644 --- a/cmd/abootimg.c +++ b/cmd/abootimg.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -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)); diff --git a/cmd/adc.c b/cmd/adc.c index 381961cf51a..16f914a030e 100644 --- a/cmd/adc.c +++ b/cmd/adc.c @@ -8,7 +8,7 @@ #include #include -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]; diff --git a/cmd/adtimg.c b/cmd/adtimg.c index 60bb01c3498..aa943007f35 100644 --- a/cmd/adtimg.c +++ b/cmd/adtimg.c @@ -5,6 +5,7 @@ * Eugeniu Rosca */ +#include #include #include #include @@ -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]); @@ -181,8 +182,8 @@ static int adtimg_get_dt(int argc, char * const argv[]) return CMD_RET_FAILURE; } -static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_adtimg_get(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { if (argc < 2) { printf("Error: No arguments passed to '%s'\n", argv[0]); @@ -203,15 +204,16 @@ static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_adtimg_sub[] = { +static struct cmd_tbl cmd_adtimg_sub[] = { U_BOOT_CMD_MKENT(addr, CONFIG_SYS_MAXARGS, 1, do_adtimg_addr, "", ""), U_BOOT_CMD_MKENT(dump, CONFIG_SYS_MAXARGS, 1, do_adtimg_dump, "", ""), U_BOOT_CMD_MKENT(get, CONFIG_SYS_MAXARGS, 1, do_adtimg_get, "", ""), }; -static int do_adtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_adtimg(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_adtimg_sub, ARRAY_SIZE(cmd_adtimg_sub)); diff --git a/cmd/aes.c b/cmd/aes.c index 8c5b42fd2c4..4c0dad99326 100644 --- a/cmd/aes.c +++ b/cmd/aes.c @@ -35,7 +35,7 @@ u32 aes_get_key_len(char *command) * Returns zero on success, CMD_RET_USAGE in case of misuse and negative * on error. */ -static int do_aes(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +static int do_aes(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint32_t key_addr, iv_addr, src_addr, dst_addr, len; uint8_t *key_ptr, *iv_ptr, *src_ptr, *dst_ptr; diff --git a/cmd/arm/exception.c b/cmd/arm/exception.c index 33bc75976fa..522f6dff53f 100644 --- a/cmd/arm/exception.c +++ b/cmd/arm/exception.c @@ -8,8 +8,8 @@ #include #include -static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_unaligned(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* * The LDRD instruction requires the data source to be four byte aligned @@ -23,15 +23,15 @@ static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static int do_breakpoint(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_breakpoint(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { asm volatile ("BKPT #123\n"); return CMD_RET_FAILURE; } -static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* * 0xe7f...f. is undefined in ARM mode @@ -41,7 +41,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_sub[] = { +static struct cmd_tbl cmd_sub[] = { U_BOOT_CMD_MKENT(breakpoint, CONFIG_SYS_MAXARGS, 1, do_breakpoint, "", ""), U_BOOT_CMD_MKENT(unaligned, CONFIG_SYS_MAXARGS, 1, do_unaligned, diff --git a/cmd/arm/exception64.c b/cmd/arm/exception64.c index a363818532c..d5de50a0803 100644 --- a/cmd/arm/exception64.c +++ b/cmd/arm/exception64.c @@ -8,8 +8,8 @@ #include #include -static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* * 0xe7f...f. is undefined in ARM mode @@ -19,7 +19,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_sub[] = { +static struct cmd_tbl cmd_sub[] = { U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined, "", ""), }; diff --git a/cmd/armflash.c b/cmd/armflash.c index f82f3dd1a37..5e7315eb7cd 100644 --- a/cmd/armflash.c +++ b/cmd/armflash.c @@ -267,7 +267,7 @@ static int exists(const char * const name) return CMD_RET_FAILURE; } -static int do_afs(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_afs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret = CMD_RET_SUCCESS; diff --git a/cmd/avb.c b/cmd/avb.c index a4de5c40a2d..398ad3ba97b 100644 --- a/cmd/avb.c +++ b/cmd/avb.c @@ -15,7 +15,7 @@ #define AVB_BOOTARGS "avb_bootargs" static struct AvbOps *avb_ops; -int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned long mmc_dev; @@ -36,7 +36,8 @@ int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_read_part(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *part; s64 offset; @@ -68,7 +69,7 @@ int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc, +int do_avb_read_part_hex(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const char *part; @@ -114,7 +115,8 @@ int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_write_part(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *part; s64 offset; @@ -145,7 +147,8 @@ int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_read_rb(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { size_t index; u64 rb_idx; @@ -171,7 +174,8 @@ int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_write_rb(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { size_t index; u64 rb_idx; @@ -196,8 +200,8 @@ int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +int do_avb_get_uuid(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { const char *part; char buffer[UUID_STR_LEN + 1]; @@ -224,7 +228,7 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag, return CMD_RET_FAILURE; } -int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag, +int do_avb_verify_part(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const char * const requested_partitions[] = {"boot", NULL}; @@ -315,8 +319,8 @@ int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag, return res; } -int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +int do_avb_is_unlocked(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { bool unlock; @@ -341,8 +345,8 @@ int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag, return CMD_RET_FAILURE; } -int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_avb_read_pvalue(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *name; size_t bytes; @@ -382,8 +386,8 @@ int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_avb_write_pvalue(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *name; const char *value; @@ -411,7 +415,7 @@ int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_avb[] = { +static struct cmd_tbl cmd_avb[] = { U_BOOT_CMD_MKENT(init, 2, 0, do_avb_init, "", ""), U_BOOT_CMD_MKENT(read_rb, 2, 0, do_avb_read_rb, "", ""), U_BOOT_CMD_MKENT(write_rb, 3, 0, do_avb_write_rb, "", ""), @@ -427,9 +431,9 @@ static cmd_tbl_t cmd_avb[] = { #endif }; -static int do_avb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_avb(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_avb, ARRAY_SIZE(cmd_avb)); diff --git a/cmd/axi.c b/cmd/axi.c index 588098fddd4..18533efc0dd 100644 --- a/cmd/axi.c +++ b/cmd/axi.c @@ -96,8 +96,8 @@ static int axi_get_cur_bus(struct udevice **busp) * Command handlers */ -static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_axi_show_bus(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dummy; @@ -135,8 +135,8 @@ static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_axi_bus_num(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret = 0; int bus_no; @@ -163,7 +163,8 @@ static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc, return ret ? CMD_RET_FAILURE : 0; } -static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_axi_md(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* Print that many bytes per line */ const uint DISP_LINE_LEN = 16; @@ -261,7 +262,8 @@ static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_axi_mw(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { u32 writeval; ulong addr, count, size; @@ -312,17 +314,17 @@ static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -static cmd_tbl_t cmd_axi_sub[] = { +static struct cmd_tbl cmd_axi_sub[] = { U_BOOT_CMD_MKENT(bus, 1, 1, do_axi_show_bus, "", ""), U_BOOT_CMD_MKENT(dev, 1, 1, do_axi_bus_num, "", ""), U_BOOT_CMD_MKENT(md, 4, 1, do_axi_md, "", ""), U_BOOT_CMD_MKENT(mw, 5, 1, do_axi_mw, "", ""), }; -static int do_ihs_axi(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_ihs_axi(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; diff --git a/cmd/bcb.c b/cmd/bcb.c index b944e62b6a9..d99a6980125 100644 --- a/cmd/bcb.c +++ b/cmd/bcb.c @@ -109,8 +109,8 @@ static int bcb_field_get(char *name, char **fieldp, int *sizep) return 0; } -static int do_bcb_load(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_load(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct blk_desc *desc; struct disk_partition info; @@ -162,8 +162,8 @@ err: return CMD_RET_FAILURE; } -static int do_bcb_set(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_set(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size, len; char *field, *str, *found; @@ -189,8 +189,8 @@ static int do_bcb_set(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_bcb_clear(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_clear(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size; char *field; @@ -208,8 +208,8 @@ static int do_bcb_clear(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_bcb_test(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_test(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size; char *field; @@ -235,8 +235,8 @@ static int do_bcb_test(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static int do_bcb_dump(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_dump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size; char *field; @@ -249,8 +249,8 @@ static int do_bcb_dump(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_bcb_store(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_store(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct blk_desc *desc; struct disk_partition info; @@ -281,7 +281,7 @@ err: return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_bcb_sub[] = { +static struct cmd_tbl cmd_bcb_sub[] = { U_BOOT_CMD_MKENT(load, CONFIG_SYS_MAXARGS, 1, do_bcb_load, "", ""), U_BOOT_CMD_MKENT(set, CONFIG_SYS_MAXARGS, 1, do_bcb_set, "", ""), U_BOOT_CMD_MKENT(clear, CONFIG_SYS_MAXARGS, 1, do_bcb_clear, "", ""), @@ -290,9 +290,9 @@ static cmd_tbl_t cmd_bcb_sub[] = { U_BOOT_CMD_MKENT(store, CONFIG_SYS_MAXARGS, 1, do_bcb_store, "", ""), }; -static int do_bcb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +static int do_bcb(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; diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 89747c2f5bb..260feb670e1 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -172,7 +172,7 @@ void __weak board_detail(void) /* Please define board_detail() for your platform */ } -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -215,7 +215,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_NIOS2) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -235,7 +235,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_MICROBLAZE) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -260,7 +260,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_M68K) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -291,7 +291,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_MIPS) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { print_std_bdinfo(gd->bd); print_num("relocaddr", gd->relocaddr); @@ -302,8 +302,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_ARM) -static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { bd_t *bd = gd->bd; @@ -362,7 +362,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, #elif defined(CONFIG_SH) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -375,7 +375,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_X86) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -396,7 +396,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_SANDBOX) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -412,7 +412,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_NDS32) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -427,7 +427,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_RISCV) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -443,7 +443,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_ARC) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -456,7 +456,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_XTENSA) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { print_std_bdinfo(gd->bd); return 0; diff --git a/cmd/bedbug.c b/cmd/bedbug.c index 9fee5288301..b5dad4ba11d 100644 --- a/cmd/bedbug.c +++ b/cmd/bedbug.c @@ -56,7 +56,8 @@ void bedbug_init (void) * Entry point from the interpreter to the disassembler. Repeated calls * will resume from the last disassembled address. * ====================================================================== */ -int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_dis(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong addr; /* Address to start disassembly from */ ulong len; /* # of instructions to disassemble */ @@ -96,7 +97,8 @@ U_BOOT_CMD (ds, 3, 1, do_bedbug_dis, * instructions in consecutive memory locations until a '.' (period) is * entered on a line by itself. * ====================================================================== */ -int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_asm(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { long mem_addr; /* Address to assemble into */ unsigned long instr; /* Machine code for text */ @@ -146,7 +148,8 @@ U_BOOT_CMD (as, 2, 0, do_bedbug_asm, * CPU-specific break point set routine. * ====================================================================== */ -int do_bedbug_break (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_break(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* -------------------------------------------------- */ if (bug_ctx.do_break) @@ -242,7 +245,8 @@ void bedbug_main_loop (unsigned long addr, struct pt_regs *regs) * stopped flag in the context so that the breakpoint routine will * return. * ====================================================================== */ -int do_bedbug_continue (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_continue(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* -------------------------------------------------- */ @@ -265,7 +269,8 @@ U_BOOT_CMD (continue, 1, 0, do_bedbug_continue, * the address passes control to the CPU-specific set breakpoint routine * for the current breakpoint number. * ====================================================================== */ -int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_step(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long addr; /* Address to stop at */ @@ -296,7 +301,8 @@ U_BOOT_CMD (step, 1, 1, do_bedbug_step, * the address passes control to the CPU-specific set breakpoint routine * for the current breakpoint number. * ====================================================================== */ -int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_next(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long addr; /* Address to stop at */ @@ -325,7 +331,8 @@ U_BOOT_CMD (next, 1, 1, do_bedbug_next, * Interpreter command to print the current stack. This assumes an EABI * architecture, so it starts with GPR R1 and works back up the stack. * ====================================================================== */ -int do_bedbug_stack (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_stack(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long sp; /* Stack pointer */ unsigned long func; /* LR from stack */ @@ -370,7 +377,8 @@ U_BOOT_CMD (where, 1, 1, do_bedbug_stack, * Interpreter command to dump the registers. Calls the CPU-specific * show registers routine. * ====================================================================== */ -int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_rdump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* -------------------------------------------------- */ diff --git a/cmd/bind.c b/cmd/bind.c index 44a5f17f0da..068b1399ab1 100644 --- a/cmd/bind.c +++ b/cmd/bind.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -194,8 +195,8 @@ static int unbind_by_node_path(const char *path) return 0; } -static int do_bind_unbind(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bind_unbind(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret = 0; bool bind; diff --git a/cmd/binop.c b/cmd/binop.c index 6d2df5f3dd4..c85cb51568d 100644 --- a/cmd/binop.c +++ b/cmd/binop.c @@ -64,7 +64,8 @@ void write_to_mem(char *varname, u8 *result, ulong len) unmap_sysmem(buf); } -static int do_binop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_binop(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong len; u8 *result, *src1, *src2; diff --git a/cmd/blk_common.c b/cmd/blk_common.c index cc6e161ba0a..87f94b5abbf 100644 --- a/cmd/blk_common.c +++ b/cmd/blk_common.c @@ -10,8 +10,9 @@ #include #include +#include -int blk_common_cmd(int argc, char * const argv[], enum if_type if_type, +int blk_common_cmd(int argc, char *const argv[], enum if_type if_type, int *cur_devnump) { const char *if_name = blk_get_if_type_name(if_type); diff --git a/cmd/blkcache.c b/cmd/blkcache.c index 2cc65a9ee73..25f252e455e 100644 --- a/cmd/blkcache.c +++ b/cmd/blkcache.c @@ -4,13 +4,14 @@ * Author: Eric Nelson * */ +#include #include #include #include #include -static int blkc_show(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int blkc_show(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { struct block_cache_stats stats; blkcache_stats(&stats); @@ -25,8 +26,8 @@ static int blkc_show(cmd_tbl_t *cmdtp, int flag, return 0; } -static int blkc_configure(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int blkc_configure(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { unsigned blocks_per_entry, max_entries; if (argc != 3) @@ -40,7 +41,7 @@ static int blkc_configure(cmd_tbl_t *cmdtp, int flag, return 0; } -static cmd_tbl_t cmd_blkc_sub[] = { +static struct cmd_tbl cmd_blkc_sub[] = { U_BOOT_CMD_MKENT(show, 0, 0, blkc_show, "", ""), U_BOOT_CMD_MKENT(configure, 3, 0, blkc_configure, "", ""), }; @@ -55,10 +56,10 @@ static __maybe_unused void blkc_reloc(void) }; } -static int do_blkcache(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_blkcache(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; #ifdef CONFIG_NEEDS_MANUAL_RELOC blkc_reloc(); diff --git a/cmd/blob.c b/cmd/blob.c index 80478b8802d..c80e6977b4b 100644 --- a/cmd/blob.c +++ b/cmd/blob.c @@ -48,7 +48,8 @@ __weak int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len) * Returns zero on success, CMD_RET_USAGE in case of misuse and negative * on error. */ -static int do_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +static int do_blob(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong key_addr, src_addr, dst_addr, len; uint8_t *km_ptr, *src_ptr, *dst_ptr; diff --git a/cmd/bmp.c b/cmd/bmp.c index edf4f564266..0ad23231cbe 100644 --- a/cmd/bmp.c +++ b/cmd/bmp.c @@ -91,7 +91,8 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, } #endif -static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +static int do_bmp_info(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong addr; @@ -109,7 +110,8 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[ return (bmp_info(addr)); } -static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +static int do_bmp_display(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong addr; int x = 0, y = 0; @@ -141,7 +143,7 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar return (bmp_display(addr, x, y)); } -static cmd_tbl_t cmd_bmp_sub[] = { +static struct cmd_tbl cmd_bmp_sub[] = { U_BOOT_CMD_MKENT(info, 3, 0, do_bmp_info, "", ""), U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""), }; @@ -162,9 +164,9 @@ void bmp_reloc(void) { * Return: None * */ -static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_bmp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; /* Strip off leading 'bmp' command argument */ argc--; diff --git a/cmd/boot.c b/cmd/boot.c index 9150fce80b4..36aba22b301 100644 --- a/cmd/boot.c +++ b/cmd/boot.c @@ -16,12 +16,12 @@ /* Allow ports to override the default behavior */ __attribute__((weak)) unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc, - char * const argv[]) + char *const argv[]) { return entry (argc, argv); } -static int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { ulong addr, rc; int rcode = 0; diff --git a/cmd/bootcount.c b/cmd/bootcount.c index c358418ebe5..654bbb805c1 100644 --- a/cmd/bootcount.c +++ b/cmd/bootcount.c @@ -4,15 +4,15 @@ #include #include -static int do_bootcount_print(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootcount_print(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { printf("%lu\n", bootcount_load()); return CMD_RET_SUCCESS; } -static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootcount_reset(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* * note that we're explicitly not resetting the environment @@ -22,15 +22,15 @@ static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static cmd_tbl_t bootcount_sub[] = { +static struct cmd_tbl bootcount_sub[] = { U_BOOT_CMD_MKENT(print, 1, 1, do_bootcount_print, "", ""), U_BOOT_CMD_MKENT(reset, 1, 1, do_bootcount_reset, "", ""), }; -static int do_bootcount(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootcount(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *cp; + struct cmd_tbl *cp; if (argc < 2) return CMD_RET_USAGE; diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 380daf09a15..e52850227fd 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -601,7 +601,8 @@ static int do_efi_selftest(void) * @argv: command line arguments * Return: status code */ -static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { efi_status_t ret; void *fdt; diff --git a/cmd/booti.c b/cmd/booti.c index de5058236e0..0908512d9f5 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -17,8 +17,8 @@ /* * Image booting support */ -static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[], bootm_headers_t *images) +static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[], bootm_headers_t *images) { int ret; ulong ld; @@ -64,7 +64,7 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; diff --git a/cmd/bootm.c b/cmd/bootm.c index 931d53f0c72..d5f877cb545 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -34,12 +34,13 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */ #endif #if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND) -static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]); #endif /* we overload the cmd field with our state machine info instead of a * function pointer */ -static cmd_tbl_t cmd_bootm_sub[] = { +static struct cmd_tbl cmd_bootm_sub[] = { U_BOOT_CMD_MKENT(start, 0, 1, (void *)BOOTM_STATE_START, "", ""), U_BOOT_CMD_MKENT(loados, 0, 1, (void *)BOOTM_STATE_LOADOS, "", ""), #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH @@ -55,12 +56,12 @@ static cmd_tbl_t cmd_bootm_sub[] = { U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""), }; -static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret = 0; long state; - cmd_tbl_t *c; + struct cmd_tbl *c; c = find_cmd_tbl(argv[0], &cmd_bootm_sub[0], ARRAY_SIZE(cmd_bootm_sub)); argc--; argv++; @@ -89,7 +90,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, /* bootm - boot application image from image in memory */ /*******************************************************************/ -int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { #ifdef CONFIG_NEEDS_MANUAL_RELOC static int relocated = 0; @@ -136,7 +137,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) BOOTM_STATE_OS_GO, &images, 1); } -int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd) +int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd) { const char *ep = env_get("autostart"); @@ -201,7 +202,7 @@ U_BOOT_CMD( /* bootd - boot default image */ /*******************************************************************/ #if defined(CONFIG_CMD_BOOTD) -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); } @@ -226,7 +227,8 @@ U_BOOT_CMD( /* iminfo - print header info for a requested image */ /*******************************************************************/ #if defined(CONFIG_CMD_IMI) -static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_iminfo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int arg; ulong addr; @@ -519,7 +521,8 @@ static int do_imls_nand(void) #endif #if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND) -static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret_nor = 0, ret_nand = 0; diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3dc2c854aca..2e14fce1a90 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -481,7 +481,7 @@ int menu_show(int bootdelay) } #endif -int do_bootmenu(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +int do_bootmenu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { char *delay_str = NULL; int delay = 10; diff --git a/cmd/bootstage.c b/cmd/bootstage.c index f1ea4e95982..0e623f216b1 100644 --- a/cmd/bootstage.c +++ b/cmd/bootstage.c @@ -5,16 +5,17 @@ #include #include +#include -static int do_bootstage_report(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootstage_report(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { bootstage_report(); return 0; } -static int get_base_size(int argc, char * const argv[], ulong *basep, +static int get_base_size(int argc, char *const argv[], ulong *basep, ulong *sizep) { char *endp; @@ -35,8 +36,8 @@ static int get_base_size(int argc, char * const argv[], ulong *basep, return 0; } -static int do_bootstage_stash(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootstage_stash(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong base, size; int ret; @@ -58,7 +59,7 @@ static int do_bootstage_stash(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static cmd_tbl_t cmd_bootstage_sub[] = { +static struct cmd_tbl cmd_bootstage_sub[] = { U_BOOT_CMD_MKENT(report, 2, 1, do_bootstage_report, "", ""), U_BOOT_CMD_MKENT(stash, 4, 0, do_bootstage_stash, "", ""), U_BOOT_CMD_MKENT(unstash, 4, 0, do_bootstage_stash, "", ""), @@ -67,10 +68,10 @@ static cmd_tbl_t cmd_bootstage_sub[] = { /* * Process a bootstage sub-command */ -static int do_boostage(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_boostage(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; /* Strip off leading 'bootstage' command argument */ argc--; diff --git a/cmd/bootz.c b/cmd/bootz.c index f14a5fefbfc..ac15856f8df 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -23,8 +23,8 @@ int __weak bootz_setup(ulong image, ulong *start, ulong *end) /* * zImage booting support */ -static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[], bootm_headers_t *images) +static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[], bootm_headers_t *images) { int ret; ulong zi_start, zi_end; @@ -59,7 +59,7 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; diff --git a/cmd/btrfs.c b/cmd/btrfs.c index faa1239cc88..7e3cbe12cea 100644 --- a/cmd/btrfs.c +++ b/cmd/btrfs.c @@ -8,7 +8,7 @@ #include #include -int do_btrsubvol(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +int do_btrsubvol(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (argc != 3) return CMD_RET_USAGE; diff --git a/cmd/cache.c b/cmd/cache.c index 27dcec09316..cda8d6cfbe3 100644 --- a/cmd/cache.c +++ b/cmd/cache.c @@ -20,7 +20,8 @@ void __weak invalidate_icache_all(void) puts("No arch specific invalidate_icache_all available!\n"); } -static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { switch (argc) { case 2: /* on / off / flush */ @@ -54,7 +55,8 @@ void __weak flush_dcache_all(void) /* please define arch specific flush_dcache_all */ } -static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { switch (argc) { case 2: /* on / off / flush */ diff --git a/cmd/cbfs.c b/cmd/cbfs.c index 98e652a4e7b..8e91d4bb8c2 100644 --- a/cmd/cbfs.c +++ b/cmd/cbfs.c @@ -11,7 +11,7 @@ #include #include -static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uintptr_t end_of_rom = 0xffffffff; @@ -45,7 +45,7 @@ U_BOOT_CMD( " CBFS is in. It defaults to 0xFFFFFFFF\n" ); -static int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_fsload(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const struct cbfs_cachenode *file; @@ -92,7 +92,7 @@ U_BOOT_CMD( " - load binary file 'filename' from the cbfs to address 'addr'\n" ); -static int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const struct cbfs_cachenode *file = file_cbfs_get_first(); @@ -201,7 +201,7 @@ U_BOOT_CMD( " - list the files in the cbfs\n" ); -static int do_cbfs_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const struct cbfs_header *header = file_cbfs_get_header(); diff --git a/cmd/clk.c b/cmd/clk.c index 74ad8685002..439736d0724 100644 --- a/cmd/clk.c +++ b/cmd/clk.c @@ -72,7 +72,7 @@ int __weak soc_clk_dump(void) } #endif -static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; @@ -86,14 +86,14 @@ static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -static cmd_tbl_t cmd_clk_sub[] = { +static struct cmd_tbl cmd_clk_sub[] = { U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""), }; -static int do_clk(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_clk(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; diff --git a/cmd/cls.c b/cmd/cls.c index f1ce6e8df1e..eab4e6993bb 100644 --- a/cmd/cls.c +++ b/cmd/cls.c @@ -11,7 +11,7 @@ #include #include -static int do_video_clear(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { #if defined(CONFIG_DM_VIDEO) diff --git a/cmd/config.c b/cmd/config.c index d2810d573b0..cf30841a359 100644 --- a/cmd/config.c +++ b/cmd/config.c @@ -11,7 +11,8 @@ #include "config_data_gz.h" #include "config_data_size.h" -static int do_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_config(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { char *dst; unsigned long len = data_size; diff --git a/cmd/conitrace.c b/cmd/conitrace.c index 85c5422b7eb..e45e87a64c9 100644 --- a/cmd/conitrace.c +++ b/cmd/conitrace.c @@ -8,8 +8,8 @@ #include #include -static int do_conitrace(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_conitrace(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { bool first = true; diff --git a/cmd/console.c b/cmd/console.c index 3f1d98b17b0..9a1db83c7c3 100644 --- a/cmd/console.c +++ b/cmd/console.c @@ -12,7 +12,8 @@ #include extern void _do_coninfo (void); -static int do_coninfo(cmd_tbl_t *cmd, int flag, int argc, char * const argv[]) +static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc, + char *const argv[]) { int l; struct list_head *list = stdio_get_list(); diff --git a/cmd/cpu.c b/cmd/cpu.c index 8c0abc17562..ff553c16c4e 100644 --- a/cmd/cpu.c +++ b/cmd/cpu.c @@ -64,7 +64,7 @@ static int print_cpu_list(bool detail) return 0; } -static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cpu_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (print_cpu_list(false)) @@ -73,7 +73,7 @@ static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cpu_detail(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (print_cpu_list(true)) @@ -82,7 +82,7 @@ static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static cmd_tbl_t cmd_cpu_sub[] = { +static struct cmd_tbl cmd_cpu_sub[] = { U_BOOT_CMD_MKENT(list, 2, 1, do_cpu_list, "", ""), U_BOOT_CMD_MKENT(detail, 4, 0, do_cpu_detail, "", ""), }; @@ -90,10 +90,10 @@ static cmd_tbl_t cmd_cpu_sub[] = { /* * Process a cpu sub-command */ -static int do_cpu(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_cpu(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *c = NULL; + struct cmd_tbl *c = NULL; /* Strip off leading 'cpu' command argument */ argc--; diff --git a/cmd/cramfs.c b/cmd/cramfs.c index ad232deae00..1aeb56702ca 100644 --- a/cmd/cramfs.c +++ b/cmd/cramfs.c @@ -94,7 +94,8 @@ extern int cramfs_info (struct part_info *info); * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_cramfs_load(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { char *filename; int size; @@ -162,7 +163,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_cramfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { char *filename = "/"; int ret; diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c index c6bbed9c4a2..3c7dd4db9b6 100644 --- a/cmd/cros_ec.c +++ b/cmd/cros_ec.c @@ -24,7 +24,7 @@ static const char * const ec_current_image_name[] = {"unknown", "RO", "RW"}; * @param argv List of remaining parameters * @return flash region (EC_FLASH_REGION_...) or -1 on error */ -static int cros_ec_decode_region(int argc, char * const argv[]) +static int cros_ec_decode_region(int argc, char *const argv[]) { if (argc > 0) { if (0 == strcmp(*argv, "rw")) @@ -51,7 +51,7 @@ static int cros_ec_decode_region(int argc, char * const argv[]) * (negative EC_RES_...) */ static int do_read_write(struct udevice *dev, int is_write, int argc, - char * const argv[]) + char *const argv[]) { uint32_t offset, size = -1U, region_size; unsigned long addr; @@ -93,7 +93,8 @@ static int do_read_write(struct udevice *dev, int is_write, int argc, return 0; } -static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_cros_ec(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; const char *cmd; diff --git a/cmd/dataflash_mmc_mux.c b/cmd/dataflash_mmc_mux.c index 9f271b6f611..73876e9464a 100644 --- a/cmd/dataflash_mmc_mux.c +++ b/cmd/dataflash_mmc_mux.c @@ -9,7 +9,8 @@ static int mmc_nspi (const char *); -int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_dataflash_mmc_mux(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { switch (argc) { case 2: /* on / off */ diff --git a/cmd/date.c b/cmd/date.c index 7fa950a9026..75a032cd277 100644 --- a/cmd/date.c +++ b/cmd/date.c @@ -29,7 +29,8 @@ int mk_date (const char *, struct rtc_time *); static struct rtc_time default_tm = { 0, 0, 0, 1, 1, 2000, 6, 0, 0 }; -static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_date(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct rtc_time tm; int rcode = 0; diff --git a/cmd/demo.c b/cmd/demo.c index 52c6e7ec15b..9da06f5e4d3 100644 --- a/cmd/demo.c +++ b/cmd/demo.c @@ -7,14 +7,15 @@ */ #include +#include #include #include #include struct udevice *demo_dev; -static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_demo_hello(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ch = 0; @@ -24,8 +25,8 @@ static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc, return demo_hello(demo_dev, ch); } -static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_demo_status(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int status; int ret; @@ -39,8 +40,8 @@ static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_demo_light(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int light; int ret; @@ -59,7 +60,7 @@ static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_demo_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *dev; int i, ret; @@ -78,16 +79,17 @@ int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return cmd_process_error(cmdtp, ret); } -static cmd_tbl_t demo_commands[] = { +static struct cmd_tbl demo_commands[] = { U_BOOT_CMD_MKENT(list, 0, 1, do_demo_list, "", ""), U_BOOT_CMD_MKENT(hello, 2, 1, do_demo_hello, "", ""), U_BOOT_CMD_MKENT(light, 2, 1, do_demo_light, "", ""), U_BOOT_CMD_MKENT(status, 1, 1, do_demo_status, "", ""), }; -static int do_demo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_demo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *demo_cmd; + struct cmd_tbl *demo_cmd; int devnum = 0; int ret; diff --git a/cmd/dfu.c b/cmd/dfu.c index b30f8a56673..7310595a027 100644 --- a/cmd/dfu.c +++ b/cmd/dfu.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -18,7 +19,7 @@ #include #include -static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (argc < 2) diff --git a/cmd/diag.c b/cmd/diag.c index 8d21c7dde80..f51536dbfaa 100644 --- a/cmd/diag.c +++ b/cmd/diag.c @@ -11,7 +11,7 @@ #include #include -int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_diag(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned int i; diff --git a/cmd/disk.c b/cmd/disk.c index da0660148c1..dbd08a06b2f 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -10,7 +10,7 @@ #include #include -int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, +int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc, char *const argv[]) { __maybe_unused int dev; diff --git a/cmd/dm.c b/cmd/dm.c index 108707c298a..013680f3354 100644 --- a/cmd/dm.c +++ b/cmd/dm.c @@ -16,39 +16,39 @@ #include #include -static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_all(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_all(); return 0; } -static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_uclass(); return 0; } -static int do_dm_dump_devres(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_devres(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_devres(); return 0; } -static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_drivers(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_drivers(); return 0; } -static cmd_tbl_t test_commands[] = { +static struct cmd_tbl test_commands[] = { U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""), U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""), U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""), @@ -65,9 +65,9 @@ static __maybe_unused void dm_reloc(void) } } -static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *test_cmd; + struct cmd_tbl *test_cmd; int ret; #ifdef CONFIG_NEEDS_MANUAL_RELOC diff --git a/cmd/echo.c b/cmd/echo.c index 5b018d9349a..d02a4cfd586 100644 --- a/cmd/echo.c +++ b/cmd/echo.c @@ -7,7 +7,8 @@ #include #include -static int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_echo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int i; int putnl = 1; diff --git a/cmd/eeprom.c b/cmd/eeprom.c index 667149e2d45..9d725cd44c5 100644 --- a/cmd/eeprom.c +++ b/cmd/eeprom.c @@ -237,7 +237,7 @@ static int parse_numeric_param(char *str) * @returns: number of arguments parsed or CMD_RET_USAGE if error */ static int parse_i2c_bus_addr(int *i2c_bus, ulong *i2c_addr, int argc, - char * const argv[], int argc_no_bus_addr) + char *const argv[], int argc_no_bus_addr) { int argc_no_bus = argc_no_bus_addr + 1; int argc_bus_addr = argc_no_bus_addr + 2; @@ -355,7 +355,7 @@ static int eeprom_execute_command(enum eeprom_action action, int i2c_bus, } #define NEXT_PARAM(argc, index) { (argc)--; (index)++; } -int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int layout_ver = LAYOUT_VERSION_AUTODETECT; enum eeprom_action action = EEPROM_ACTION_INVALID; diff --git a/cmd/efi.c b/cmd/efi.c index ea239a01f0b..c7640c862e9 100644 --- a/cmd/efi.c +++ b/cmd/efi.c @@ -191,7 +191,8 @@ static void efi_print_mem_table(struct efi_entry_memmap *map, printf("*Some areas are merged (use 'all' to see)\n"); } -static int do_efi_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_efi_mem(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct efi_mem_desc *desc; struct efi_entry_memmap *map; @@ -231,13 +232,13 @@ done: return ret ? CMD_RET_FAILURE : 0; } -static cmd_tbl_t efi_commands[] = { +static struct cmd_tbl efi_commands[] = { U_BOOT_CMD_MKENT(mem, 1, 1, do_efi_mem, "", ""), }; -static int do_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_efi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *efi_cmd; + struct cmd_tbl *efi_cmd; int ret; if (argc < 2) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index c1bb76477a6..88f49566108 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -61,8 +61,8 @@ static const char sep[] = "================"; * Implement efidebug "devices" sub-command. * Show all UEFI devices and their information. */ -static int do_efi_show_devices(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_devices(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_handle_t *handles; efi_uintn_t num, i; @@ -140,8 +140,8 @@ static int efi_get_driver_handle_info(efi_handle_t handle, u16 **driver_name, * Implement efidebug "drivers" sub-command. * Show all UEFI drivers and their information. */ -static int do_efi_show_drivers(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_drivers(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_handle_t *handles; efi_uintn_t num, i; @@ -312,8 +312,8 @@ static const char *get_guid_text(const void *guid) * Show all UEFI handles and their information, currently all protocols * added to handle. */ -static int do_efi_show_handles(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_handle_t *handles; efi_guid_t **guid; @@ -372,8 +372,8 @@ static int do_efi_show_handles(cmd_tbl_t *cmdtp, int flag, * Implement efidebug "images" sub-command. * Show all UEFI loaded images and their information. */ -static int do_efi_show_images(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_images(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_print_image_infos(NULL); @@ -453,8 +453,8 @@ static void print_memory_attributes(u64 attributes) * Implement efidebug "memmap" sub-command. * Show UEFI memory map. */ -static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { struct efi_mem_desc *memmap = NULL, *map; efi_uintn_t map_size = 0; @@ -517,8 +517,8 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag, * Implement efidebug "tables" sub-command. * Show UEFI configuration tables. */ -static int do_efi_show_tables(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_tables(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_uintn_t i; const char *guid_str; @@ -547,8 +547,8 @@ static int do_efi_show_tables(cmd_tbl_t *cmdtp, int flag, * * efidebug boot add