blob: 98f63e3427e0654940810a4333a7b2383817b07f [file] [log] [blame]
Michal Simekb513bcd2018-04-12 17:39:46 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2018 Xilinx, Inc. (Michal Simek)
4 */
5
6#include <common.h>
7#include <asm/armv7_mpu.h>
8
9DECLARE_GLOBAL_DATA_PTR;
10
11struct mpu_region_config region_config[] = {
12 { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
13 O_I_WB_RD_WR_ALLOC, REGION_1GB },
14 { 0x20000000, REGION_1, XN_EN, PRIV_RO_USR_RO,
15 O_I_WB_RD_WR_ALLOC, REGION_512MB },
16 { 0x40000000, REGION_2, XN_EN, PRIV_RO_USR_RO,
17 O_I_WB_RD_WR_ALLOC, REGION_1GB },
18};
19
20int arch_cpu_init(void)
21{
22 gd->cpu_clk = CONFIG_CPU_FREQ_HZ;
23
24 setup_mpu_regions(region_config, sizeof(region_config) /
25 sizeof(struct mpu_region_config));
26
27 return 0;
28}
29
30/*
31 * Perform the low-level reset.
32 */
33void reset_cpu(ulong addr)
34{
35 while (1)
36 ;
37}