u-boot-brain/arch/arc
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
..
cpu arc: No need in sections defined in sources with newer tools 2016-08-05 12:50:25 +03:00
dts arc: Add support for HS Development Kit board 2017-06-29 19:34:10 +03:00
include/asm ARC: ARCv2: Cache: Fixed operation without IOC 2018-01-19 17:59:34 +03:00
lib ARC: ARCv2: Cache: Fixed operation without IOC 2018-01-19 17:59:34 +03:00
config.mk arc: Use -mcpu=XXX instead of obsolete -marcXXX 2016-09-16 12:12:26 +03:00
Kconfig arc: Add support for HS Development Kit board 2017-06-29 19:34:10 +03:00
Makefile arc: introduce separate section for interrupt vector table 2015-01-15 22:38:42 +03:00