Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs
nvm.h File Reference

Go to the source code of this file.

Data Structures

struct  _FLASH_SECTOR_INFO
 
struct  _FLASH_CS_INFO
 
struct  _FLASH_2X_CS_INFO
 
struct  _VENDOR_SECTION_INFO
 
struct  _FLASH2X_VENDORSPECIFIC_INFO
 
struct  _DSD_HEADER
 
struct  _ISO_HEADER
 

Macros

#define FLASH2X_TOTAL_SIZE   (64*1024*1024)
 
#define DEFAULT_SECTOR_SIZE   (64*1024)
 
#define EEPROM_BEGIN_CIS   (0)
 
#define EEPROM_BEGIN_NON_CIS   (0x200)
 
#define EEPROM_END   (0x2000)
 
#define INIT_PARAMS_SIGNATURE   (0x95a7a597)
 
#define MAX_INIT_PARAMS_LENGTH   (2048)
 
#define MAC_ADDRESS_OFFSET   0x200
 
#define INIT_PARAMS_1_SIGNATURE_ADDRESS   EEPROM_BEGIN_NON_CIS
 
#define INIT_PARAMS_1_DATA_ADDRESS   (INIT_PARAMS_1_SIGNATURE_ADDRESS+16)
 
#define INIT_PARAMS_1_MACADDRESS_ADDRESS   (MAC_ADDRESS_OFFSET)
 
#define INIT_PARAMS_1_LENGTH_ADDRESS   (INIT_PARAMS_1_SIGNATURE_ADDRESS+4)
 
#define INIT_PARAMS_2_SIGNATURE_ADDRESS   (EEPROM_BEGIN_NON_CIS+2048+16)
 
#define INIT_PARAMS_2_DATA_ADDRESS   (INIT_PARAMS_2_SIGNATURE_ADDRESS+16)
 
#define INIT_PARAMS_2_MACADDRESS_ADDRESS   (INIT_PARAMS_2_SIGNATURE_ADDRESS+8)
 
#define INIT_PARAMS_2_LENGTH_ADDRESS   (INIT_PARAMS_2_SIGNATURE_ADDRESS+4)
 
#define EEPROM_SPI_DEV_CONFIG_REG   0x0F003000
 
#define EEPROM_SPI_Q_STATUS1_REG   0x0F003004
 
#define EEPROM_SPI_Q_STATUS1_MASK_REG   0x0F00300C
 
#define EEPROM_SPI_Q_STATUS_REG   0x0F003008
 
#define EEPROM_CMDQ_SPI_REG   0x0F003018
 
#define EEPROM_WRITE_DATAQ_REG   0x0F00301C
 
#define EEPROM_READ_DATAQ_REG   0x0F003020
 
#define SPI_FLUSH_REG   0x0F00304C
 
#define EEPROM_WRITE_ENABLE   0x06000000
 
#define EEPROM_READ_STATUS_REGISTER   0x05000000
 
#define EEPROM_16_BYTE_PAGE_WRITE   0xFA000000
 
#define EEPROM_WRITE_QUEUE_EMPTY   0x00001000
 
#define EEPROM_WRITE_QUEUE_AVAIL   0x00002000
 
#define EEPROM_WRITE_QUEUE_FULL   0x00004000
 
#define EEPROM_16_BYTE_PAGE_READ   0xFB000000
 
#define EEPROM_4_BYTE_PAGE_READ   0x3B000000
 
#define EEPROM_CMD_QUEUE_FLUSH   0x00000001
 
#define EEPROM_WRITE_QUEUE_FLUSH   0x00000002
 
#define EEPROM_READ_QUEUE_FLUSH   0x00000004
 
#define EEPROM_ETH_QUEUE_FLUSH   0x00000008
 
#define EEPROM_ALL_QUEUE_FLUSH   0x0000000f
 
#define EEPROM_READ_ENABLE   0x06000000
 
#define EEPROM_16_BYTE_PAGE_WRITE   0xFA000000
 
#define EEPROM_READ_DATA_FULL   0x00000010
 
