summaryrefslogtreecommitdiff
path: root/src/cpu/samsung/exynos5420/bootblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/samsung/exynos5420/bootblock.c')
-rw-r--r--src/cpu/samsung/exynos5420/bootblock.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cpu/samsung/exynos5420/bootblock.c b/src/cpu/samsung/exynos5420/bootblock.c
index 5cc9ef6af2..3df51a7421 100644
--- a/src/cpu/samsung/exynos5420/bootblock.c
+++ b/src/cpu/samsung/exynos5420/bootblock.c
@@ -17,10 +17,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <arch/cache.h>
+
#include "clk.h"
#include "wakeup.h"
#include "cpu.h"
+/* convenient shorthand (in MB) */
+#define SRAM_START (0x02020000 >> 20)
+#define SRAM_SIZE 1
+#define SRAM_END (SRAM_START + SRAM_SIZE) /* plus one... */
+
void bootblock_cpu_init(void);
void bootblock_cpu_init(void)
{
@@ -51,6 +58,14 @@ void bootblock_cpu_init(void)
/* Never returns. */
}
+ /* set up dcache and MMU */
+ mmu_init();
+ mmu_config_range(0, SRAM_START, DCACHE_OFF);
+ mmu_config_range(SRAM_START, SRAM_SIZE, DCACHE_WRITEBACK);
+ mmu_config_range(SRAM_END, 4096 - SRAM_END, DCACHE_OFF);
+ dcache_invalidate_all();
+ dcache_mmu_enable();
+
/* For most ARM systems, we have to initialize firmware media source
* (ex, SPI, SD/MMC, or eMMC) now; but for Exynos platform, that is
* already handled by iROM so there's no need to setup again.