command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2020-05-10 11:40:03 -06:00 committed by Tom Rini
parent 691d719db7
commit 0914011310
465 changed files with 1987 additions and 1527 deletions

View File

@ -5,6 +5,7 @@
#include <common.h> #include <common.h>
#include <bootstage.h> #include <bootstage.h>
#include <env.h>
#include <image.h> #include <image.h>
#include <irq_func.h> #include <irq_func.h>
#include <lmb.h> #include <lmb.h>

View File

@ -13,7 +13,7 @@ __weak void reset_cpu(ulong addr)
__builtin_arc_brk(); __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"); printf("Resetting the board...\n");

View File

@ -8,6 +8,7 @@
#include <common.h> #include <common.h>
#include <clock_legacy.h> #include <clock_legacy.h>
#include <command.h>
#include <div64.h> #include <div64.h>
#include <init.h> #include <init.h>
#include <net.h> #include <net.h>
@ -379,8 +380,8 @@ u32 imx_get_fecclk(void)
} }
#endif #endif
int do_mx35_showclocks(cmd_tbl_t *cmdtp, int do_mx35_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
int flag, int argc, char * const argv[]) char *const argv[])
{ {
u32 cpufreq = get_mcu_main_clk(); u32 cpufreq = get_mcu_main_clk();
printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000); printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000);

View File

@ -10,6 +10,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <hang.h> #include <hang.h>
#include <init.h> #include <init.h>
@ -187,7 +188,8 @@ int print_cpuinfo(void)
} }
#endif #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("CPU: %3d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
printf("BUS: %3d MHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000000); printf("BUS: %3d MHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000000);

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <init.h> #include <init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch/hardware.h> #include <asm/arch/hardware.h>
@ -81,7 +82,7 @@ int print_cpuinfo(void)
#endif #endif
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC) #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[]) char *const argv[])
{ {
if (argc != 2) if (argc != 2)

View File

@ -182,7 +182,8 @@ static int write_mac(uchar *mac)
} }
#endif #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); void (*sram_setfreq) (unsigned int, unsigned int);
unsigned int frequency; unsigned int frequency;

View File

@ -5,6 +5,7 @@
#include <common.h> #include <common.h>
#include <clock_legacy.h> #include <clock_legacy.h>
#include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <init.h> #include <init.h>
#include <net.h> #include <net.h>
@ -240,7 +241,7 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
} }
/* Dump some core clocks */ /* Dump some core clocks */
int do_vf610_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, int do_vf610_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
printf("\n"); printf("\n");

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <env.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <asm/arch/fsl_serdes.h> #include <asm/arch/fsl_serdes.h>

View File

@ -21,7 +21,7 @@
#define MXC_CLK32 32768 #define MXC_CLK32 32768
#endif #endif
struct cmd_tbl_s; struct cmd_tbl;
enum mxc_clock { enum mxc_clock {
MXC_ARM_CLK = 0, MXC_ARM_CLK = 0,
@ -82,6 +82,6 @@ void enable_thermal_clk(void);
void mxs_set_lcdclk(u32 base_addr, u32 freq); void mxs_set_lcdclk(u32 base_addr, u32 freq);
void select_ldb_di_clock_source(enum ldb_di_clock clk); void select_ldb_di_clock_source(enum ldb_di_clock clk);
void enable_eim_clk(unsigned char enable); 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[]); char *const argv[]);
#endif /* __ASM_ARCH_CLOCK_H */ #endif /* __ASM_ARCH_CLOCK_H */

View File

@ -21,6 +21,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <irq_func.h> #include <irq_func.h>
@ -28,11 +29,11 @@ __weak void reset_misc(void)
{ {
} }
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{ {
puts ("resetting ...\n"); puts ("resetting ...\n");
udelay (50000); /* wait 50 ms */ mdelay(50); /* wait 50 ms */
disable_interrupts(); disable_interrupts();

View File

@ -13,6 +13,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h> #include <command.h>
#include <env.h>
#define SYSOPEN 0x01 #define SYSOPEN 0x01
#define SYSCLOSE 0x02 #define SYSCLOSE 0x02
@ -180,7 +181,8 @@ static int smh_load_file(const char * const name, ulong load_addr,
return 0; 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) { if (argc == 3 || argc == 4) {
ulong load_addr; ulong load_addr;

View File

@ -54,7 +54,7 @@ static int create_usage(char *dest)
return size; return size;
} }
static int do_boot_mode(cmd_tbl_t *cmdtp, int flag, int argc, static int do_boot_mode(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
const struct boot_mode *p; const struct boot_mode *p;
@ -87,7 +87,7 @@ void add_board_boot_modes(const struct boot_mode *p)
int size; int size;
char *dest; 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) { if (entry->usage) {
free(entry->usage); free(entry->usage);

View File

@ -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 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
* on error. * 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; uint32_t src_addr, dst_addr, len;
uint8_t *src_ptr, *dst_ptr; uint8_t *src_ptr, *dst_ptr;

View File

@ -3,11 +3,13 @@
* Copyright (C) 2012 Boundary Devices Inc. * Copyright (C) 2012 Boundary Devices Inc.
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <asm/arch/imx-regs.h> #include <asm/arch/imx-regs.h>
#include <asm/arch/mxc_hdmi.h> #include <asm/arch/mxc_hdmi.h>
#include <asm/io.h> #include <asm/io.h>
static int do_hdmidet(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static int do_hdmidet(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{ {
struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1; return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;

View File

@ -12,6 +12,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <malloc.h> #include <malloc.h>
#include <nand.h> #include <nand.h>
#include <dm/devres.h> #include <dm/devres.h>
@ -1458,7 +1459,7 @@ static int do_nandbcb_init(int argc, char * const argv[])
return ret == 0 ? CMD_RET_SUCCESS : CMD_RET_FAILURE; return ret == 0 ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
} }
static int do_nandbcb(cmd_tbl_t *cmdtp, int flag, int argc, static int do_nandbcb(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
const char *cmd; const char *cmd;

View File

@ -4,6 +4,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <config.h> #include <config.h>
#include <fuse.h> #include <fuse.h>
#include <mapmem.h> #include <mapmem.h>
@ -291,7 +292,7 @@ static int get_hab_status(void)
return 0; return 0;
} }
static int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc, static int do_hab_status(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
if ((argc != 1)) { if ((argc != 1)) {
@ -324,7 +325,7 @@ static ulong get_image_ivt_offset(ulong img_addr)
} }
} }
static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc, static int do_authenticate_image(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
ulong addr, length, ivt_offset; ulong addr, length, ivt_offset;
@ -349,7 +350,7 @@ static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
return rcode; return rcode;
} }
static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc, static int do_hab_failsafe(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
hab_rvt_failsafe_t *hab_rvt_failsafe; hab_rvt_failsafe_t *hab_rvt_failsafe;
@ -365,7 +366,7 @@ static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
return 0; return 0;
} }
static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc, static int do_hab_version(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
struct hab_hdr *hdr = (struct hab_hdr *)HAB_RVT_BASE; struct hab_hdr *hdr = (struct hab_hdr *)HAB_RVT_BASE;
@ -380,7 +381,7 @@ static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
return 0; return 0;
} }
static int do_authenticate_image_or_failover(cmd_tbl_t *cmdtp, int flag, static int do_authenticate_image_or_failover(struct cmd_tbl *cmdtp, int flag,
int argc, char *const argv[]) int argc, char *const argv[])
{ {
int ret = CMD_RET_FAILURE; int ret = CMD_RET_FAILURE;

View File

@ -4,6 +4,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <errno.h> #include <errno.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch/sci/sci.h> #include <asm/arch/sci/sci.h>
@ -149,7 +150,7 @@ exit:
return ret; return ret;
} }
static int do_authenticate(cmd_tbl_t *cmdtp, int flag, int argc, static int do_authenticate(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
ulong addr; ulong addr;
@ -250,7 +251,7 @@ static void display_ahab_auth_event(u32 event)
} }
} }
static int do_ahab_status(cmd_tbl_t *cmdtp, int flag, int argc, static int do_ahab_status(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int err; int err;
@ -297,7 +298,7 @@ static int confirm_close(void)
return 0; return 0;
} }
static int do_ahab_close(cmd_tbl_t *cmdtp, int flag, int argc, static int do_ahab_close(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int err; int err;

View File

@ -626,7 +626,8 @@ static char snvs_cfg_help_text[] =
"ALL values should be in hexadecimal format"; "ALL values should be in hexadecimal format";
#define NB_REGISTERS 18 #define NB_REGISTERS 18
static int do_snvs_cfg(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) static int do_snvs_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{ {
int err = 0; int err = 0;
u32 idx = 0; u32 idx = 0;
@ -677,7 +678,7 @@ static char snvs_dgo_cfg_help_text[] =
"\n" "\n"
"ALL values should be in hexadecimal format"; "ALL values should be in hexadecimal format";
static int do_snvs_dgo_cfg(cmd_tbl_t *cmdtp, int flag, int argc, static int do_snvs_dgo_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int err = 0; int err = 0;
@ -713,7 +714,7 @@ static char tamper_pin_cfg_help_text[] =
"\n" "\n"
"ALL values should be in hexadecimal format"; "ALL values should be in hexadecimal format";
static int do_tamper_pin_cfg(cmd_tbl_t *cmdtp, int flag, int argc, static int do_tamper_pin_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int err = 0; int err = 0;
@ -748,7 +749,7 @@ static char snvs_clear_status_help_text[] =
"Write the status registers with the value provided," "Write the status registers with the value provided,"
" clearing the status"; " clearing the status";
static int do_snvs_clear_status(cmd_tbl_t *cmdtp, int flag, int argc, static int do_snvs_clear_status(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int scierr = 0; int scierr = 0;
@ -788,7 +789,7 @@ static char snvs_sec_status_help_text[] =
"snvs_sec_status\n" "snvs_sec_status\n"
"Display information about the security related to tamper and secvio"; "Display information about the security related to tamper and secvio";
static int do_snvs_sec_status(cmd_tbl_t *cmdtp, int flag, int argc, static int do_snvs_sec_status(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int scierr; int scierr;

View File

@ -6,6 +6,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h> #include <asm/arch/imx-regs.h>
#include <asm/io.h> #include <asm/io.h>
@ -755,7 +756,7 @@ int clock_init(void)
* Dump some clockes. * Dump some clockes.
*/ */
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_SPL_BUILD
static int do_imx8m_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, static int do_imx8m_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
u32 freq; u32 freq;

View File

@ -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 * The TCMUL is mapped to (M4_BOOTROM_BASE_ADDR) at A core side for
* accessing the M4 TCMUL. * 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; ulong addr;
int ret, up; int ret, up;

View File

@ -7,6 +7,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <asm/arch/imx-regs.h> #include <asm/arch/imx-regs.h>
@ -943,7 +944,8 @@ void mxc_set_sata_internal_clock(void)
/* /*
* Dump some core clockes. * 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; u32 freq;

View File

@ -4,6 +4,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <div64.h> #include <div64.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/errno.h> #include <linux/errno.h>
@ -1305,7 +1306,8 @@ void disable_ipu_clock(void)
/* /*
* Dump some core clockes. * 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; u32 freq;
freq = decode_pll(PLL_SYS, MXC_HCLK); freq = decode_pll(PLL_SYS, MXC_HCLK);

View File

@ -8,6 +8,7 @@
#include <common.h> #include <common.h>
#include <clock_legacy.h> #include <clock_legacy.h>
#include <command.h>
#include <div64.h> #include <div64.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/errno.h> #include <linux/errno.h>
@ -1100,7 +1101,8 @@ void epdc_clock_disable(void)
/* /*
* Dump some core clockes. * 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; u32 freq;
freq = decode_pll(PLL_CORE, MXC_HCLK); freq = decode_pll(PLL_CORE, MXC_HCLK);

View File

@ -5,6 +5,7 @@
#include <common.h> #include <common.h>
#include <clock_legacy.h> #include <clock_legacy.h>
#include <command.h>
#include <div64.h> #include <div64.h>
#include <asm/io.h> #include <asm/io.h>
#include <errno.h> #include <errno.h>
@ -329,7 +330,8 @@ void hab_caam_clock_enable(unsigned char enable)
/* /*
* Dump some core clockes. * 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 addr = 0;
u32 freq; u32 freq;

View File

@ -19,7 +19,7 @@ struct pll_init_data cmd_pll_data = {
.pll_od = 2, .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) if (argc != 5)
goto pll_cmd_usage; goto pll_cmd_usage;
@ -63,7 +63,8 @@ U_BOOT_CMD(
PLLSET_CMD_LIST " <mult> <div> <OD>\n" PLLSET_CMD_LIST " <mult> <div> <OD>\n"
); );
int do_getclk_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_getclk_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{ {
unsigned int clk; unsigned int clk;
unsigned long freq; unsigned long freq;
@ -92,7 +93,7 @@ U_BOOT_CMD(
CLOCK_INDEXES_LIST 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 psc_module;
int res; int res;

View File

@ -12,7 +12,7 @@
#include <mach/mon.h> #include <mach/mon.h>
asm(".arch_extension sec\n\t"); asm(".arch_extension sec\n\t");
static int do_mon_install(cmd_tbl_t *cmdtp, int flag, int argc, static int do_mon_install(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size; u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size;
@ -65,7 +65,7 @@ static void core_spin(void)
} }
} }
int do_mon_power(cmd_tbl_t *cmdtp, int flag, int argc, int do_mon_power(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int rcode = 0, core_id, on; int rcode = 0, core_id, on;

View File

@ -12,7 +12,7 @@
#include <asm/arch/psc_defs.h> #include <asm/arch/psc_defs.h>
#include <asm/arch/hardware.h> #include <asm/arch/hardware.h>
int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{ {
mon_power_off(0); mon_power_off(0);

View File

@ -7,6 +7,7 @@
*/ */
#include <cpu_func.h> #include <cpu_func.h>
#include <env.h>
#include <asm/io.h> #include <asm/io.h>
#include <common.h> #include <common.h>
#include <asm/arch/msmc.h> #include <asm/arch/msmc.h>

View File

@ -7,6 +7,7 @@
*/ */
#include <common.h> #include <common.h>
#include <env.h>
#include <init.h> #include <init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch/psc_defs.h> #include <asm/arch/psc_defs.h>

View File

@ -6,6 +6,8 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <env.h>
#include <asm/arch/sm.h> #include <asm/arch/sm.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <linux/err.h> #include <linux/err.h>
@ -117,7 +119,7 @@ int meson_sm_get_reboot_reason(void)
return FIELD_GET(REBOOT_REASON_MASK, reason); 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[]) char *const argv[])
{ {
ulong address; ulong address;
@ -153,7 +155,7 @@ static const char *reboot_reasons[MAX_REBOOT_REASONS] = {
[REBOOT_REASON_WATCHDOG_REBOOT] = "watchdog_reboot", [REBOOT_REASON_WATCHDOG_REBOOT] = "watchdog_reboot",
}; };
static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc, static int do_sm_reboot_reason(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
const char *reason_str; const char *reason_str;
@ -181,15 +183,15 @@ static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS; 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(serial, 2, 1, do_sm_serial, "", ""),
U_BOOT_CMD_MKENT(reboot_reason, 1, 1, do_sm_reboot_reason, "", ""), 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[]) char *const argv[])
{ {
cmd_tbl_t *c; struct cmd_tbl *c;
if (argc < 2) if (argc < 2)
return CMD_RET_USAGE; return CMD_RET_USAGE;

View File

@ -16,6 +16,7 @@
* *
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <dm.h> #include <dm.h>
#include <init.h> #include <init.h>
#include <spl.h> #include <spl.h>
@ -280,7 +281,8 @@ void abort(void)
/****************************************************************************** /******************************************************************************
* OMAP3 specific command to switch between NAND HW and SW ecc * 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; int hw, strength = 1;

View File

@ -13,6 +13,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <hang.h> #include <hang.h>
#include <init.h> #include <init.h>

View File

@ -5,6 +5,8 @@
#include <common.h> #include <common.h>
#include <adc.h> #include <adc.h>
#include <command.h>
#include <env.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch-rockchip/boot_mode.h> #include <asm/arch-rockchip/boot_mode.h>
#include <dm/device.h> #include <dm/device.h>

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <env.h>
#include <init.h> #include <init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/clock.h>

View File

@ -3,6 +3,7 @@
* Copyright (c) 2016 Rockchip Electronics Co., Ltd * Copyright (c) 2016 Rockchip Electronics Co., Ltd
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <dm.h> #include <dm.h>
#include <env.h> #include <env.h>
#include <clk.h> #include <clk.h>
@ -114,7 +115,7 @@ int rk_board_late_init(void)
return rk3288_board_late_init(); return rk3288_board_late_init();
} }
static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc, static int do_clock(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
static const struct { static const struct {

View File

@ -4,6 +4,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <init.h> #include <init.h>
#include <wait_bit.h> #include <wait_bit.h>
#include <asm/io.h> #include <asm/io.h>
@ -62,7 +63,8 @@ int set_cpu_clk_info(void)
} }
#ifndef CONFIG_SPL_BUILD #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(); cm_print_clock_quick_summary();
return 0; return 0;

View File

@ -4,6 +4,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <hang.h> #include <hang.h>
#include <asm/cache.h> #include <asm/cache.h>
@ -178,7 +179,8 @@ int arch_cpu_init(void)
} }
#ifndef CONFIG_SPL_BUILD #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; unsigned int mask = ~0;

View File

@ -66,7 +66,7 @@ static int confirm_prog(void)
return 0; return 0;
} }
static int do_stm32key(cmd_tbl_t *cmdtp, int flag, int argc, static int do_stm32key(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
u32 addr; u32 addr;

View File

@ -38,7 +38,7 @@ static void enable_vidconsole(void)
#endif #endif
} }
static int do_stm32prog(cmd_tbl_t *cmdtp, int flag, int argc, static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
char * const argv[]) char * const argv[])
{ {
ulong addr, size; ulong addr, size;

View File

@ -3,7 +3,7 @@
* Copyright (C) 2020, STMicroelectronics - All Rights Reserved * Copyright (C) 2020, STMicroelectronics - All Rights Reserved
*/ */
#include <common.h> #include <command.h>
#include <console.h> #include <console.h>
#include <dfu.h> #include <dfu.h>
#include <malloc.h> #include <malloc.h>

View File

@ -25,12 +25,13 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <irq_func.h> #include <irq_func.h>
#include <asm/arch/tegra.h> #include <asm/arch/tegra.h>
#include <asm/arch-tegra/pmc.h> #include <asm/arch-tegra/pmc.h>
static int do_enterrcm(cmd_tbl_t *cmdtp, int flag, int argc, static int do_enterrcm(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
puts("Entering RCM...\n"); puts("Entering RCM...\n");

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <spl.h> #include <spl.h>
#include <stdio.h> #include <stdio.h>
#include <linux/io.h> #include <linux/io.h>
@ -205,7 +206,8 @@ int uniphier_boot_from_backend(void)
#ifndef CONFIG_SPL_BUILD #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; const struct uniphier_boot_device_info *info;
u32 pinmon; u32 pinmon;

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <stdio.h> #include <stdio.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/printk.h> #include <linux/printk.h>
@ -291,7 +292,8 @@ static void reg_dump(const struct uniphier_ddrmphy_param *param)
} }
} }
static int do_ddrm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static int do_ddrm(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{ {
const struct uniphier_ddrmphy_param *param; const struct uniphier_ddrmphy_param *param;
char *cmd; char *cmd;

View File

@ -6,6 +6,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <stdio.h> #include <stdio.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/printk.h> #include <linux/printk.h>
@ -261,7 +262,8 @@ static void reg_dump(const struct uniphier_ddrphy_param *param)
} }
} }
static int do_ddr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static int do_ddr(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{ {
const struct uniphier_ddrphy_param *param; const struct uniphier_ddrphy_param *param;
char *cmd; char *cmd;

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <env.h> #include <env.h>
#include <mmc.h> #include <mmc.h>
#include <linux/errno.h> #include <linux/errno.h>
@ -28,7 +29,8 @@ int mmc_get_env_dev(void)
return find_first_mmc_device(false); 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; 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; int dev;

View File

@ -19,7 +19,7 @@
DECLARE_GLOBAL_DATA_PTR; 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); rcm_t *rcm = (rcm_t *) (MMAP_RCM);
udelay(1000); udelay(1000);

View File

@ -21,7 +21,7 @@
DECLARE_GLOBAL_DATA_PTR; 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; ccm_t *ccm = (ccm_t *) MMAP_CCM;

View File

@ -27,7 +27,7 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_M5208 #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); rcm_t *rcm = (rcm_t *)(MMAP_RCM);
@ -140,7 +140,7 @@ int print_cpuinfo(void)
} }
#endif /* CONFIG_DISPLAY_CPUINFO */ #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. */ /* Call the board specific reset actions first. */
if(board_reset) { if(board_reset) {
@ -175,7 +175,7 @@ int watchdog_init(void)
#endif #endif
#ifdef CONFIG_M5272 #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); wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
@ -264,7 +264,7 @@ int watchdog_init(void)
#endif /* #ifdef CONFIG_M5272 */ #endif /* #ifdef CONFIG_M5272 */
#ifdef CONFIG_M5275 #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); rcm_t *rcm = (rcm_t *)(MMAP_RCM);
@ -354,7 +354,7 @@ int print_cpuinfo(void)
} }
#endif /* CONFIG_DISPLAY_CPUINFO */ #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; MCFRESET_RCR = MCFRESET_RCR_SOFTRST;
return 0; return 0;
@ -373,7 +373,7 @@ int print_cpuinfo(void)
} }
#endif /* CONFIG_DISPLAY_CPUINFO */ #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 */ /* enable watchdog, set timeout to 0 and wait */
mbar_writeByte(MCFSIM_SYPCR, 0xc0); mbar_writeByte(MCFSIM_SYPCR, 0xc0);
@ -405,7 +405,7 @@ int print_cpuinfo(void)
} }
#endif /* CONFIG_DISPLAY_CPUINFO */ #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 */ /* enable watchdog, set timeout to 0 and wait */
mbar_writeByte(SIM_SYPCR, 0xc0); mbar_writeByte(SIM_SYPCR, 0xc0);

View File

@ -5,13 +5,14 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <init.h> #include <init.h>
#include <vsprintf.h> #include <vsprintf.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_M5307 #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); sim_t *sim = (sim_t *)(MMAP_SIM);

View File

@ -21,7 +21,7 @@
DECLARE_GLOBAL_DATA_PTR; 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); rcm_t *rcm = (rcm_t *) (MMAP_RCM);

View File

@ -21,7 +21,7 @@
DECLARE_GLOBAL_DATA_PTR; 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); rcm_t *rcm = (rcm_t *) (MMAP_RCM);
udelay(1000); udelay(1000);

View File

@ -21,7 +21,7 @@
DECLARE_GLOBAL_DATA_PTR; 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); gptmr_t *gptmr = (gptmr_t *) (MMAP_GPTMR);

View File

@ -49,7 +49,8 @@ void arch_lmb_reserve(struct lmb *lmb)
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp)); 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; int ret;
bd_t *kbd; bd_t *kbd;

