From b36992fb6b6d2d53a2cf1a5158ad6ed1335b0de9 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 25 Feb 2020 02:22:27 +0900 Subject: global_data.h: make self-contained The compiler never knows what 'bd_t' is without including . By changing it to (struct bd_info), the compiler learns it is struct. Signed-off-by: Masahiro Yamada --- include/asm-generic/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 5d027329fe0..d9e220cfe35 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -25,7 +25,7 @@ #include typedef struct global_data { - bd_t *bd; + struct bd_info *bd; unsigned long flags; unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ -- cgit v1.3.1 From 4ca281a56c35fb8c1cce934203821821ea1ed01c Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 25 Feb 2020 02:24:17 +0900 Subject: asm-generic/u-boot.h: make self-contained This header uses 'phys_addr_t' and 'ulong'. Include the definitions. Signed-off-by: Masahiro Yamada [trini: Move include to below __ASSEMBLY__ test] Signed-off-by: Tom Rini --- include/asm-generic/u-boot.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index eee84f49bb1..cc94d39069e 100644 --- a/include/asm-generic/u-boot.h +++ b/include/asm-generic/u-boot.h @@ -23,6 +23,8 @@ #ifndef __ASSEMBLY__ +#include + typedef struct bd_info { unsigned long bi_memstart; /* start of DRAM memory */ phys_size_t bi_memsize; /* size of DRAM memory in bytes */ -- cgit v1.3.1 From 77c4ba54c678d5c892e4b692640424dbfe649e30 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 25 Feb 2020 02:24:54 +0900 Subject: debug_uart.h: make self-contained 'uint' is not a primitive type. You need to include or otherwise change it to (unsigned int). Signed-off-by: Masahiro Yamada Reviewed-by: Kever Yang --- include/debug_uart.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/debug_uart.h b/include/debug_uart.h index cd70ae1a044..4d1c58075cf 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -88,28 +88,28 @@ void printascii(const char *str); * * @value: Value to output */ -void printhex2(uint value); +void printhex2(unsigned int value); /** * printhex4() - Output a 4-digit hex value * * @value: Value to output */ -void printhex4(uint value); +void printhex4(unsigned int value); /** * printhex8() - Output a 8-digit hex value * * @value: Value to output */ -void printhex8(uint value); +void printhex8(unsigned int value); /** * printdec() - Output a decimalism value * * @value: Value to output */ -void printdec(uint value); +void printdec(unsigned int value); #ifdef CONFIG_DEBUG_UART_ANNOUNCE #define _DEBUG_UART_ANNOUNCE printascii(" "); @@ -151,34 +151,34 @@ void printdec(uint value); _printch(*str++); \ } \ \ - static inline void printhex1(uint digit) \ + static inline void printhex1(unsigned int digit) \ { \ digit &= 0xf; \ _debug_uart_putc(digit > 9 ? digit - 10 + 'a' : digit + '0'); \ } \ \ - static inline void printhex(uint value, int digits) \ + static inline void printhex(unsigned int value, int digits) \ { \ while (digits-- > 0) \ printhex1(value >> (4 * digits)); \ } \ \ - void printhex2(uint value) \ + void printhex2(unsigned int value) \ { \ printhex(value, 2); \ } \ \ - void printhex4(uint value) \ + void printhex4(unsigned int value) \ { \ printhex(value, 4); \ } \ \ - void printhex8(uint value) \ + void printhex8(unsigned int value) \ { \ printhex(value, 8); \ } \ \ - void printdec(uint value) \ + void printdec(unsigned int value) \ { \ if (value > 10) { \ printdec(value / 10); \ -- cgit v1.3.1 From 271cf2f421af072932404d56e6a7c97538d65de0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 25 Feb 2020 02:25:46 +0900 Subject: spl.h: make self-contained The static inline function spl_phase needs . Some functions take pointers to struct blk_desc or image_header. Add forward declarations. Signed-off-by: Masahiro Yamada Reviewed-by: Simon Glass --- include/spl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/spl.h b/include/spl.h index 6087cd793c2..5d8d14dbf5c 100644 --- a/include/spl.h +++ b/include/spl.h @@ -10,9 +10,13 @@ /* Platform-specific defines */ #include +#include #include #include +struct blk_desc; +struct image_header; + /* Value in r0 indicates we booted from U-Boot */ #define UBOOT_NOT_LOADED_FROM_SPL 0x13578642 -- cgit v1.3.1