cpu.c 735 B

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