Skip to content
Snippets Groups Projects
Commit 6ed67659 authored by Heiko Schocher's avatar Heiko Schocher Committed by Andreas Bießmann
Browse files

arm, at91: add icache support


add at least icache support for at91 based boards.
This speeds up NOR flash access on an at91sam9g15
based board from 15.2 seconds reading 8 MiB from
a SPI NOR flash to 5.7 seconds.

Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarAndreas Bießmann <andreas@biessmann.org>
parent 806a5a39
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@ obj-$(CONFIG_AT91SAM9N12) += at91sam9n12_devices.o
obj-$(CONFIG_AT91SAM9X5) += at91sam9x5_devices.o
obj-$(CONFIG_AT91_EFLASH) += eflash.o
obj-$(CONFIG_AT91_LED) += led.o
obj-y += cache.o
obj-y += clock.o
obj-y += cpu.o
obj-y += reset.o
......
/*
* (C) Copyright 2016
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <linux/types.h>
#include <common.h>
void enable_caches(void)
{
#ifndef CONFIG_SYS_ICACHE_OFF
icache_enable();
#endif
}
#ifndef CONFIG_SYS_ICACHE_OFF
/* Invalidate entire I-cache and branch predictor array */
void invalidate_icache_all(void)
{
unsigned long i = 0;
asm ("mcr p15, 0, %0, c7, c5, 0" : : "r" (i));
}
#else
void invalidate_icache_all(void)
{
}
#endif
......@@ -414,12 +414,6 @@ void reset_phy(void)
{
}
/* This breaks the Ethernet MAC at present */
void enable_caches(void)
{
dcache_enable();
}
/* SPI chip select control - only used for FPGA programming */
#ifdef CONFIG_ATMEL_SPI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment