spr_xloader_table.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * (C) Copyright 2009
  3. * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
  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. #ifndef _SPR_XLOADER_TABLE_H
  24. #define _SPR_XLOADER_TABLE_H
  25. #define XLOADER_TABLE_VERSION_1_1 2
  26. #define XLOADER_TABLE_VERSION_1_2 3
  27. #define XLOADER_TABLE_ADDRESS 0xD2801FF0
  28. #define DDRMOBILE 1
  29. #define DDR2 2
  30. #define REV_BA 1
  31. #define REV_AA 2
  32. #define REV_AB 3
  33. struct xloader_table_1_1 {
  34. unsigned short ddrfreq;
  35. unsigned char ddrsize;
  36. unsigned char ddrtype;
  37. unsigned char soc_rev;
  38. } __attribute__ ((packed));
  39. struct xloader_table_1_2 {
  40. unsigned const char *version;
  41. unsigned short ddrfreq;
  42. unsigned char ddrsize;
  43. unsigned char ddrtype;
  44. unsigned char soc_rev;
  45. } __attribute__ ((packed));
  46. union table_contents {
  47. struct xloader_table_1_1 table_1_1;
  48. struct xloader_table_1_2 table_1_2;
  49. };
  50. struct xloader_table {
  51. unsigned char table_version;
  52. union table_contents table;
  53. } __attribute__ ((packed));
  54. #endif