summaryrefslogtreecommitdiff
path: root/arch/sh/cpu/sh4/cache.c
Commit message (Collapse)AuthorAgeLines
* sh4: cache: move exported cache manipulation functions into cache.cVladimir Zapolskiy2016-12-02-3/+36
| | | | | | | | | No functional change, moving cache manipulation functions into cache.c allows to collect all of them in a single location and as a pleasant side effect cache_control() function can be unexported now. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sh: cache: don't modify CCR from P1 areaVladimir Zapolskiy2016-12-02-5/+3
| | | | | | | | | | | cache_wback_all() is a local function and it is called from cache_control() only, which is in turn jumps to P2 area. The change fixes an issue when cache_wback_all() returns from P2 to P1, however cache_control() continues to manipulate with CCR register, according to the User's Manual this is restricted. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
* sh: cache use jump_to_P2() and back_to_P1() from asm/system.hVladimir Zapolskiy2016-12-02-37/+2
| | | | | | | | Both jump_to_P2() and back_to_P1() functions are found in asm/system.h header file and functionally they are the same, don't redefine them. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sh4: cache: correct dcache flush to invalidate with write-backVladimir Zapolskiy2016-12-02-1/+1
| | | | | | | | | | | | | | | In common usecases flush_cache() assumes both cache invalidation and write-back to memory, thus in flush_dcache_range() implementation change SH4 cache write-back only instruction 'ocbwb' with cache purge instruction 'ocbp', according to the User's Manual there should be no performance penalty for that. Note that under circumstances only cache invalidation is expected from flush_cache() call, in these occasional cases the current version of flush_cache() works, which is a wrapper over invalidate_dcache_range() at the moment, this will be fixed in the following change. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
* sh: cache: Change cache API to defines as U-BootNobuhiro Iwamatsu2013-10-17-2/+2
| | | | | | | | | A chache API of SH is developped by reference in linux kernel. And API was the same as the linux kernel. This patch change cache API to defines as U-Boot. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* sh: avoid multiple definition errors with cache funcsMike Frysinger2011-12-02-0/+22
| | | | | | | | | | | | | Recent builds for SH4 boards fail with a lot of errors like: cmd_mem.o: In function 'dcache_invalid_range': include/asm/cache.h:25: multiple definition of 'dcache_invalid_range' include/asm/cache.h:25: first defined here This is due to the funcs being defined in the header, but not static or inline or extern. So move them to the sh4-specific cache.c file. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
* sh: Move cpu/$CPU to arch/sh/cpu/$CPUPeter Tyser2010-04-13-0/+108
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>