#define EEPROM_READ_DATA_AVAIL   0x00000020
 
#define EEPROM_READ_QUEUE_EMPTY   0x00000002
 
#define EEPROM_CMD_QUEUE_EMPTY   0x00000100
 
#define EEPROM_CMD_QUEUE_AVAIL   0x00000200
 
#define EEPROM_CMD_QUEUE_FULL   0x00000400
 
#define EEPROM_STATUS_REG_WRITE_BUSY   0x00000001
 
#define MAX_EEPROM_RETRIES   80
 
#define RETRIES_PER_DELAY   64
 
#define MAX_RW_SIZE   0x10
 
#define MAX_READ_SIZE   0x10
 
#define MAX_SECTOR_SIZE   (512*1024)
 
#define MIN_SECTOR_SIZE   (1024)
 
#define FLASH_SECTOR_SIZE_OFFSET   0xEFFFC
 
#define FLASH_SECTOR_SIZE_SIG_OFFSET   0xEFFF8
 
#define FLASH_SECTOR_SIZE_SIG   0xCAFEBABE
 
#define FLASH_CS_INFO_START_ADDR   0xFF0000
 
#define FLASH_CONTROL_STRUCT_SIGNATURE   0xBECEF1A5
 
#define SCSI_FIRMWARE_MAJOR_VERSION   0x1
 
#define SCSI_FIRMWARE_MINOR_VERSION   0x5
 
#define BYTE_WRITE_SUPPORT   0x1
 
#define FLASH_AUTO_INIT_BASE_ADDR   0xF00000
 
#define FLASH_CONTIGIOUS_START_ADDR_AFTER_INIT   0x1C000000
 
#define FLASH_CONTIGIOUS_START_ADDR_BEFORE_INIT   0x1F000000
 
#define FLASH_CONTIGIOUS_START_ADDR_BCS350   0x08000000
 
#define FLASH_CONTIGIOUS_END_ADDR_BCS350   0x08FFFFFF
 
#define FLASH_SIZE_ADDR   0xFFFFEC
 
#define FLASH_SPI_CMDQ_REG   0xAF003040
 
#define FLASH_SPI_WRITEQ_REG   0xAF003044
 
#define FLASH_SPI_READQ_REG   0xAF003048
 
#define FLASH_CONFIG_REG   0xAF003050
 
#define FLASH_GPIO_CONFIG_REG   0xAF000030
 
#define FLASH_CMD_WRITE_ENABLE   0x06
 
#define FLASH_CMD_READ_ENABLE   0x03
 
#define FLASH_CMD_RESET_WRITE_ENABLE   0x04
 
#define FLASH_CMD_STATUS_REG_READ   0x05
 
#define FLASH_CMD_STATUS_REG_WRITE   0x01
 
#define FLASH_CMD_READ_ID   0x9F
 
#define PAD_SELECT_REGISTER   0xAF000410
 
#define FLASH_PART_SST25VF080B   0xBF258E
 
#define EEPROM_CAL_DATA_INTERNAL_LOC   0xbFB00008
 
#define EEPROM_CALPARAM_START   0x200
 
#define EEPROM_SIZE_OFFSET   524
 
#define MAX_FLASH_RETRIES   4
 
#define FLASH_PER_RETRIES_DELAY   16
 
#define EEPROM_MAX_CAL_AREA_SIZE   0xF0000
 
#define BECM   ntohl(0x4245434d)
 
#define FLASH_2X_MAJOR_NUMBER   0x2
 
#define DSD_IMAGE_MAGIC_NUMBER   0xBECE0D5D
 
#define ISO_IMAGE_MAGIC_NUMBER   0xBECE0150
 
#define NON_CDLESS_DEVICE_BOOT_SIG   0xBECEB007
 
#define MINOR_VERSION(x)   ((x >>16) & 0xFFFF)
 
#define MAJOR_VERSION(x)   (x & 0xFFFF)
 
#define CORRUPTED_PATTERN   0x0
 
#define UNINIT_PTR_IN_CS   0xBBBBDDDD
 
