u-boot/arch/arc/lib
Eugeniy Paltsev 41cada4d24 ARC: ARCv2: Cache: Fixed operation without IOC
Previous SLC management implementation is broken. Seems like it was
never sufficiently tested probably because most of the time IOC was used
instead (i.e. no manual cache operations were done).

Now if we disable IOC in U-boot we'll get a lot of errors while using
DMA-enabled peripherals.

This time we fix it by substitution of broken per-line SLC operations
region operations as it is done in the Linux kernel (we took it from
v4.14 which is the latest stable as of today).

Among other things this implementation might be a bit faster because
instead of iteration over each and every cache line we're taking care
about entire region in one go.

Main changes:
 * Replaced __slc_line_op (per line operations) by __slc_rgn_op
   (region operations).

 * Reworked __slc_entire_op to get rid of __after_slc_op and
   __before_slc_op functions.
   Note flush fix (flush only instead of flush-n-inv when OP_FLUSH is
   used, see [1] for more details) is already incorporated here.

 * Added SLC invalidation to invalidate_icache_all().

 * Added (start >= end) check to invalidate_dcache_range() and
   flush_dcache_range() as some buggy drivers pass region start == end.

 * Added read-out of MMU BCR so we may know if PAE40 exists in HW and then
   act on a particular AUX regs accordingly.

[1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-January/003357.html

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-01-19 17:59:34 +03:00
..
_millicodethunk.S arc: build libgcc in U-Boot 2015-02-09 16:41:20 +03:00
bootm.c arc: bootm: Move slave cores kick-starting under !fake 2017-11-24 19:38:07 +03:00
cache.c ARC: ARCv2: Cache: Fixed operation without IOC 2018-01-19 17:59:34 +03:00
cpu.c board_f: Rename initdram() to dram_init() 2017-04-13 09:40:57 -04:00
init_helpers.c arc: significant cache rework 2015-07-01 17:17:27 +03:00
interrupts.c arc: Update exception & interrupt handling for ARCv2 2016-08-05 12:50:25 +03:00
ints_low.S arc: Update exception & interrupt handling for ARCv2 2016-08-05 12:50:25 +03:00
libgcc2.c arc: build libgcc in U-Boot 2015-02-09 16:41:20 +03:00
libgcc2.h arc: build libgcc in U-Boot 2015-02-09 16:41:20 +03:00
Makefile arc: use timer driver for ARC boards 2017-03-24 14:47:52 +03:00
memcmp.S arc: memcmp - fix zero-delay loop utilization 2015-02-09 16:41:20 +03:00
memcpy-700.S arc: add library functions 2014-02-07 08:14:32 -05:00
memset.S arc: add library functions 2014-02-07 08:14:32 -05:00
relocate.c arc: No need in sections defined in sources with newer tools 2016-08-05 12:50:25 +03:00
reset.c arc: move common sources in library 2015-01-15 22:40:49 +03:00
start.S arc: arcv1: Disable master/slave check 2017-06-29 19:34:10 +03:00
strchr-700.S arc: add library functions 2014-02-07 08:14:32 -05:00
strcmp.S arc: add library functions 2014-02-07 08:14:32 -05:00
strcpy-700.S arc: add library functions 2014-02-07 08:14:32 -05:00
strlen.S arc: add library functions 2014-02-07 08:14:32 -05:00