From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Brodkin Date: Wed, 1 Jul 2015 14:20:44 +0000 Subject: [U-Boot] [PATCH v2] arc: significant cache rework In-Reply-To: <1435760131-369-1-git-send-email-abrodkin@synopsys.com> References: <1435760131-369-1-git-send-email-abrodkin@synopsys.com> Message-ID: <1435760444.4689.51.camel@synopsys.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 2015-07-01 at 17:15 +0300, Alexey Brodkin wrote: > From: Alexey Brodkin > > [1] Align cache management functions to those in Linux kernel. I.e.: > a) Use the same functions for all cache ops (D$ Inv/Flush) > b) Split cache ops in 3 sub-functions: "before", "lineloop" and > "after". That way we may re-use "before" and "after" functions for > region and full cache ops. > > [2] Implement full-functional L2 (SLC) management. Before SLC was > simply disabled early on boot. If SLC exists corresponding ops are > run on cache > flush/invalidate. > > [3] Disable/enable corresponding caches early on boot. So if U-Boot > is > configured to use caches they will be used at all times (this is > useful > in particular for speed-up of relocation). > > Signed-off-by: Alexey Brodkin > --- > Compared to v1: > * Remove explicit selection of L2CACHE on/off in Kconfig, check this > in runtime > and use L2 ops only when L2 is detected. > This allows run the same executable on HW with and without L2 > cache. > --- > arch/arc/include/asm/arcregs.h | 5 +- > arch/arc/include/asm/cache.h | 7 +- > arch/arc/lib/cache.c | 375 ++++++++++++++++++++++++++++--- > ---------- > arch/arc/lib/cpu.c | 2 + > arch/arc/lib/init_helpers.c | 10 +- > arch/arc/lib/start.S | 46 ++++- > 6 files changed, 300 insertions(+), 145 deletions(-) Applied, thanks. -Alexey