summaryrefslogtreecommitdiff
path: root/arch/arm/mach-meson
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 11:40:03 -0600
committerTom Rini <trini@konsulko.com>2020-05-18 18:36:55 -0400
commit09140113108541b95d340f3c7b6ee597d31ccc73 (patch)
tree4b4241b799bbbb2eeef4164392442b193af1703f /arch/arm/mach-meson
parent691d719db7183dfb1d1360efed4c5e9f6899095f (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 'arch/arm/mach-meson')
-rw-r--r--arch/arm/mach-meson/sm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index dacc897533..725897a0ec 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -6,6 +6,8 @@
*/
#include <common.h>
+#include <command.h>
+#include <env.h>
#include <asm/arch/sm.h>
#include <asm/cache.h>
#include <linux/err.h>
@@ -117,7 +119,7 @@ int meson_sm_get_reboot_reason(void)
return FIELD_GET(REBOOT_REASON_MASK, reason);
}
-static int do_sm_serial(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sm_serial(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
ulong address;
@@ -153,8 +155,8 @@ static const char *reboot_reasons[MAX_REBOOT_REASONS] = {
[REBOOT_REASON_WATCHDOG_REBOOT] = "watchdog_reboot",
};
-static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
- char *const argv[])
+static int do_sm_reboot_reason(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *reason_str;
char *destarg = NULL;
@@ -181,15 +183,15 @@ static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t cmd_sm_sub[] = {
+static struct cmd_tbl cmd_sm_sub[] = {
U_BOOT_CMD_MKENT(serial, 2, 1, do_sm_serial, "", ""),
U_BOOT_CMD_MKENT(reboot_reason, 1, 1, do_sm_reboot_reason, "", ""),
};
-static int do_sm(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sm(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
if (argc < 2)
return CMD_RET_USAGE;