View File

@ -187,7 +187,7 @@ void interrupt_handler(void)
} }
#if defined(CONFIG_CMD_IRQ) #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; int i;
struct irq_action *act = vecs; struct irq_action *act = vecs;

View File

@ -6,6 +6,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <image.h> #include <image.h>
#include <spl.h> #include <spl.h>
#include <asm/io.h> #include <asm/io.h>
@ -48,7 +49,7 @@ int spl_start_uboot(void)
return 1; 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;" \ __asm__ __volatile__ ("mts rmsr, r0;" \
"bra r0"); "bra r0");

View File

@ -21,7 +21,7 @@ void __weak _machine_restart(void)
/* NOP */; /* 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(); _machine_restart();

View File

@ -5,6 +5,7 @@
#include <common.h> #include <common.h>
#include <clock_legacy.h> #include <clock_legacy.h>
#include <command.h>
#include <hang.h> #include <hang.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/addrspace.h> #include <asm/addrspace.h>
@ -319,7 +320,8 @@ ulong get_ddr_freq(ulong dummy)
return gd->mem_clk; 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(); ar934x_update_clock();
printf("CPU: %8ld MHz\n", gd->cpu_clk / 1000000); printf("CPU: %8ld MHz\n", gd->cpu_clk / 1000000);

View File

@ -39,7 +39,7 @@ int cleanup_before_linux(void)
return 0; 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(); disable_interrupts();
panic("AE3XX wdt not support yet.\n"); panic("AE3XX wdt not support yet.\n");

View File

@ -39,7 +39,7 @@ int cleanup_before_linux(void)
return 0; 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(); disable_interrupts();

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <cpu.h> #include <cpu.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <dm.h> #include <dm.h>
@ -31,7 +32,7 @@ int checkboard(void)
} }
#endif #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(); disable_interrupts();
/* indirect call to go beyond 256MB limitation of toolchain */ /* indirect call to go beyond 256MB limitation of toolchain */

