spl.c 898 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * (C) Copyright 2012
  3. * NVIDIA Inc, <www.nvidia.com>
  4. *
  5. * Allen Martin <amartin@nvidia.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <common.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/board.h>
  16. #include <asm/arch/spl.h>
  17. #include "cpu.h"
  18. void spl_board_init(void)
  19. {
  20. struct pmux_tri_ctlr *pmt = (struct pmux_tri_ctlr *)NV_PA_APB_MISC_BASE;
  21. /* enable JTAG */
  22. writel(0xC0, &pmt->pmt_cfg_ctl);
  23. board_init_uart_f();
  24. /* Initialize periph GPIOs */
  25. gpio_early_init_uart();
  26. clock_early_init();
  27. preloader_console_init();
  28. }
  29. u32 spl_boot_device(void)
  30. {
  31. return BOOT_DEVICE_RAM;
  32. }
  33. void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
  34. {
  35. debug("image entry point: 0x%X\n", spl_image->entry_point);
  36. start_cpu((u32)spl_image->entry_point);
  37. halt_avp();
  38. }