summaryrefslogtreecommitdiff
path: root/board/gdsys
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 20:40:03 +0300
committerTom Rini <trini@konsulko.com>2020-05-19 01:36:55 +0300
commit09140113108541b95d340f3c7b6ee597d31ccc73 (patch)
tree4b4241b799bbbb2eeef4164392442b193af1703f /board/gdsys
parent691d719db7183dfb1d1360efed4c5e9f6899095f (diff)
downloadu-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.xz
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 'board/gdsys')
-rw-r--r--board/gdsys/a38x/controlcenterdc.c1
-rw-r--r--board/gdsys/a38x/hydra.c3
-rw-r--r--board/gdsys/common/cmd_ioloop.c10
-rw-r--r--board/gdsys/common/osd.c10
-rw-r--r--board/gdsys/common/osd_cmd.c13
-rw-r--r--board/gdsys/mpc8308/gazerbeam.c1
-rw-r--r--board/gdsys/p1022/controlcenterd.c2
7 files changed, 23 insertions, 17 deletions
diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index 7aad683127..0d53d69ecc 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <init.h>
#include <miiphy.h>
diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c
index fa50ad2830..daade6da0a 100644
--- a/board/gdsys/a38x/hydra.c
+++ b/board/gdsys/a38x/hydra.c
@@ -1,4 +1,5 @@
#include <common.h>
+#include <command.h>
#include <console.h> /* ctrlc */
#include <asm/io.h>
@@ -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 05a14ff103..88ab8233d5 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 10c4329146..cda0cc6b48 100644
--- a/board/gdsys/common/osd.c
+++ b/board/gdsys/common/osd.c
@@ -7,6 +7,7 @@
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
+#include <command.h>
#include <i2c.h>
#include <malloc.h>
@@ -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 53179b9811..fe6249794e 100644
--- a/board/gdsys/common/osd_cmd.c
+++ b/board/gdsys/common/osd_cmd.c
@@ -10,13 +10,14 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <hexdump.h>
#include <video_osd.h>
#include <malloc.h>
-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 8c9636d292..b64a6d992d 100644
--- a/board/gdsys/mpc8308/gazerbeam.c
+++ b/board/gdsys/mpc8308/gazerbeam.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <board.h>
+#include <command.h>
#include <dm.h>
#include <env.h>
#include <fdt_support.h>
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index b39b0b6002..e960fa71ac 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);
}