#define VENDOR_PTR_IN_CS   0xAAAACCCC
 
#define FLASH2X_SECTION_PRESENT   1<<0
 
#define FLASH2X_SECTION_VALID   1<<1
 
#define FLASH2X_SECTION_RO   1<<2
 
#define FLASH2X_SECTION_ACT   1<<3
 
#define SECTOR_IS_NOT_WRITABLE   STATUS_FAILURE
 
#define INVALID_OFFSET   STATUS_FAILURE
 
#define INVALID_SECTION   STATUS_FAILURE
 
#define SECTOR_1K   1024
 
#define SECTOR_64K   (64 *SECTOR_1K)
 
#define SECTOR_128K   (2 * SECTOR_64K)
 
#define SECTOR_256k   (2 * SECTOR_128K)
 
#define SECTOR_512K   (2 * SECTOR_256k)
 
#define FLASH_PART_SIZE   (16 * 1024 * 1024)
 
#define RESET_CHIP_SELECT   -1
 
#define CHIP_SELECT_BIT12   12
 
#define SECTOR_READWRITE_PERMISSION   0
 
#define SECTOR_READONLY   1
 
#define SIGNATURE_SIZE   4
 
#define DEFAULT_BUFF_SIZE   0x10000
 
#define FIELD_OFFSET_IN_HEADER(HeaderPointer, Field)   ((PUCHAR)&((HeaderPointer)(NULL))->Field - (PUCHAR)(NULL))
 

Typedefs

typedef struct _FLASH_SECTOR_INFO FLASH_SECTOR_INFO
 
typedef struct _FLASH_SECTOR_INFOPFLASH_SECTOR_INFO
 
typedef struct _FLASH_CS_INFO FLASH_CS_INFO
 
typedef struct _FLASH_CS_INFOPFLASH_CS_INFO
 
typedef struct _FLASH_2X_CS_INFO FLASH2X_CS_INFO
 
typedef struct _FLASH_2X_CS_INFOPFLASH2X_CS_INFO
 
typedef struct _VENDOR_SECTION_INFO VENDOR_SECTION_INFO
 
typedef struct
_VENDOR_SECTION_INFO
PVENDOR_SECTION_INFO
 
typedef struct
_FLASH2X_VENDORSPECIFIC_INFO 
FLASH2X_VENDORSPECIFIC_INFO
 
typedef struct
_FLASH2X_VENDORSPECIFIC_INFO
PFLASH2X_VENDORSPECIFIC_INFO
 
typedef struct _DSD_HEADER DSD_HEADER
 
typedef struct _DSD_HEADERPDSD_HEADER
 
typedef struct _ISO_HEADER ISO_HEADER
 
typedef struct _ISO_HEADERPISO_HEADER
 

Macro Definition Documentation

#define BECM   ntohl(0x4245434d)

Definition at line 370 of file nvm.h.

#define BYTE_WRITE_SUPPORT   0x1

Definition at line 320 of file nvm.h.

#define CHIP_SELECT_BIT12   12

Definition at line 398 of file nvm.h.

#define CORRUPTED_PATTERN   0x0

Definition at line 378 of file nvm.h.

#define DEFAULT_BUFF_SIZE   0x10000

Definition at line 403 of file nvm.h.

#define DEFAULT_SECTOR_SIZE   (64*1024)

Definition at line 105 of file nvm.h.

#define DSD_IMAGE_MAGIC_NUMBER   0xBECE0D5D

Definition at line 373 of file nvm.h.

#define EEPROM_16_BYTE_PAGE_READ   0xFB000000

Definition at line 281 of file nvm.h.

#define EEPROM_16_BYTE_PAGE_WRITE   0xFA000000

Definition at line 290 of file nvm.h.

#define EEPROM_16_BYTE_PAGE_WRITE   0xFA000000

Definition at line 290 of file nvm.h.

#define EEPROM_4_BYTE_PAGE_READ   0x3B000000

Definition at line 282 of file nvm.h.

#define EEPROM_ALL_QUEUE_FLUSH   0x0000000f

Definition at line 288 of file nvm.h.

