diff options
author | Simon Glass | 2020-05-10 11:40:03 -0600 |
---|---|---|
committer | Tom Rini | 2020-05-18 18:36:55 -0400 |
commit | 09140113108541b95d340f3c7b6ee597d31ccc73 (patch) | |
tree | 4b4241b799bbbb2eeef4164392442b193af1703f /drivers/net/pfe_eth | |
parent | 691d719db7183dfb1d1360efed4c5e9f6899095f (diff) |
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>
Diffstat (limited to 'drivers/net/pfe_eth')
-rw-r--r-- | drivers/net/pfe_eth/pfe_cmd.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/pfe_eth/pfe_cmd.c b/drivers/net/pfe_eth/pfe_cmd.c index dd8c68d57d0..bae5f8a4791 100644 --- a/drivers/net/pfe_eth/pfe_cmd.c +++ b/drivers/net/pfe_eth/pfe_cmd.c @@ -9,6 +9,7 @@ * @brief PFE utility commands */ +#include <command.h> #include <net/pfe_eth/pfe_eth.h> static inline void pfe_command_help(void) @@ -16,7 +17,7 @@ static inline void pfe_command_help(void) printf("Usage: pfe [pe | status | expt ] <options>\n"); } -static void pfe_command_pe(int argc, char * const argv[]) +static void pfe_command_pe(int argc, char *const argv[]) { if (argc >= 3 && strcmp(argv[2], "pmem") == 0) { if (argc >= 4 && strcmp(argv[3], "read") == 0) { @@ -271,7 +272,7 @@ static void bmu(int id, void *base) #define PEMBOX_ADDR_TMU 0x290 #define PESTATUS_ADDR_UTIL 0x0 -static void pfe_pe_status(int argc, char * const argv[]) +static void pfe_pe_status(int argc, char *const argv[]) { int do_clear = 0; u32 id; @@ -336,7 +337,7 @@ static void pfe_pe_status(int argc, char * const argv[]) } } -static void pfe_command_status(int argc, char * const argv[]) +static void pfe_command_status(int argc, char *const argv[]) { if (argc >= 3 && strcmp(argv[2], "pe") == 0) { pfe_pe_status(argc, argv); @@ -370,7 +371,7 @@ static const char *register_names[EXPT_REG_COUNT] = { " r12", " r13", " r14", " r15" }; -static void pfe_command_expt(int argc, char * const argv[]) +static void pfe_command_expt(int argc, char *const argv[]) { unsigned int id, i, val, addr; @@ -414,7 +415,7 @@ static void send_dummy_pkt_to_hif(void) writel(buf, TMU_PHY_INQ_PKTINFO); } -static void pfe_command_stop(int argc, char * const argv[]) +static void pfe_command_stop(int argc, char *const argv[]) { int pfe_pe_id, hif_stop_loop = 10; u32 rx_status; @@ -462,8 +463,8 @@ static void pfe_command_stop(int argc, char * const argv[]) } #endif -static int pfe_command(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int pfe_command(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { if (argc == 1 || strcmp(argv[1], "help") == 0) { pfe_command_help(); |