cmi.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * (C) Copyright 2003
  3. * Martin Winistoerfer, martinwinistoerfer@gmx.ch.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. /*
  8. * File: cmi.c
  9. *
  10. * Discription: For generic board specific functions
  11. *
  12. */
  13. #include <common.h>
  14. #include <mpc5xx.h>
  15. #define SRAM_SIZE 1024000L /* 1M RAM available*/
  16. #if defined(__APPLE__)
  17. /* Leading underscore on symbols */
  18. # define SYM_CHAR "_"
  19. #else /* No leading character on symbols */
  20. # define SYM_CHAR
  21. #endif
  22. /*
  23. * Macros to generate global absolutes.
  24. */
  25. #define GEN_SYMNAME(str) SYM_CHAR #str
  26. #define GEN_VALUE(str) #str
  27. #define GEN_ABS(name, value) \
  28. asm (".globl " GEN_SYMNAME(name)); \
  29. asm (GEN_SYMNAME(name) " = " GEN_VALUE(value))
  30. /*
  31. * Check the board
  32. */
  33. int checkboard(void)
  34. {
  35. puts ("Board: ### No HW ID - assuming CMI board\n");
  36. return (0);
  37. }
  38. /*
  39. * Get RAM size.
  40. */
  41. phys_size_t initdram(int board_type)
  42. {
  43. return (SRAM_SIZE); /* We currently have a static size adapted for cmi board. */
  44. }
  45. /*
  46. * Absolute environment address for linker file.
  47. */
  48. GEN_ABS(env_start, CONFIG_ENV_OFFSET + CONFIG_SYS_FLASH_BASE);