#define EEPROM_BEGIN_CIS   (0)

Definition at line 243 of file nvm.h.

#define EEPROM_BEGIN_NON_CIS   (0x200)

Definition at line 244 of file nvm.h.

#define EEPROM_CAL_DATA_INTERNAL_LOC   0xbFB00008

Definition at line 354 of file nvm.h.

#define EEPROM_CALPARAM_START   0x200

Definition at line 356 of file nvm.h.

#define EEPROM_CMD_QUEUE_AVAIL   0x00000200

Definition at line 295 of file nvm.h.

#define EEPROM_CMD_QUEUE_EMPTY   0x00000100

Definition at line 294 of file nvm.h.

#define EEPROM_CMD_QUEUE_FLUSH   0x00000001

Definition at line 284 of file nvm.h.

#define EEPROM_CMD_QUEUE_FULL   0x00000400

Definition at line 296 of file nvm.h.

#define EEPROM_CMDQ_SPI_REG   0x0F003018

Definition at line 270 of file nvm.h.

#define EEPROM_END   (0x2000)

Definition at line 245 of file nvm.h.

#define EEPROM_ETH_QUEUE_FLUSH   0x00000008

Definition at line 287 of file nvm.h.

#define EEPROM_MAX_CAL_AREA_SIZE   0xF0000

Definition at line 366 of file nvm.h.

#define EEPROM_READ_DATA_AVAIL   0x00000020

Definition at line 292 of file nvm.h.

#define EEPROM_READ_DATA_FULL   0x00000010

Definition at line 291 of file nvm.h.

#define EEPROM_READ_DATAQ_REG   0x0F003020

Definition at line 272 of file nvm.h.

#define EEPROM_READ_ENABLE   0x06000000

Definition at line 289 of file nvm.h.

#define EEPROM_READ_QUEUE_EMPTY   0x00000002

Definition at line 293 of file nvm.h.

#define EEPROM_READ_QUEUE_FLUSH   0x00000004

Definition at line 286 of file nvm.h.

#define EEPROM_READ_STATUS_REGISTER   0x05000000

Definition at line 276 of file nvm.h.

#define EEPROM_SIZE_OFFSET   524

Definition at line 357 of file nvm.h.

#define EEPROM_SPI_DEV_CONFIG_REG   0x0F003000

Definition at line 265 of file nvm.h.

#define EEPROM_SPI_Q_STATUS1_MASK_REG   0x0F00300C

Definition at line 267 of file nvm.h.

#define EEPROM_SPI_Q_STATUS1_REG   0x0F003004

Definition at line 266 of file nvm.h.

#define EEPROM_SPI_Q_STATUS_REG   0x0F003008

Definition at line 269 of file nvm.h.

#define EEPROM_STATUS_REG_WRITE_BUSY   0x00000001

Definition at line 301 of file nvm.h.

#define EEPROM_WRITE_DATAQ_REG   0x0F00301C

Definition at line 271 of file nvm.h.

#define EEPROM_WRITE_ENABLE   0x06000000

Definition at line 275 of file nvm.h.

#define EEPROM_WRITE_QUEUE_AVAIL   0x00002000

Definition at line 279 of file nvm.h.

#define EEPROM_WRITE_QUEUE_EMPTY   0x00001000

Definition at line 278 of file nvm.h.

#define EEPROM_WRITE_QUEUE_FLUSH   0x00000002

Definition at line 285 of file nvm.h.

#define EEPROM_WRITE_QUEUE_FULL   0x00004000

Definition at line 280 of file nvm.h.

#define FIELD_OFFSET_IN_HEADER (   HeaderPointer,
  Field 
)    ((PUCHAR)&((HeaderPointer)(NULL))->Field - (PUCHAR)(NULL))

Definition at line 406 of file nvm.h.

#define FLASH2X_SECTION_ACT   1<<3

Definition at line 387 of file nvm.h.

#define FLASH2X_SECTION_PRESENT   1<<0

Definition at line 384 of file nvm.h.

#define FLASH2X_SECTION_RO   1<<2

