beacon-rzg2m.c 776 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright 2020 Compass Electronics Group, LLC
  4. */
  5. #include <common.h>
  6. #include <asm/io.h>
  7. #include <asm/arch/rcar-mstp.h>
  8. DECLARE_GLOBAL_DATA_PTR;
  9. void s_init(void)
  10. {
  11. }
  12. /* Kconfig forces this on, so just return 0 */
  13. int board_early_init_f(void)
  14. {
  15. return 0;
  16. }
  17. int board_init(void)
  18. {
  19. /* address of boot parameters */
  20. gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000;
  21. return 0;
  22. }
  23. int dram_init(void)
  24. {
  25. if (fdtdec_setup_mem_size_base() != 0)
  26. return -EINVAL;
  27. return 0;
  28. }
  29. int dram_init_banksize(void)
  30. {
  31. fdtdec_setup_memory_banksize();
  32. return 0;
  33. }
  34. #define RST_BASE 0xE6160000
  35. #define RST_CA57RESCNT (RST_BASE + 0x40)
  36. #define RST_CODE 0xA5A5000F
  37. void reset_cpu(ulong addr)
  38. {
  39. writel(RST_CODE, RST_CA57RESCNT);
  40. }