View File

@ -118,7 +118,7 @@ int interrupt_init(void)
/*************************************************************************/ /*************************************************************************/
#if defined(CONFIG_CMD_IRQ) #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; int i;
struct irq_action *act = vecs; struct irq_action *act = vecs;

View File

@ -6,12 +6,14 @@
#include <common.h> #include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <env.h>
#include <image.h> #include <image.h>
#include <irq_func.h> #include <irq_func.h>
#define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */ #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; void (*kernel)(int, int, int, char *) = (void *)images->ep;
char *commandline = env_get("bootargs"); char *commandline = env_get("bootargs");

View File

@ -123,8 +123,7 @@ int checkcpu(void)
#endif #endif
#ifndef CONFIG_SYSRESET #ifndef CONFIG_SYSRESET
int int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{ {
ulong msr; ulong msr;
#ifndef MPC83xx_RESET #ifndef MPC83xx_RESET

View File

@ -96,7 +96,7 @@ void ecc_print_status(void)
ddr->capture_attributes & ECC_CAPT_ATTR_VLD); 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; immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
#ifdef CONFIG_SYS_FSL_DDR2 #ifdef CONFIG_SYS_FSL_DDR2

View File

@ -71,8 +71,8 @@ void timer_interrupt_cpu (struct pt_regs *regs)
* irqinfo - print information about PCI devices * irqinfo - print information about PCI devices
*/ */
void void do_irqinfo(struct cmd_tbl *cmdtp, bd_t *bd, int flag, int argc,
do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) char *const argv[])
{ {
} }

