Skip to content

Commit 0914011

Browse files
sjg20trini
authored andcommitted
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>
1 parent 691d719 commit 0914011

File tree

465 files changed

+1988
-1528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

465 files changed

+1988
-1528
lines changed

arch/arc/lib/bootm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <common.h>
77
#include <bootstage.h>
8+
#include <env.h>
89
#include <image.h>
910
#include <irq_func.h>
1011
#include <lmb.h>

arch/arc/lib/reset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ __weak void reset_cpu(ulong addr)
1313
__builtin_arc_brk();
1414
}
1515

16-
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
16+
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
1717
{
1818
printf("Resetting the board...\n");
1919

arch/arm/cpu/arm1136/mx35/generic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <common.h>
1010
#include <clock_legacy.h>
11+
#include <command.h>
1112
#include <div64.h>
1213
#include <init.h>
1314
#include <net.h>
@@ -379,8 +380,8 @@ u32 imx_get_fecclk(void)
379380
}
380381
#endif
381382

382-
int do_mx35_showclocks(cmd_tbl_t *cmdtp,
383-
int flag, int argc, char * const argv[])
383+
int do_mx35_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
384+
char *const argv[])
384385
{
385386
u32 cpufreq = get_mcu_main_clk();
386387
printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000);

arch/arm/cpu/arm926ejs/mxs/mxs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
#include <common.h>
13+
#include <command.h>
1314
#include <cpu_func.h>
1415
#include <hang.h>
1516
#include <init.h>
@@ -187,7 +188,8 @@ int print_cpuinfo(void)
187188
}
188189
#endif
189190

190-
int do_mx28_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
191+
int do_mx28_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
192+
char *const argv[])
191193
{
192194
printf("CPU: %3d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
193195
printf("BUS: %3d MHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000000);

arch/arm/cpu/arm926ejs/spear/cpu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include <common.h>
8+
#include <command.h>
89
#include <init.h>
910
#include <asm/io.h>
1011
#include <asm/arch/hardware.h>
@@ -81,7 +82,7 @@ int print_cpuinfo(void)
8182
#endif
8283

8384
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC)
84-
static int do_switch_ecc(cmd_tbl_t *cmdtp, int flag, int argc,
85+
static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
8586
char *const argv[])
8687
{
8788
if (argc != 2)

arch/arm/cpu/arm926ejs/spear/spr_misc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ static int write_mac(uchar *mac)
182182
}
183183
#endif
184184

185-
int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
185+
int do_chip_config(struct cmd_tbl *cmdtp, int flag, int argc,
186+
char *const argv[])
186187
{
187188
void (*sram_setfreq) (unsigned int, unsigned int);
188189
unsigned int frequency;

arch/arm/cpu/armv7/vf610/generic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <common.h>
77
#include <clock_legacy.h>
8+
#include <command.h>
89
#include <cpu_func.h>
910
#include <init.h>
1011
#include <net.h>
@@ -240,8 +241,8 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
240241
}
241242

242243
/* Dump some core clocks */
243-
int do_vf610_showclocks(cmd_tbl_t *cmdtp, int flag, int argc,
244-
char * const argv[])
244+
int do_vf610_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
245+
char *const argv[])
245246
{
246247
printf("\n");
247248
printf("cpu clock : %8d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);

arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include <common.h>
8+
#include <env.h>
89
#include <asm/io.h>
910
#include <linux/errno.h>
1011
#include <asm/arch/fsl_serdes.h>

arch/arm/cpu/armv8/fsl-layerscape/mp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ int cpu_status(u32 nr)
260260
return 0;
261261
}
262262

263-
int cpu_release(u32 nr, int argc, char * const argv[])
263+
int cpu_release(u32 nr, int argc, char *const argv[])
264264
{
265265
u64 boot_addr;
266266
u64 *table = (u64 *)get_spin_tbl_addr();

arch/arm/include/asm/arch-mx6/clock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define MXC_CLK32 32768
2222
#endif
2323

24-
struct cmd_tbl_s;
24+
struct cmd_tbl;
2525

2626
enum mxc_clock {
2727
MXC_ARM_CLK = 0,
@@ -82,6 +82,6 @@ void enable_thermal_clk(void);
8282
void mxs_set_lcdclk(u32 base_addr, u32 freq);
8383
void select_ldb_di_clock_source(enum ldb_di_clock clk);
8484
void enable_eim_clk(unsigned char enable);
85-
int do_mx6_showclocks(struct cmd_tbl_s *cmdtp, int flag, int argc,
85+
int do_mx6_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
8686
char *const argv[]);
8787
#endif /* __ASM_ARCH_CLOCK_H */

0 commit comments

Comments
 (0)