Definition at line 386 of file nvm.h.

#define FLASH2X_SECTION_VALID   1<<1

Definition at line 385 of file nvm.h.

#define FLASH2X_TOTAL_SIZE   (64*1024*1024)

Definition at line 104 of file nvm.h.

#define FLASH_2X_MAJOR_NUMBER   0x2

Definition at line 372 of file nvm.h.

#define FLASH_AUTO_INIT_BASE_ADDR   0xF00000

Definition at line 322 of file nvm.h.

#define FLASH_CMD_READ_ENABLE   0x03

Definition at line 344 of file nvm.h.

#define FLASH_CMD_READ_ID   0x9F

Definition at line 348 of file nvm.h.

#define FLASH_CMD_RESET_WRITE_ENABLE   0x04

Definition at line 345 of file nvm.h.

#define FLASH_CMD_STATUS_REG_READ   0x05

Definition at line 346 of file nvm.h.

#define FLASH_CMD_STATUS_REG_WRITE   0x01

Definition at line 347 of file nvm.h.

#define FLASH_CMD_WRITE_ENABLE   0x06

Definition at line 343 of file nvm.h.

#define FLASH_CONFIG_REG   0xAF003050

Definition at line 340 of file nvm.h.

#define FLASH_CONTIGIOUS_END_ADDR_BCS350   0x08FFFFFF

Definition at line 331 of file nvm.h.

#define FLASH_CONTIGIOUS_START_ADDR_AFTER_INIT   0x1C000000

Definition at line 327 of file nvm.h.

#define FLASH_CONTIGIOUS_START_ADDR_BCS350   0x08000000

Definition at line 330 of file nvm.h.

#define FLASH_CONTIGIOUS_START_ADDR_BEFORE_INIT   0x1F000000

Definition at line 328 of file nvm.h.

#define FLASH_CONTROL_STRUCT_SIGNATURE   0xBECEF1A5

Definition at line 317 of file nvm.h.

#define FLASH_CS_INFO_START_ADDR   0xFF0000

Definition at line 316 of file nvm.h.

#define FLASH_GPIO_CONFIG_REG   0xAF000030

Definition at line 341 of file nvm.h.

#define FLASH_PART_SIZE   (16 * 1024 * 1024)

Definition at line 396 of file nvm.h.

#define FLASH_PART_SST25VF080B   0xBF258E

Definition at line 352 of file nvm.h.

#define FLASH_PER_RETRIES_DELAY   16

Definition at line 363 of file nvm.h.

#define FLASH_SECTOR_SIZE_OFFSET   0xEFFFC

Definition at line 313 of file nvm.h.

#define FLASH_SECTOR_SIZE_SIG   0xCAFEBABE

Definition at line 315 of file nvm.h.

#define FLASH_SECTOR_SIZE_SIG_OFFSET   0xEFFF8

Definition at line 314 of file nvm.h.

#define FLASH_SIZE_ADDR   0xFFFFEC

Definition at line 335 of file nvm.h.

#define FLASH_SPI_CMDQ_REG   0xAF003040

Definition at line 337 of file nvm.h.

#define FLASH_SPI_READQ_REG   0xAF003048

Definition at line 339 of file nvm.h.

#define FLASH_SPI_WRITEQ_REG   0xAF003044

Definition at line 338 of file nvm.h.

#define INIT_PARAMS_1_DATA_ADDRESS   (INIT_PARAMS_1_SIGNATURE_ADDRESS+16)

Definition at line 256 of file nvm.h.

#define INIT_PARAMS_1_LENGTH_ADDRESS   (INIT_PARAMS_1_SIGNATURE_ADDRESS+4)

Definition at line 258 of file nvm.h.

#define INIT_PARAMS_1_MACADDRESS_ADDRESS   (MAC_ADDRESS_OFFSET)

Definition at line 257 of file nvm.h.

#define INIT_PARAMS_1_SIGNATURE_ADDRESS   EEPROM_BEGIN_NON_CIS

Definition at line 255 of file nvm.h.

