board.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright 2014 Broadcom Corporation.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/io.h>
  8. #include <config.h>
  9. #include <asm/system.h>
  10. #include <asm/iproc-common/armpll.h>
  11. DECLARE_GLOBAL_DATA_PTR;
  12. /*
  13. * board_init - early hardware init
  14. */
  15. int board_init(void)
  16. {
  17. /*
  18. * Address of boot parameters passed to kernel
  19. * Use default offset 0x100
  20. */
  21. gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
  22. return 0;
  23. }
  24. /*
  25. * dram_init - sets u-boot's idea of sdram size
  26. */
  27. int dram_init(void)
  28. {
  29. gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
  30. CONFIG_SYS_SDRAM_SIZE);
  31. return 0;
  32. }
  33. void dram_init_banksize(void)
  34. {
  35. gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
  36. gd->bd->bi_dram[0].size = gd->ram_size;
  37. }
  38. int board_early_init_f(void)
  39. {
  40. uint32_t status = 0;
  41. /* Setup PLL if required */
  42. #if defined(CONFIG_ARMCLK)
  43. armpll_config(CONFIG_ARMCLK);
  44. #endif
  45. return status;
  46. }
  47. #ifdef CONFIG_ARMV7_NONSEC
  48. void smp_set_core_boot_addr(unsigned long addr, int corenr)
  49. {
  50. }
  51. void smp_kick_all_cpus(void)
  52. {
  53. }
  54. void smp_waitloop(unsigned previous_address)
  55. {
  56. }
  57. #endif