mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00
cmd: cache: Remove weak functions
It should be up to an architecture to decide how to implement cache functions, and if they need to use weak functions or not. Allowing the cache command to be built without cache functionality implemented is unhelpful. Further, guard the call to noncached_set_region with CONFIG_SYS_NONCACHED_MEMORY as that's when it's implemented and again is an architecture specific detail. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
280e54656f
commit
7d6cee2cd0
1 changed files with 2 additions and 16 deletions
18
cmd/cache.c
18
cmd/cache.c
|
@ -13,16 +13,6 @@
|
|||
|
||||
static int parse_argv(const char *);
|
||||
|
||||
void __weak invalidate_icache_all(void)
|
||||
{
|
||||
/* please define arch specific invalidate_icache_all */
|
||||
puts("No arch specific invalidate_icache_all available!\n");
|
||||
}
|
||||
|
||||
__weak void noncached_set_region(void)
|
||||
{
|
||||
}
|
||||
|
||||
static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
|
@ -52,12 +42,6 @@ static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void __weak flush_dcache_all(void)
|
||||
{
|
||||
puts("No arch specific flush_dcache_all available!\n");
|
||||
/* please define arch specific flush_dcache_all */
|
||||
}
|
||||
|
||||
static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
|
@ -69,7 +53,9 @@ static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
break;
|
||||
case 1:
|
||||
dcache_enable();
|
||||
#ifdef CONFIG_SYS_NONCACHED_MEMORY
|
||||
noncached_set_region();
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
flush_dcache_all();
|
||||
|
|
Loading…
Add table
Reference in a new issue