1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (C) 2018 Xilinx, Inc. (Michal Simek)
4 */
5
6 #include <common.h>
7 #include <cpu_func.h>
8 #include <init.h>
9 #include <asm/armv7_mpu.h>
10 #include <asm/global_data.h>
11
12 DECLARE_GLOBAL_DATA_PTR;
13
14 struct mpu_region_config region_config[] = {
15 { 0x00000000, REGION_0, XN_EN, PRIV_RW_USR_RW,
16 SHARED_WRITE_BUFFERED, REGION_4GB },
17 { 0x00000000, REGION_1, XN_DIS, PRIV_RW_USR_RW,
18 O_I_WB_RD_WR_ALLOC, REGION_1GB },
19 };
20
arch_cpu_init(void)21 int arch_cpu_init(void)
22 {
23 gd->cpu_clk = CONFIG_CPU_FREQ_HZ;
24
25 setup_mpu_regions(region_config, ARRAY_SIZE(region_config));
26
27 return 0;
28 }
29
30 /*
31 * Perform the low-level reset.
32 */
reset_cpu(void)33 void reset_cpu(void)
34 {
35 while (1)
36 ;
37 }
38