spl.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 <log.h>
  11. #include <spl.h>
  12. #include <asm/io.h>
  13. #include <asm/arch/clock.h>
  14. #include <asm/arch/pinmux.h>
  15. #include <asm/arch/tegra.h>
  16. #include <asm/arch-tegra/apb_misc.h>
  17. #include <asm/arch-tegra/board.h>
  18. #include <asm/spl.h>
  19. #include "cpu.h"
  20. void spl_board_init(void)
  21. {
  22. struct apb_misc_pp_ctlr *apb_misc =
  23. (struct apb_misc_pp_ctlr *)NV_PA_APB_MISC_BASE;
  24. /* enable JTAG */
  25. writel(0xC0, &apb_misc->cfg_ctl);
  26. board_init_uart_f();
  27. /* Initialize periph GPIOs */
  28. gpio_early_init_uart();
  29. clock_early_init();
  30. #ifdef CONFIG_DEBUG_UART
  31. debug_uart_init();
  32. #endif
  33. preloader_console_init();
  34. }
  35. u32 spl_boot_device(void)
  36. {
  37. return BOOT_DEVICE_RAM;
  38. }
  39. void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
  40. {
  41. debug("image entry point: 0x%lX\n", spl_image->entry_point);
  42. start_cpu((u32)spl_image->entry_point);
  43. halt_avp();
  44. }