beacon-rzg2m.c 625 B

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