aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_nx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_nx.h')
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.h192
1 files changed, 192 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.h b/drivers/scsi/qla4xxx/ql4_nx.h
index dc7500e47b8b..30258479f100 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.h
+++ b/drivers/scsi/qla4xxx/ql4_nx.h
@@ -792,4 +792,196 @@ struct crb_addr_pair {
792#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0) 792#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0)
793#define MIU_TEST_AGT_WRDATA_UPPER_HI (0x0b4) 793#define MIU_TEST_AGT_WRDATA_UPPER_HI (0x0b4)
794 794
795/* Minidump related */
796
797/* Entry Type Defines */
798#define QLA82XX_RDNOP 0
799#define QLA82XX_RDCRB 1
800#define QLA82XX_RDMUX 2
801#define QLA82XX_QUEUE 3
802#define QLA82XX_BOARD 4
803#define QLA82XX_RDOCM 6
804#define QLA82XX_PREGS 7
805#define QLA82XX_L1DTG 8
806#define QLA82XX_L1ITG 9
807#define QLA82XX_L1DAT 11
808#define QLA82XX_L1INS 12
809#define QLA82XX_L2DTG 21
810#define QLA82XX_L2ITG 22
811#define QLA82XX_L2DAT 23
812#define QLA82XX_L2INS 24
813#define QLA82XX_RDROM 71
814#define QLA82XX_RDMEM 72
815#define QLA82XX_CNTRL 98
816#define QLA82XX_RDEND 255
817
818/* Opcodes for Control Entries.
819 * These Flags are bit fields.
820 */
821#define QLA82XX_DBG_OPCODE_WR 0x01
822#define QLA82XX_DBG_OPCODE_RW 0x02
823#define QLA82XX_DBG_OPCODE_AND 0x04
824#define QLA82XX_DBG_OPCODE_OR 0x08
825#define QLA82XX_DBG_OPCODE_POLL 0x10
826#define QLA82XX_DBG_OPCODE_RDSTATE 0x20
827#define QLA82XX_DBG_OPCODE_WRSTATE 0x40
828#define QLA82XX_DBG_OPCODE_MDSTATE 0x80
829
830/* Driver Flags */
831#define QLA82XX_DBG_SKIPPED_FLAG 0x80 /* driver skipped this entry */
832#define QLA82XX_DBG_SIZE_ERR_FLAG 0x40 /* Entry vs Capture size
833 * mismatch */
834
835/* Driver_code is for driver to write some info about the entry
836 * currently not used.
837 */
838struct qla82xx_minidump_entry_hdr {
839 uint32_t entry_type;
840 uint32_t entry_size;
841 uint32_t entry_capture_size;
842 struct {
843 uint8_t entry_capture_mask;
844 uint8_t entry_code;
845 uint8_t driver_code;
846 uint8_t driver_flags;
847 } d_ctrl;
848};
849
850/* Read CRB entry header */
851struct qla82xx_minidump_entry_crb {
852 struct qla82xx_minidump_entry_hdr h;
853 uint32_t addr;
854 struct {
855 uint8_t addr_stride;
856 uint8_t state_index_a;
857 uint16_t poll_timeout;
858 } crb_strd;
859 uint32_t data_size;
860 uint32_t op_count;
861
862 struct {
863 uint8_t opcode;
864 uint8_t state_index_v;
865 uint8_t shl;
866 uint8_t shr;
867 } crb_ctrl;
868
869 uint32_t value_1;
870 uint32_t value_2;
871 uint32_t value_3;
872};
873
874struct qla82xx_minidump_entry_cache {
875 struct qla82xx_minidump_entry_hdr h;
876 uint32_t tag_reg_addr;
877 struct {
878 uint16_t tag_value_stride;
879 uint16_t init_tag_value;
880 } addr_ctrl;
881 uint32_t data_size;
882 uint32_t op_count;
883 uint32_t control_addr;
884 struct {
885 uint16_t write_value;
886 uint8_t poll_mask;
887 uint8_t poll_wait;
888 } cache_ctrl;
889 uint32_t read_addr;
890 struct {
891 uint8_t read_addr_stride;
892 uint8_t read_addr_cnt;
893 uint16_t rsvd_1;
894 } read_ctrl;
895};
896
897/* Read OCM */
898struct qla82xx_minidump_entry_rdocm {
899 struct qla82xx_minidump_entry_hdr h;
900 uint32_t rsvd_0;
901 uint32_t rsvd_1;
902 uint32_t data_size;
903 uint32_t op_count;
904 uint32_t rsvd_2;
905 uint32_t rsvd_3;
906 uint32_t read_addr;
907 uint32_t read_addr_stride;
908};
909
910/* Read Memory */
911struct qla82xx_minidump_entry_rdmem {
912 struct qla82xx_minidump_entry_hdr h;
913 uint32_t rsvd[6];
914 uint32_t read_addr;
915 uint32_t read_data_size;
916};
917
918/* Read ROM */
919struct qla82xx_minidump_entry_rdrom {
920 struct qla82xx_minidump_entry_hdr h;
921 uint32_t rsvd[6];
922 uint32_t read_addr;
923 uint32_t read_data_size;
924};
925
926/* Mux entry */
927struct qla82xx_minidump_entry_mux {
928 struct qla82xx_minidump_entry_hdr h;
929 uint32_t select_addr;
930 uint32_t rsvd_0;
931 uint32_t data_size;
932 uint32_t op_count;
933 uint32_t select_value;
934 uint32_t select_value_stride;
935 uint32_t read_addr;
936 uint32_t rsvd_1;
937};
938
939/* Queue entry */
940struct qla82xx_minidump_entry_queue {
941 struct qla82xx_minidump_entry_hdr h;
942 uint32_t select_addr;
943 struct {
944 uint16_t queue_id_stride;
945 uint16_t rsvd_0;
946 } q_strd;
947 uint32_t data_size;
948 uint32_t op_count;
949 uint32_t rsvd_1;
950 uint32_t rsvd_2;
951 uint32_t read_addr;
952 struct {
953 uint8_t read_addr_stride;
954 uint8_t read_addr_cnt;
955 uint16_t rsvd_3;
956 } rd_strd;
957};
958
959#define QLA82XX_MINIDUMP_OCM0_SIZE (256 * 1024)
960#define QLA82XX_MINIDUMP_L1C_SIZE (256 * 1024)
961#define QLA82XX_MINIDUMP_L2C_SIZE 1572864
962#define QLA82XX_MINIDUMP_COMMON_STR_SIZE 0
963#define QLA82XX_MINIDUMP_FCOE_STR_SIZE 0
964#define QLA82XX_MINIDUMP_MEM_SIZE 0
965#define QLA82XX_MAX_ENTRY_HDR 4
966
967struct qla82xx_minidump {
968 uint32_t md_ocm0_data[QLA82XX_MINIDUMP_OCM0_SIZE];
969 uint32_t md_l1c_data[QLA82XX_MINIDUMP_L1C_SIZE];
970 uint32_t md_l2c_data[QLA82XX_MINIDUMP_L2C_SIZE];
971 uint32_t md_cs_data[QLA82XX_MINIDUMP_COMMON_STR_SIZE];
972 uint32_t md_fcoes_data[QLA82XX_MINIDUMP_FCOE_STR_SIZE];
973 uint32_t md_mem_data[QLA82XX_MINIDUMP_MEM_SIZE];
974};
975
976#define MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE 0x129
977#define RQST_TMPLT_SIZE 0x0
978#define RQST_TMPLT 0x1
979#define MD_DIRECT_ROM_WINDOW 0x42110030
980#define MD_DIRECT_ROM_READ_BASE 0x42150000
981#define MD_MIU_TEST_AGT_CTRL 0x41000090
982#define MD_MIU_TEST_AGT_ADDR_LO 0x41000094
983#define MD_MIU_TEST_AGT_ADDR_HI 0x41000098
984
985static const int MD_MIU_TEST_AGT_RDDATA[] = { 0x410000A8,
986 0x410000AC, 0x410000B8, 0x410000BC };
795#endif 987#endif