1 From aab8e6cf7afbbcef60593c6b1795fa5d8e78e597 Mon Sep 17 00:00:00 2001
2 From: Jonas Jelonek <jelonek.jonas@gmail.com>
3 Date: Tue, 15 Oct 2024 20:02:25 +0200
4 Subject: [PATCH] arm: provide noncached_set_region prototype to fix build
6 Due to the removal of weak functions in 7d6cee2cd0 ("cmd: cache: Remove
7 weak function"), uboot fails to compile after updating to v2024.10 for
8 mediatek target in OpenWrt with GCC-14 with error:
9 cmd/cache.c: In function 'do_dcache':
10 cmd/cache.c:57:25: error: implicit declaration of function
11 'noncached_set_region' [-Wimplicit-function-declaration]
13 Thus, provide a prototype in arm's include/asm/system.h to fix a build
14 error in cmd/cache.c, since related prototypes are also located there.
15 Also add an include of asm/system.h in cmd/cache.c have the function
18 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
20 arch/arm/include/asm/system.h | 1 +
22 2 files changed, 2 insertions(+)
24 --- a/arch/arm/include/asm/system.h
25 +++ b/arch/arm/include/asm/system.h
26 @@ -658,6 +658,7 @@ void mmu_set_region_dcache_behaviour(phy
29 int noncached_init(void);
30 +void noncached_set_region(void);
32 phys_addr_t noncached_alloc(size_t size, size_t align);
33 #endif /* CONFIG_SYS_NONCACHED_MEMORY */
39 #include <linux/compiler.h>
40 +#include <asm/system.h>
42 static int parse_argv(const char *);