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