nvram.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * nvram.c - NVRAM type information;
  11. *
  12. * nvram.h
  13. *
  14. * nvram codes for display purposes;
  15. *
  16. * Contributor(s):
  17. * Charles Maier <cmaier@qca.qualcomm.com>
  18. *
  19. *--------------------------------------------------------------------*/
  20. #ifndef NVRAM_SOURCE
  21. #define NVRAM_SOURCE
  22. #include "../tools/types.h"
  23. #include "../tools/symbol.h"
  24. #include "../ram/nvram.h"
  25. #define NVRAM_TYPES (sizeof (nvram_types) / sizeof (struct _type_))
  26. static const struct _type_ nvram_types [] =
  27. {
  28. {
  29. 0x00000005,
  30. "500KB"
  31. },
  32. {
  33. 0x00000010,
  34. "1MB"
  35. },
  36. {
  37. 0x00000011,
  38. "M25P20"
  39. },
  40. {
  41. 0x00000012,
  42. "M25P40"
  43. },
  44. {
  45. 0x00000013,
  46. "M25P80"
  47. },
  48. {
  49. 0x00000014,
  50. "M25P16_ES"
  51. },
  52. {
  53. 0x00000015,
  54. "M25P32_ES"
  55. },
  56. {
  57. 0x00000016,
  58. "M25P64_ES"
  59. },
  60. {
  61. 0x00000046,
  62. "AT26DF161"
  63. },
  64. {
  65. 0x00000146,
  66. "AT26DF161A"
  67. },
  68. {
  69. 0x00001020,
  70. "M25P05A"
  71. },
  72. {
  73. 0x00001120,
  74. "M25P10A"
  75. },
  76. {
  77. 0x00001402,
  78. "S25FL016AOLMFI01"
  79. },
  80. {
  81. 0x00001420,
  82. "M25P80"
  83. },
  84. {
  85. 0x00001520,
  86. "M25P16"
  87. },
  88. {
  89. 0x00001532,
  90. "FM25S16/FM25Q16"
  91. },
  92. {
  93. 0x00001571,
  94. "M25PX16"
  95. },
  96. {
  97. 0x00001620,
  98. "M25P32"
  99. },
  100. {
  101. 0x00001632,
  102. "FM25Q32"
  103. },
  104. {
  105. 0x00001720,
  106. "M25P64"
  107. },
  108. {
  109. 0x00004125,
  110. "SST25VF016B"
  111. }
  112. };
  113. char const * NVRAMName (uint16_t NVRAMTYPE)
  114. {
  115. return (typename (nvram_types, NVRAM_TYPES, NVRAMTYPE, "Unknown NVRAM Type"));
  116. }
  117. #endif