aisimage.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * (C) Copyright 2011
  3. * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
  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 _AISIMAGE_H_
  24. #define _AISIMAGE_H_
  25. /* all values are for little endian systems */
  26. #define AIS_MAGIC_WORD 0x41504954
  27. #define AIS_FCN_MAX 8
  28. enum {
  29. AIS_CMD_LOAD = 0x58535901,
  30. AIS_CMD_VALCRC = 0x58535902,
  31. AIS_CMD_ENCRC = 0x58535903,
  32. AIS_CMD_DISCRC = 0x58535904,
  33. AIS_CMD_JMP = 0x58535905,
  34. AIS_CMD_JMPCLOSE = 0x58535906,
  35. AIS_CMD_BOOTTBL = 0x58535907,
  36. AIS_CMD_FILL = 0x5853590A,
  37. AIS_CMD_FNLOAD = 0x5853590D,
  38. AIS_CMD_SEQREAD = 0x58535963,
  39. };
  40. struct ais_cmd_load {
  41. uint32_t cmd;
  42. uint32_t addr;
  43. uint32_t size;
  44. uint32_t data[1];
  45. };
  46. struct ais_cmd_func {
  47. uint32_t cmd;
  48. uint32_t func_args;
  49. uint32_t parms[AIS_FCN_MAX];
  50. };
  51. struct ais_cmd_jmpclose {
  52. uint32_t cmd;
  53. uint32_t addr;
  54. };
  55. #define CMD_DATA_STR "DATA"
  56. enum ais_file_cmd {
  57. CMD_INVALID,
  58. CMD_FILL,
  59. CMD_CRCON,
  60. CMD_CRCOFF,
  61. CMD_CRCCHECK,
  62. CMD_JMPCLOSE,
  63. CMD_JMP,
  64. CMD_SEQREAD,
  65. CMD_DATA,
  66. CMD_PLL0,
  67. CMD_PLL1,
  68. CMD_CLK,
  69. CMD_DDR2,
  70. CMD_EMIFA,
  71. CMD_EMIFA_ASYNC,
  72. CMD_PLL,
  73. CMD_PSC,
  74. CMD_PINMUX,
  75. CMD_BOOTTABLE
  76. };
  77. enum aisimage_fld_types {
  78. CFG_INVALID = -1,
  79. CFG_COMMAND,
  80. CFG_VALUE,
  81. };
  82. struct ais_header {
  83. uint32_t magic;
  84. char data[1];
  85. };
  86. #endif /* _AISIMAGE_H_ */