cmi.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * (C) Copyright 2003
  3. * Martin Winistoerfer, martinwinistoerfer@gmx.ch.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. /*
  24. * File: cmi.c
  25. *
  26. * Discription: For generic board specific functions
  27. *
  28. */
  29. #include <common.h>
  30. #include <mpc5xx.h>
  31. #define SRAM_SIZE 1024000L /* 1M RAM available*/
  32. #if defined(__APPLE__)
  33. /* Leading underscore on symbols */
  34. # define SYM_CHAR "_"
  35. #else /* No leading character on symbols */
  36. # define SYM_CHAR
  37. #endif
  38. /*
  39. * Macros to generate global absolutes.
  40. */
  41. #define GEN_SYMNAME(str) SYM_CHAR #str
  42. #define GEN_VALUE(str) #str
  43. #define GEN_ABS(name, value) \
  44. asm (".globl " GEN_SYMNAME(name)); \
  45. asm (GEN_SYMNAME(name) " = " GEN_VALUE(value))
  46. /*
  47. * Check the board
  48. */
  49. int checkboard(void)
  50. {
  51. puts ("Board: ### No HW ID - assuming CMI board\n");
  52. return (0);
  53. }
  54. /*
  55. * Get RAM size.
  56. */
  57. phys_size_t initdram(int board_type)
  58. {
  59. return (SRAM_SIZE); /* We currently have a static size adapted for cmi board. */
  60. }
  61. /*
  62. * Absolute environment address for linker file.
  63. */
  64. GEN_ABS(env_start, CONFIG_ENV_OFFSET + CFG_FLASH_BASE);