From 90526e9fbac47af16d70f323feae45d8d1b0f9b7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:39:56 -0600 Subject: common: Drop net.h from common header Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass --- arch/arm/lib/bootm.c | 1 + arch/arm/lib/cache.c | 1 + arch/arm/lib/psci-dt.c | 1 + arch/arm/lib/spl.c | 1 + 4 files changed, 4 insertions(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index f4b5ca6de00..dc845a997f4 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -29,6 +29,7 @@ #include #include #include +#include #ifdef CONFIG_ARMV7_NONSEC #include diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index 224f2aef14d..d5c67c11dee 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -9,6 +9,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c index 246f3c7cb84..0ed29a43f10 100644 --- a/arch/arm/lib/psci-dt.c +++ b/arch/arm/lib/psci-dt.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index 33cc76ba3de..8a24e34f620 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From 52f24238046ca28085f6de946d0358e5c7c7cbe8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:00 -0600 Subject: common: Drop bootstage.h from common header Move this fairly uncommon header out of the common header. Signed-off-by: Simon Glass --- arch/arm/lib/bootm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index dc845a997f4..c189bdcf9a0 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include -- cgit v1.2.3 From 4d72caa5b96b71e49b63f98bd8548b194380b544 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:01 -0600 Subject: common: Drop image.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- arch/arm/lib/bootm.c | 1 + arch/arm/lib/image.c | 1 + arch/arm/lib/zimage.c | 1 + 3 files changed, 3 insertions(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index c189bdcf9a0..68beea2c9db 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c index 699bf44e702..9cf4a67406e 100644 --- a/arch/arm/lib/image.c +++ b/arch/arm/lib/image.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c index 49305299b39..477ea94997d 100644 --- a/arch/arm/lib/zimage.c +++ b/arch/arm/lib/zimage.c @@ -7,6 +7,7 @@ * Copyright (C) 2012 Marek Vasut */ #include +#include #define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818 #define BAREBOX_IMAGE_MAGIC 0x00786f62 -- cgit v1.2.3 From 691d719db7183dfb1d1360efed4c5e9f6899095f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:02 -0600 Subject: common: Drop init.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- arch/arm/lib/spl.c | 1 + arch/arm/lib/stack.c | 1 + 2 files changed, 2 insertions(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index 8a24e34f620..5d5437cbbc2 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c index c89a219dd26..96a248c0a90 100644 --- a/arch/arm/lib/stack.c +++ b/arch/arm/lib/stack.c @@ -11,6 +11,7 @@ * Marius Groeger */ #include +#include DECLARE_GLOBAL_DATA_PTR; -- cgit v1.2.3 From 09140113108541b95d340f3c7b6ee597d31ccc73 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:03 -0600 Subject: 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 --- arch/arm/lib/bootm.c | 2 +- arch/arm/lib/cmd_boot.c | 2 +- arch/arm/lib/reset.c | 5 +++-- arch/arm/lib/semihosting.c | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 68beea2c9db..0facd0c9893 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 03dde842528..c905ecc4bd9 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 835a40e59d9..65b4be20b81 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -21,6 +21,7 @@ */ #include +#include #include #include @@ -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 2658026cf49..1b365a970fa 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/arm/lib/semihosting.c @@ -13,6 +13,7 @@ */ #include #include +#include #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; -- cgit v1.2.3 From f7ae49fc4f363a803dab3be078e93ead8e75a8e9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:05 -0600 Subject: common: Drop log.h from common header Move this header out of the common header. Signed-off-by: Simon Glass --- arch/arm/lib/bootm.c | 1 + arch/arm/lib/cache-cp15.c | 1 + arch/arm/lib/cache.c | 1 + arch/arm/lib/semihosting.c | 1 + arch/arm/lib/spl.c | 1 + 5 files changed, 5 insertions(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 0facd0c9893..2df98d3e01b 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index f803d6fb8ce..1da2e92fe24 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index d5c67c11dee..ee7d14b2d31 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index 1b365a970fa..904fddd6c04 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/arm/lib/semihosting.c @@ -14,6 +14,7 @@ #include #include #include +#include #define SYSOPEN 0x01 #define SYSCLOSE 0x02 diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index 5d5437cbbc2..af0c9ad6bd6 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 25a5818ff8f17420982e682c4282fcfe8405385e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:06 -0600 Subject: common: Drop asm/ptrace.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- arch/arm/lib/interrupts.c | 1 + arch/arm/lib/interrupts_64.c | 1 + 2 files changed, 2 insertions(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 36299d6e543..703be5a3209 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -23,6 +23,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c index a2df7cf193c..52994890137 100644 --- a/arch/arm/lib/interrupts_64.c +++ b/arch/arm/lib/interrupts_64.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include -- cgit v1.2.3 From c05ed00afb95fa5237f16962fccf5810437317bf Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:11 -0600 Subject: common: Drop linux/delay.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- arch/arm/lib/reset.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c index 65b4be20b81..4f1a768bfe1 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -24,6 +24,7 @@ #include #include #include +#include __weak void reset_misc(void) { -- cgit v1.2.3 From cd93d625fd751d55c729c78b10f82109d56a5f1d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:13 -0600 Subject: common: Drop linux/bitops.h from common header Move this uncommon header out of the common header. Signed-off-by: Simon Glass --- arch/arm/lib/gic-v3-its.c | 1 + arch/arm/lib/image.c | 1 + 2 files changed, 2 insertions(+) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c index 6ee22d2944b..90f37a123cd 100644 --- a/arch/arm/lib/gic-v3-its.c +++ b/arch/arm/lib/gic-v3-its.c @@ -6,6 +6,7 @@ #include #include #include +#include #include static u32 lpi_id_bits; diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c index 9cf4a67406e..94590d3049a 100644 --- a/arch/arm/lib/image.c +++ b/arch/arm/lib/image.c @@ -7,6 +7,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; -- cgit v1.2.3