ns.c 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Broadcom Northstar generic board set-up code
  4. * Copyright (C) 2023 Linus Walleij <linus.walleij@linaro.org>
  5. */
  6. #include <common.h>
  7. #include <dm.h>
  8. #include <init.h>
  9. #include <log.h>
  10. #include <ram.h>
  11. #include <serial.h>
  12. #include <asm/global_data.h>
  13. #include <asm/io.h>
  14. #include <asm/armv7m.h>
  15. DECLARE_GLOBAL_DATA_PTR;
  16. int dram_init(void)
  17. {
  18. return fdtdec_setup_mem_size_base();
  19. }
  20. int dram_init_banksize(void)
  21. {
  22. return fdtdec_setup_memory_banksize();
  23. }
  24. int board_late_init(void)
  25. {
  26. /* LEDs etc can be initialized here */
  27. return 0;
  28. }
  29. int board_init(void)
  30. {
  31. return 0;
  32. }
  33. void reset_cpu(void)
  34. {
  35. }
  36. int print_cpuinfo(void)
  37. {
  38. printf("BCMNS Northstar SoC\n");
  39. return 0;
  40. }
  41. int misc_init_r(void)
  42. {
  43. return 0;
  44. }
  45. int ft_board_setup(void *fdt, struct bd_info *bd)
  46. {
  47. printf("Northstar board setup: DTB at 0x%08lx\n", (ulong)fdt);
  48. return 0;
  49. }