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> |
| 7 | #include <asm/armv7_mpu.h> |
| 8 | |
| 9 | DECLARE_GLOBAL_DATA_PTR; |
| 10 | |
| 11 | struct 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 | |
| 20 | int 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 | */ |
| 33 | void reset_cpu(ulong addr) |
| 34 | { |
| 35 | while (1) |
| 36 | ; |
| 37 | } |