#define INIT_PARAMS_2_DATA_ADDRESS   (INIT_PARAMS_2_SIGNATURE_ADDRESS+16)

Definition at line 261 of file nvm.h.

#define INIT_PARAMS_2_LENGTH_ADDRESS   (INIT_PARAMS_2_SIGNATURE_ADDRESS+4)

Definition at line 263 of file nvm.h.

#define INIT_PARAMS_2_MACADDRESS_ADDRESS   (INIT_PARAMS_2_SIGNATURE_ADDRESS+8)

Definition at line 262 of file nvm.h.

#define INIT_PARAMS_2_SIGNATURE_ADDRESS   (EEPROM_BEGIN_NON_CIS+2048+16)

Definition at line 260 of file nvm.h.

#define INIT_PARAMS_SIGNATURE   (0x95a7a597)

Definition at line 247 of file nvm.h.

#define INVALID_OFFSET   STATUS_FAILURE

Definition at line 389 of file nvm.h.

#define INVALID_SECTION   STATUS_FAILURE

Definition at line 390 of file nvm.h.

#define ISO_IMAGE_MAGIC_NUMBER   0xBECE0150

Definition at line 374 of file nvm.h.

#define MAC_ADDRESS_OFFSET   0x200

Definition at line 252 of file nvm.h.

#define MAJOR_VERSION (   x)    (x & 0xFFFF)

Definition at line 377 of file nvm.h.

#define MAX_EEPROM_RETRIES   80

Definition at line 305 of file nvm.h.

#define MAX_FLASH_RETRIES   4

Definition at line 362 of file nvm.h.

#define MAX_INIT_PARAMS_LENGTH   (2048)

Definition at line 249 of file nvm.h.

#define MAX_READ_SIZE   0x10

Definition at line 310 of file nvm.h.

#define MAX_RW_SIZE   0x10

Definition at line 309 of file nvm.h.

#define MAX_SECTOR_SIZE   (512*1024)

Definition at line 311 of file nvm.h.

#define MIN_SECTOR_SIZE   (1024)

Definition at line 312 of file nvm.h.

#define MINOR_VERSION (   x)    ((x >>16) & 0xFFFF)

Definition at line 376 of file nvm.h.

#define NON_CDLESS_DEVICE_BOOT_SIG   0xBECEB007

Definition at line 375 of file nvm.h.

#define PAD_SELECT_REGISTER   0xAF000410

Definition at line 350 of file nvm.h.

#define RESET_CHIP_SELECT   -1

Definition at line 397 of file nvm.h.

#define RETRIES_PER_DELAY   64

Definition at line 306 of file nvm.h.

#define SCSI_FIRMWARE_MAJOR_VERSION   0x1

Definition at line 318 of file nvm.h.

#define SCSI_FIRMWARE_MINOR_VERSION   0x5

Definition at line 319 of file nvm.h.

#define SECTOR_128K   (2 * SECTOR_64K)

Definition at line 393 of file nvm.h.

#define SECTOR_1K   1024

Definition at line 391 of file nvm.h.

#define SECTOR_256k   (2 * SECTOR_128K)

Definition at line 394 of file nvm.h.

#define SECTOR_512K   (2 * SECTOR_256k)

Definition at line 395 of file nvm.h.

#define SECTOR_64K   (64 *SECTOR_1K)

Definition at line 392 of file nvm.h.

#define SECTOR_IS_NOT_WRITABLE   STATUS_FAILURE

Definition at line 388 of file nvm.h.

#define SECTOR_READONLY   1

Definition at line 401 of file nvm.h.

#define SECTOR_READWRITE_PERMISSION   0

Definition at line 400 of file nvm.h.

#define SIGNATURE_SIZE   4

Definition at line 402 of file nvm.h.

#define SPI_FLUSH_REG   0x0F00304C

Definition at line 273 of file nvm.h.

#define UNINIT_PTR_IN_CS   0xBBBBDDDD

Definition at line 379 of file nvm.h.

#define VENDOR_PTR_IN_CS   0xAAAACCCC

Definition at line 381 of file nvm.h.

Typedef Documentation