View File

@ -523,7 +523,8 @@ int get_serial_clock(void)
return get_bus_freq(0); 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]; char buf[32];

View File

@ -129,7 +129,8 @@ static void check_erratum_a007212(void)
} }
#endif #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 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
extern int enable_cpu_a011_workaround; extern int enable_cpu_a011_workaround;

View File

@ -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 */ /* Everything after the first generation of PQ3 parts has RSTCR */
#if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_ARCH_MPC8541) || \ #if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_ARCH_MPC8541) || \

View File

@ -102,7 +102,7 @@ void timer_interrupt_cpu(struct pt_regs *regs)
#if defined(CONFIG_CMD_IRQ) #if defined(CONFIG_CMD_IRQ)
/* irqinfo - print information about PCI devices,not implemented. */ /* 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; return 0;
} }

View File

@ -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 immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
volatile ccsr_gur_t *gur = &immap->im_gur; volatile ccsr_gur_t *gur = &immap->im_gur;

View File

@ -100,7 +100,7 @@ void irq_free_handler(int vec)
/* /*
* irqinfo - print information about PCI devices,not implemented. * 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; return 0;
} }

View File

@ -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; ulong msr, addr;

View File

@ -18,7 +18,8 @@
DECLARE_GLOBAL_DATA_PTR; 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; immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
sysconf8xx_t __iomem *sc = &immap->im_siu_conf; sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
@ -35,7 +36,7 @@ static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0; return 0;
} }
static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, static int do_memcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
@ -58,7 +59,8 @@ static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
return 0; 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; immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
car8xx_t __iomem *car = &immap->im_clkrst; 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 PC_NBITS 12
#define PD_NBITS 13 #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; immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
iop8xx_t __iomem *iop = &immap->im_ioport; 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 * this needs a clean up for smaller tighter code
* use *uint and set the address based on cmd + port * 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; uint rcode = 0;
iopin_t iopin; iopin_t iopin;
@ -328,7 +332,8 @@ static void prbrg(int n, uint val)
putc('\n'); 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; immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
cpm8xx_t __iomem *cp = &immap->im_cpm; cpm8xx_t __iomem *cp = &immap->im_cpm;

View File

@ -232,8 +232,8 @@ static int boot_body_linux(bootm_headers_t *images)
return 0; return 0;
} }
noinline noinline 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) bootm_headers_t *images)
{ {
int ret; int ret;

View File

@ -7,7 +7,7 @@
#include <command.h> #include <command.h>
#include <hang.h> #include <hang.h>
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{ {
printf("resetting ...\n"); printf("resetting ...\n");

View File

@ -29,7 +29,7 @@ int cleanup_before_linux (void)
return 0; 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(); disable_interrupts();
reset_cpu(0); reset_cpu(0);

View File

@ -9,6 +9,7 @@
#include <common.h> #include <common.h>
#include <command.h> #include <command.h>
#include <env.h>
#include <image.h> #include <image.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/zimage.h> #include <asm/zimage.h>
@ -50,7 +51,8 @@ static unsigned long sh_check_cmd_arg(char *cmdline, char *key, int base)
return val; 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 */ /* Linux kernel load address */
void (*kernel) (void) = (void (*)(void))images->ep; void (*kernel) (void) = (void (*)(void))images->ep;

