diff options
author | Tom Rini <trini@konsulko.com> | 2020-12-23 18:10:15 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-12-23 18:10:15 -0500 |
commit | 958b9e2482538ebfeb2e1161257603d4dec498cb (patch) | |
tree | 6b9283b58c8684a239d25492c2e8a8b1319be8ca /arch/sandbox/cpu/cache.c | |
parent | 8351a29d2df18c92d8e365cfa848218c3859f3d2 (diff) | |
parent | ec1add1e51affd4aacc308dc37439ea13dc1b70e (diff) |
Merge tag 'dm-next-23dec20' of git://git.denx.de/u-boot-dm into next
dm: New sequence number implementation
SPI handling of bus with different-speed devices
patman supression of sign-offs
Diffstat (limited to 'arch/sandbox/cpu/cache.c')
-rw-r--r-- | arch/sandbox/cpu/cache.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/cache.c b/arch/sandbox/cpu/cache.c new file mode 100644 index 00000000000..46c62c0b446 --- /dev/null +++ b/arch/sandbox/cpu/cache.c @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2020, Heinrich Schuchardt <xypron.glpk@gmx.de> + */ + +#include <common.h> +#include <cpu_func.h> +#include <asm/state.h> + +void flush_cache(unsigned long addr, unsigned long size) +{ + /* Clang uses (char *) parameters, GCC (void *) */ + __builtin___clear_cache((void *)addr, (void *)(addr + size)); +} + +void invalidate_icache_all(void) +{ + struct sandbox_state *state = state_get_current(); + + /* Clang uses (char *) parameters, GCC (void *) */ + __builtin___clear_cache((void *)state->ram_buf, + (void *)(state->ram_buf + state->ram_size)); +} |