stmark2.c 722 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <init.h>
  9. #include <spi.h>
  10. #include <asm/io.h>
  11. #include <asm/immap.h>
  12. #include <mmc.h>
  13. #include <fsl_esdhc.h>
  14. DECLARE_GLOBAL_DATA_PTR;
  15. int checkboard(void)
  16. {
  17. /*
  18. * need to to:
  19. * Check serial flash size. if 2mb evb, else 8mb demo
  20. */
  21. puts("Board: ");
  22. puts("Sysam stmark2\n");
  23. return 0;
  24. }
  25. int dram_init(void)
  26. {
  27. u32 dramsize;
  28. /*
  29. * Serial Boot: The dram is already initialized in start.S
  30. * only require to return DRAM size
  31. */
  32. dramsize = CONFIG_SYS_SDRAM_SIZE * 0x100000;
  33. gd->ram_size = dramsize;
  34. return 0;
  35. }
  36. int testdram(void)
  37. {
  38. return 0;
  39. }