nvram.h.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. nvram.h
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='nvm.h.html' title=' nvm.h '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='Packet32.h.html' title=' Packet32.h '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*====================================================================*
  22. *
  23. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  24. *
  25. * All rights reserved.
  26. *
  27. * Redistribution and use in source and binary forms, with or
  28. * without modification, are permitted (subject to the limitations
  29. * in the disclaimer below) provided that the following conditions
  30. * are met:
  31. *
  32. * * Redistributions of source code must retain the above copyright
  33. * notice, this list of conditions and the following disclaimer.
  34. *
  35. * * Redistributions in binary form must reproduce the above
  36. * copyright notice, this list of conditions and the following
  37. * disclaimer in the documentation and/or other materials
  38. * provided with the distribution.
  39. *
  40. * * Neither the name of Qualcomm Atheros nor the names of
  41. * its contributors may be used to endorse or promote products
  42. * derived from this software without specific prior written
  43. * permission.
  44. *
  45. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  46. * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE
  47. * COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR
  48. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  49. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  50. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  51. * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  52. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  53. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  54. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  55. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  56. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  57. * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  58. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  59. *
  60. *--------------------------------------------------------------------*/
  61. /*====================================================================*
  62. *
  63. * nvnvm.h - nvram definitions and declarations;
  64. *
  65. * The Boot ROM reads a linked list of NVM headers containing
  66. * information about the size, location and execution address
  67. * of various software images;
  68. *
  69. * See INT6300 Boot ROM Software Design Specification for more
  70. * information; the document may not be available to some
  71. * customers so don't push it;
  72. *
  73. *. Qualcomm Atheros HomePlug AV Powerline Toolkit;
  74. *: Copyright (c) 2006-2010 by Intellon Corporation; ALL RIGHTS RESERVED;
  75. *; For demonstration and evaluation only; Not for production use.
  76. *
  77. * Contributor(s):
  78. * Charles Maier &lt;cmaier@qca.qualcomm.com&gt;
  79. *
  80. *--------------------------------------------------------------------*/
  81. #ifndef NVRAM_HEADER
  82. #define NVRAM_HEADER
  83. /*====================================================================*
  84. * system header files;
  85. *--------------------------------------------------------------------*/
  86. #include &lt;stdint.h&gt;
  87. /*====================================================================*
  88. * custom header files;
  89. *--------------------------------------------------------------------*/
  90. #include &quot;../tools/types.h&quot;
  91. /*====================================================================*
  92. * constants;
  93. *--------------------------------------------------------------------*/
  94. #define NVRAM_500KB 0x00000005
  95. #define NVRAM_1MB 0x00000010
  96. #define NVRAM_2MB 0x00000011
  97. #define NVRAM_4MB 0x00000012
  98. #define NVRAM_8MB 0x00000013
  99. #define NVRAM_16MB 0x00000014
  100. #define NVRAM_32MB 0x00000015
  101. #define NVRAM_M25P20 = 0x00000011;
  102. #define NVRAM_M25P40 = 0x00000012;
  103. #define NVRAM_M25P80 = 0x00000013;
  104. #define NVRAM_M25P16_ES = 0x00000014;
  105. #define NVRAM_M25P32_ES = 0x00000015;
  106. #define NVRAM_M25P64_ES = 0x00000016;
  107. #define NVRAM_AT26DF161 = 0x00000046;
  108. #define NVRAM_AT26DF161A = 0x00000146;
  109. #define NVRAM_M25P05A = 0x00001020;
  110. #define NVRAM_M25P10A = 0x00001120;
  111. #define NVRAM_M25P16 = 0x00001520;
  112. #define NVRAM_M25PX16 = 0x00001571;
  113. #define NVRAM_M25P32 = 0x00001620;
  114. #define NVRAM_M25P64 = 0x00001720;
  115. #define NVRAM_FM25S16 = 0x00001532;
  116. #define NVRAM_FM25Q16 = 0x00001532;
  117. #define NVRAM_FM25Q32 = 0x00001632;
  118. #define NVRAM_SST25VF016B = 0x00004125;
  119. /*====================================================================*
  120. * variables;
  121. *--------------------------------------------------------------------*/
  122. #ifndef __GNUC__
  123. #pragma pack (push,1)
  124. #endif
  125. typedef struct __packed config_nvram
  126. {
  127. uint32_t NVRAMTYPE;
  128. uint32_t NVRAMPAGE;
  129. uint32_t NVRAMBLOCK;
  130. uint32_t NVRAMSIZE;
  131. }
  132. config_nvram;
  133. #ifndef __GNUC__
  134. #pragma pack (pop)
  135. #endif
  136. /*====================================================================*
  137. * functions;
  138. *--------------------------------------------------------------------*/
  139. void nvrampeek (struct config_nvram *);
  140. char const * NVRAMName (uint16_t nvramtype);
  141. /*====================================================================*
  142. *
  143. *--------------------------------------------------------------------*/
  144. #endif
  145. </pre>
  146. <div class='footerlink'>
  147. [<a href='nvm.h.html' title=' nvm.h '>PREV</a>]
  148. [<a href='toolkit.html' title=' Index '>HOME</a>]
  149. [<a href='Packet32.h.html' title=' Packet32.h '>NEXT</a>]
  150. </div>
  151. </body>
  152. </html>