View File

@ -10,11 +10,14 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <env.h>
#include <irq_func.h> #include <irq_func.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/zimage.h> #include <asm/zimage.h>
int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_sh_zimageboot(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{ {
ulong (*zboot_entry)(int, char * const []) = NULL; ulong (*zboot_entry)(int, char * const []) = NULL;
char *s0, *s1; char *s0, *s1;

View File

@ -7,6 +7,8 @@
#ifndef __FSP_VPD_H__ #ifndef __FSP_VPD_H__
#define __FSP_VPD_H__ #define __FSP_VPD_H__
#include <stddef.h>
struct __packed memory_upd { struct __packed memory_upd {
u64 signature; /* Offset 0x0020 */ u64 signature; /* Offset 0x0020 */
u8 revision; /* Offset 0x0028 */ u8 revision; /* Offset 0x0028 */

View File

@ -127,7 +127,7 @@ void do_irq(int hw_irq)
#endif #endif
#if defined(CONFIG_CMD_IRQ) #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) #if !CONFIG_IS_ENABLED(X86_64)
int irq; int irq;

View File

@ -13,6 +13,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <env.h> #include <env.h>
#include <irq_func.h> #include <irq_func.h>
#include <malloc.h> #include <malloc.h>
@ -310,7 +311,7 @@ void __setup_pcat_compatibility(void)
{ {
} }
int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{ {
struct boot_params *base_ptr; struct boot_params *base_ptr;
void *bzImage_addr = NULL; void *bzImage_addr = NULL;

View File

@ -9,6 +9,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <div64.h> #include <div64.h>
#include <env.h> #include <env.h>
@ -376,7 +377,8 @@ void get_arc_info(void)
do_get_arc_info(); 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; const char *cmd;
int ret = -1; int ret = -1;

View File

@ -226,7 +226,7 @@ int drv_video_init(void)
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef CONFIG_VIDEO #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; int rcode = 0;
ulong side; ulong side;

View File

@ -246,7 +246,8 @@ void reset_phy(void)
#if defined(CONFIG_KIRKWOOD_GPIO) #if defined(CONFIG_KIRKWOOD_GPIO)
/* Return GPIO push button status */ /* Return GPIO push button status */
static int 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); return !kw_gpio_get_value(NET2BIG_V2_GPIO_PUSH_BUTTON);
} }

View File

@ -110,7 +110,7 @@ void reset_phy(void)
#if defined(CONFIG_KIRKWOOD_GPIO) #if defined(CONFIG_KIRKWOOD_GPIO)
/* Return GPIO button status */ /* Return GPIO button status */
static int 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); return kw_gpio_get_value(NETSPACE_V2_GPIO_BUTTON);
} }

View File

@ -6,6 +6,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <div64.h> #include <div64.h>
#include <env.h> #include <env.h>
#include <net.h> #include <net.h>
@ -195,8 +196,8 @@ static int do_syno_clk_gate(int argc, char * const argv[])
return 0; return 0;
} }
static int do_syno(cmd_tbl_t *cmdtp, int flag, static int do_syno(struct cmd_tbl *cmdtp, int flag, int argc,
int argc, char * const argv[]) char *const argv[])
{ {
const char *cmd; const char *cmd;
int ret = 0; int ret = 0;

View File

@ -6,6 +6,7 @@
#include <common.h> #include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <env.h>
#include <errno.h> #include <errno.h>
#include <init.h> #include <init.h>
#include <linux/libfdt.h> #include <linux/libfdt.h>

View File

@ -6,6 +6,7 @@
#include <common.h> #include <common.h>
#include <dm.h> #include <dm.h>
#include <env.h>
#include <env_internal.h> #include <env_internal.h>
#include <init.h> #include <init.h>
#include <net.h> #include <net.h>

View File

@ -6,6 +6,7 @@
#include <common.h> #include <common.h>
#include <dm.h> #include <dm.h>
#include <env.h>
#include <env_internal.h> #include <env_internal.h>
#include <init.h> #include <init.h>
#include <net.h> #include <net.h>

View File

@ -9,6 +9,7 @@
* Author: Fabio Estevam <fabio.estevam@freescale.com> * Author: Fabio Estevam <fabio.estevam@freescale.com>
*/ */
#include <command.h>
#include <image.h> #include <image.h>
#include <init.h> #include <init.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>

View File

@ -11,6 +11,7 @@
#include <common.h> #include <common.h>
#include <cpsw.h> #include <cpsw.h>
#include <dm.h> #include <dm.h>
#include <env.h>
#include <env_internal.h> #include <env_internal.h>
#include <errno.h> #include <errno.h>
#include <i2c.h> #include <i2c.h>

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <env.h> #include <env.h>
#include <init.h> #include <init.h>
#include <net.h> #include <net.h>
@ -988,7 +989,7 @@ static int read_keys(char *buf)
return numpressed; 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]; char envvalue[ARRAY_SIZE(buttons)+1];
int numpressed = read_keys(envvalue); int numpressed = read_keys(envvalue);

View File

@ -9,6 +9,7 @@
#include <common.h> #include <common.h>
#include <bootstage.h> #include <bootstage.h>
#include <command.h>
#include <env.h> #include <env.h>
#include <env_internal.h> #include <env_internal.h>
#include <flash.h> #include <flash.h>

View File

@ -4,6 +4,7 @@
**/ **/
#include <common.h> #include <common.h>
#include <command.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/io.h> #include <asm/io.h>
@ -224,7 +225,7 @@ static void atf_print_part_table(void)
} }
} }
int do_atf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_atf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{ {
ssize_t ret; ssize_t ret;
size_t size, offset; size_t size, offset;

View File

@ -5,6 +5,7 @@
* Andreas Bießmann <andreas.biessmann@corscience.de> * Andreas Bießmann <andreas.biessmann@corscience.de>
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <eeprom.h> #include <eeprom.h>
#include <i2c.h> #include <i2c.h>
#include <u-boot/crc.h> #include <u-boot/crc.h>
@ -186,7 +187,7 @@ int tricorder_eeprom_write(unsigned devaddr, const char *name,
return ret; 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) { if (argc == 3) {
ulong dev_addr = simple_strtoul(argv[2], NULL, 16); ulong dev_addr = simple_strtoul(argv[2], NULL, 16);

View File

@ -32,6 +32,7 @@
* http://www.ethernut.de/ * http://www.ethernut.de/
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <asm/arch/at91sam9260.h> #include <asm/arch/at91sam9260.h>
#include <asm/arch/at91_common.h> #include <asm/arch/at91_common.h>
#include <asm/arch/gpio.h> #include <asm/arch/gpio.h>
@ -215,7 +216,7 @@ void ethernut5_print_voltage(void)
/* /*
* Process the board specific 'pwrman' command. * 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; u8 val;
int i; int i;

View File

@ -7,6 +7,7 @@
*/ */
#include <common.h> #include <common.h>
#include <command.h>
#include <console.h> #include <console.h>
#include <ioports.h> #include <ioports.h>
#include <mpc83xx.h> #include <mpc83xx.h>
@ -36,7 +37,7 @@ void generate_answer(struct caddy_cmd *cmd, uint32_t status, uint32_t *result)
caddy_interface->answer_in = ptr; 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; unsigned long base_addr;
uint32_t ptr; uint32_t ptr;

View File

@ -89,7 +89,7 @@ static void cpld_dump_regs(void)
#endif #endif
#ifndef CONFIG_SPL_BUILD #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; int rc = 0;
unsigned char value; unsigned char value;

View File

@ -8,7 +8,7 @@
#include <env.h> #include <env.h>
#include <fsl_validate.h> #include <fsl_validate.h>
int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc, int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
if (fsl_check_boot_mode_secure() == 0) { if (fsl_check_boot_mode_secure() == 0) {
@ -24,7 +24,7 @@ loop:
} }
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_SPL_BUILD
static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc, static int do_esbc_validate(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
char *hash_str = NULL; char *hash_str = NULL;

View File

@ -171,7 +171,8 @@ void pixis_sysclk_set(unsigned long sysclk)
PIXIS_WRITE(sclk[2], sclk2); 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 int i;
unsigned long sysclk; unsigned long sysclk;

Some files were not shown because too many files have changed in this diff Show More