From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Mon, 19 Oct 2015 07:48:44 +0800 Subject: [U-Boot] [PATCH v3] nios2: convert cache flush to use dm cpu data In-Reply-To: <1444786719-31736-1-git-send-email-thomas@wytron.com.tw> References: <1444119600-31999-1-git-send-email-thomas@wytron.com.t> <1444786719-31736-1-git-send-email-thomas@wytron.com.tw> Message-ID: <56242FDC.4070708@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/14/2015 09:38 AM, Thomas Chou wrote: > Convert cache flush to use dm cpu data. > > The original cache flush functions are written in assembly > and use CONFIG_SYS_{I,D}CACHE_SIZE... macros. It is difficult > to convert to use cache configuration in dm cpu data which is > extracted from device tree. > > The cacheflush.c of Linux nios2 arch uses cpuinfo structure, > which is very close to our dm cpu data. So we copy and modify > it to arch/nios2/lib/cache.c to replace the old cache.S. > > Signed-off-by: Thomas Chou > --- > v2 > change commit message. > v3 > check initda instruction support. > add invalidate_dcache_range(). > > arch/nios2/include/asm/cache.h | 13 ++--- > arch/nios2/lib/bootm.c | 6 +-- > arch/nios2/lib/cache.S | 68 ------------------------ > arch/nios2/lib/cache.c | 114 +++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 118 insertions(+), 83 deletions(-) > delete mode 100644 arch/nios2/lib/cache.S > create mode 100644 arch/nios2/lib/cache.c > Applied to u-boot-nios.