stmark2.c 704 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Board-specific init.
  4. *
  5. * (C) Copyright 2017 Angelo Dureghello <angelo@sysam.it>
  6. */
  7. #include <common.h>
  8. #include <spi.h>
  9. #include <asm/io.h>
  10. #include <asm/immap.h>
  11. #include <mmc.h>
  12. #include <fsl_esdhc.h>
  13. DECLARE_GLOBAL_DATA_PTR;
  14. int checkboard(void)
  15. {
  16. /*
  17. * need to to:
  18. * Check serial flash size. if 2mb evb, else 8mb demo
  19. */
  20. puts("Board: ");
  21. puts("Sysam stmark2\n");
  22. return 0;
  23. }
  24. int dram_init(void)
  25. {
  26. u32 dramsize;
  27. /*
  28. * Serial Boot: The dram is already initialized in start.S
  29. * only require to return DRAM size
  30. */
  31. dramsize = CONFIG_SYS_SDRAM_SIZE * 0x100000;
  32. gd->ram_size = dramsize;
  33. return 0;
  34. }
  35. int testdram(void)
  36. {
  37. return 0;
  38. }