bcm963158.c 1.0 KB

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