aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_nx.h
diff options
context:
space:
mode:
authorHarish Zunjarrao <harish.zunjarrao@qlogic.com>2010-05-28 18:08:23 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:01:24 -0400
commit9c2b297572bf3cc36d26520cd8f7e7ef4cb857f8 (patch)
treed98ce47df96e627f275a88cfebfc6b18408d834b /drivers/scsi/qla2xxx/qla_nx.h
parentb0cd579cde8ee0c7ed52239531ba09bcbc5b54c2 (diff)
[SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.
Used bootloder address from FLT while loading FW from flash as well. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nx.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.h b/drivers/scsi/qla2xxx/qla_nx.h
index aa95d3816d6c..9a9127efadaf 100644
--- a/drivers/scsi/qla2xxx/qla_nx.h
+++ b/drivers/scsi/qla2xxx/qla_nx.h
@@ -773,13 +773,48 @@ struct qla82xx_legacy_intr_set {
773 .pci_int_reg = ISR_MSI_INT_TRIGGER(7) }, \ 773 .pci_int_reg = ISR_MSI_INT_TRIGGER(7) }, \
774} 774}
775 775
776#define BRDCFG_START 0x4000
776#define BOOTLD_START 0x10000 777#define BOOTLD_START 0x10000
777#define IMAGE_START 0x100000 778#define IMAGE_START 0x100000
778#define FLASH_ADDR_START 0x43000 779#define FLASH_ADDR_START 0x43000
779 780
780/* Magic number to let user know flash is programmed */ 781/* Magic number to let user know flash is programmed */
781#define QLA82XX_BDINFO_MAGIC 0x12345678 782#define QLA82XX_BDINFO_MAGIC 0x12345678
783#define QLA82XX_FW_MAGIC_OFFSET (BRDCFG_START + 0x128)
782#define FW_SIZE_OFFSET (0x3e840c) 784#define FW_SIZE_OFFSET (0x3e840c)
785#define QLA82XX_FW_MIN_SIZE 0x3fffff
786
787/* UNIFIED ROMIMAGE START */
788#define QLA82XX_URI_FW_MIN_SIZE 0xc8000
789#define QLA82XX_URI_DIR_SECT_PRODUCT_TBL 0x0
790#define QLA82XX_URI_DIR_SECT_BOOTLD 0x6
791#define QLA82XX_URI_DIR_SECT_FW 0x7
792
793/* Offsets */
794#define QLA82XX_URI_CHIP_REV_OFF 10
795#define QLA82XX_URI_FLAGS_OFF 11
796#define QLA82XX_URI_BIOS_VERSION_OFF 12
797#define QLA82XX_URI_BOOTLD_IDX_OFF 27
798#define QLA82XX_URI_FIRMWARE_IDX_OFF 29
799
800struct qla82xx_uri_table_desc{
801 uint32_t findex;
802 uint32_t num_entries;
803 uint32_t entry_size;
804 uint32_t reserved[5];
805};
806
807struct qla82xx_uri_data_desc{
808 uint32_t findex;
809 uint32_t size;
810 uint32_t reserved[5];
811};
812
813/* UNIFIED ROMIMAGE END */
814
815#define QLA82XX_UNIFIED_ROMIMAGE 3
816#define QLA82XX_FLASH_ROMIMAGE 4
817#define QLA82XX_UNKNOWN_ROMIMAGE 0xff
783 818
784#define QLA82XX_IS_REVISION_P3PLUS(_rev_) ((_rev_) >= 0x50) 819#define QLA82XX_IS_REVISION_P3PLUS(_rev_) ((_rev_) >= 0x50)
785#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0) 820#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0)