cpu.c 757 B

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