bcm968580xref.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2018 Philippe Reynes <philippe.reynes@softathome.com>
  4. */
  5. #include <common.h>
  6. #include <fdtdec.h>
  7. #include <linux/io.h>
  8. #ifdef CONFIG_ARM64
  9. #include <asm/armv8/mmu.h>
  10. static struct mm_region broadcom_bcm968580xref_mem_map[] = {
  11. {
  12. /* RAM */
  13. .virt = 0x00000000UL,
  14. .phys = 0x00000000UL,
  15. .size = 8UL * SZ_1G,
  16. .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
  17. PTE_BLOCK_INNER_SHARE
  18. }, {
  19. /* SoC */
  20. .virt = 0x80000000UL,
  21. .phys = 0x80000000UL,
  22. .size = 0xff80000000UL,
  23. .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
  24. PTE_BLOCK_NON_SHARE |
  25. PTE_BLOCK_PXN | PTE_BLOCK_UXN
  26. }, {
  27. /* List terminator */
  28. 0,
  29. }
  30. };
  31. struct mm_region *mem_map = broadcom_bcm968580xref_mem_map;
  32. #endif
  33. int board_init(void)
  34. {
  35. return 0;
  36. }
  37. int dram_init(void)
  38. {
  39. if (fdtdec_setup_mem_size_base() != 0)
  40. printf("fdtdec_setup_mem_size_base() has failed\n");
  41. return 0;
  42. }
  43. int dram_init_banksize(void)
  44. {
  45. fdtdec_setup_memory_banksize();
  46. return 0;
  47. }
  48. int print_cpuinfo(void)
  49. {
  50. return 0;
  51. }