summaryrefslogtreecommitdiff
path: root/arch/arm/lib
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 /arch/arm/lib
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 'arch/arm/lib')
-rw-r--r--arch/arm/lib/bootm.c2
-rw-r--r--arch/arm/lib/cmd_boot.c2
-rw-r--r--arch/arm/lib/reset.c5
-rw-r--r--arch/arm/lib/semihosting.c4
4 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 68beea2c9d..0facd0c989 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -422,7 +422,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
* DIFFERENCE: Instead of calling prep and go at the end
* they are called if subcommand is equal 0.
*/
-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)
{
/* No need for those on ARM */
diff --git a/arch/arm/lib/cmd_boot.c b/arch/arm/lib/cmd_boot.c
index 03dde84252..c905ecc4bd 100644
--- a/arch/arm/lib/cmd_boot.c
+++ b/arch/arm/lib/cmd_boot.c
@@ -32,7 +32,7 @@
* instructions, otherwise a fault occurs."
*/
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
ulong addr = (ulong)entry | 1;
entry = (void *)addr;
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 835a40e59d..65b4be20b8 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -21,6 +21,7 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_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");
- udelay (50000); /* wait 50 ms */
+ mdelay(50); /* wait 50 ms */
disable_interrupts();
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index 2658026cf4..1b365a970f 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
#include <command.h>
+#include <env.h>
#define SYSOPEN 0x01
#define SYSCLOSE 0x02
@@ -180,7 +181,8 @@ static int smh_load_file(const char * const name, ulong load_addr,
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) {
ulong load_addr;