spl.c 1020 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2012
  4. * NVIDIA Inc, <www.nvidia.com>
  5. *
  6. * Allen Martin <amartin@nvidia.com>
  7. */
  8. #include <common.h>
  9. #include <debug_uart.h>
  10. #include <spl.h>
  11. #include <asm/io.h>
  12. #include <asm/arch/clock.h>
  13. #include <asm/arch/pinmux.h>
  14. #include <asm/arch/tegra.h>
  15. #include <asm/arch-tegra/apb_misc.h>
  16. #include <asm/arch-tegra/board.h>
  17. #include <asm/spl.h>
  18. #include "cpu.h"
  19. void spl_board_init(void)
  20. {
  21. struct apb_misc_pp_ctlr *apb_misc =
  22. (struct apb_misc_pp_ctlr *)NV_PA_APB_MISC_BASE;
  23. /* enable JTAG */
  24. writel(0xC0, &apb_misc->cfg_ctl);
  25. board_init_uart_f();
  26. /* Initialize periph GPIOs */
  27. gpio_early_init_uart();
  28. clock_early_init();
  29. #ifdef CONFIG_DEBUG_UART
  30. debug_uart_init();
  31. #endif
  32. preloader_console_init();
  33. }
  34. u32 spl_boot_device(void)
  35. {
  36. return BOOT_DEVICE_RAM;
  37. }
  38. void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
  39. {
  40. debug("image entry point: 0x%lX\n", spl_image->entry_point);
  41. start_cpu((u32)spl_image->entry_point);
  42. halt_avp();
  43. }