/* * PMC-Sierra SPC 8001 SAS/SATA based host adapters driver * * Copyright (c) 2008-2009 USI Co., Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer, * without modification. * 2. Redistributions in binary form must reproduce at minimum a disclaimer * substantially similar to the "NO WARRANTY" disclaimer below * ("Disclaimer") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. * 3. Neither the names of the above-listed copyright holders nor the names * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. * * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. *
*/ #ifndef _PMC8001_REG_H_ #define _PMC8001_REG_H_
/* for new SPC controllers MEMBASE III is shared between BIOS and DATA */ #define GSM_SM_BASE 0x4F0000 struct mpi_msg_hdr{
__le32 header; /* Bits [11:0] - Message operation code */ /* Bits [15:12] - Message Category */ /* Bits [21:16] - Outboundqueue ID for the
operation completion message */ /* Bits [23:22] - Reserved */ /* Bits [28:24] - Buffer Count, indicates how
many buffer are allocated for the massage */ /* Bits [30:29] - Reserved */ /* Bits [31] - Message Valid bit */
} __attribute__((packed, aligned(4)));
/* * brief the data structure of PHY Start Command * use to describe enable the phy (64 bytes)
*/ struct phy_start_req {
__le32 tag;
__le32 ase_sh_lm_slr_phyid; struct sas_identify_frame sas_identify;
u32 reserved[5];
} __attribute__((packed, aligned(4)));
/* * brief the data structure of PHY Start Command * use to disable the phy (64 bytes)
*/ struct phy_stop_req {
__le32 tag;
__le32 phy_id;
u32 reserved[13];
} __attribute__((packed, aligned(4)));
/* set device bits fis - device to host */ struct set_dev_bits_fis {
u8 fis_type; /* 0xA1*/
u8 n_i_pmport; /* b7 : n Bit. Notification bit. If set device needs attention. */ /* b6 : i Bit. Interrupt Bit */ /* b5-b4: reserved2 */ /* b3-b0: PM Port */
u8 status;
u8 error;
u32 _r_a;
} __attribute__ ((packed)); /* PIO setup FIS - device to host */ struct pio_setup_fis {
u8 fis_type; /* 0x5f */
u8 i_d_pmPort; /* b7 : reserved */ /* b6 : i bit. Interrupt bit */ /* b5 : d bit. data transfer direction. set to 1 for device to host
xfer */ /* b4 : reserved */ /* b3-b0: PM Port */
u8 status;
u8 error;
u8 lbal;
u8 lbam;
u8 lbah;
u8 device;
u8 lbal_exp;
u8 lbam_exp;
u8 lbah_exp;
u8 _r_a;
u8 sector_count;
u8 sector_count_exp;
u8 _r_b;
u8 e_status;
u8 _r_c[2];
u8 transfer_count;
} __attribute__ ((packed));
/* * brief the data structure of SATA Completion Response * use to describe the sata task response (64 bytes)
*/ struct sata_completion_resp {
__le32 tag;
__le32 status;
__le32 param;
u32 sata_resp[12];
} __attribute__((packed, aligned(4)));
/* * brief the data structure of SAS HW Event Notification * use to alert the host about the hardware event(64 bytes)
*/ struct hw_event_resp {
__le32 lr_evt_status_phyid_portid;
__le32 evt_param;
__le32 npip_portstate; struct sas_identify_frame sas_identify; struct dev_to_host_fis sata_fis;
} __attribute__((packed, aligned(4)));
/* * brief the data structure of REGISTER DEVICE Command * use to describe MPI REGISTER DEVICE Command (64 bytes)
*/
/* * brief the data structure of DEREGISTER DEVICE Command * use to request spc to remove all internal resources associated * with the device id (64 bytes)
*/
/* * brief the data structure of Local PHY Control Command * use to issue PHY CONTROL to local phy (64 bytes)
*/ struct local_phy_ctl_req {
__le32 tag;
__le32 phyop_phyid;
u32 reserved1[13];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of Local Phy Control Response * use to describe MPI Local Phy Control Response (64 bytes)
*/ struct local_phy_ctl_resp {
__le32 tag;
__le32 phyop_phyid;
__le32 status;
u32 reserved[12];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of General Event Notification Response * use to describe MPI General Event Notification Response (64 bytes)
*/ struct general_event_resp {
__le32 status;
__le32 inb_IOMB_payload[14];
} __attribute__((packed, aligned(4)));
/* * brief the data structure of SMP Request Command * use to describe MPI SMP REQUEST Command (64 bytes)
*/ struct smp_req {
__le32 tag;
__le32 device_id;
__le32 len_ip_ir; /* Bits [0] - Indirect response */ /* Bits [1] - Indirect Payload */ /* Bits [15:2] - Reserved */ /* Bits [23:16] - direct payload Len */ /* Bits [31:24] - Reserved */
u8 smp_req16[16]; union {
u8 smp_req[32]; struct {
__le64 long_req_addr;/* sg dma address, LE */
__le32 long_req_size;/* LE */
u32 _r_a;
__le64 long_resp_addr;/* sg dma address, LE */
__le32 long_resp_size;/* LE */
u32 _r_b;
} long_smp_req;/* sequencer extension */
};
} __attribute__((packed, aligned(4))); /* * brief the data structure of SMP Completion Response * use to describe MPI SMP Completion Response (64 bytes)
*/ struct smp_completion_resp {
__le32 tag;
__le32 status;
__le32 param;
__le32 _r_a[12];
} __attribute__((packed, aligned(4)));
/* *brief the data structure of SSP SMP SATA Abort Command * use to describe MPI SSP SMP & SATA Abort Command (64 bytes)
*/ struct task_abort_req {
__le32 tag;
__le32 device_id;
__le32 tag_to_abort;
__le32 abort_all;
u32 reserved[11];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of SSP SATA SMP Abort Response * use to describe SSP SMP & SATA Abort Response ( 64 bytes)
*/ struct task_abort_resp {
__le32 tag;
__le32 status;
__le32 scp;
u32 reserved[12];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of SAS Diagnostic Start/End Command * use to describe MPI SAS Diagnostic Start/End Command (64 bytes)
*/ struct sas_diag_start_end_req {
__le32 tag;
__le32 operation_phyid;
u32 reserved[13];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of SAS Diagnostic Execute Command * use to describe MPI SAS Diagnostic Execute Command (64 bytes)
*/ struct sas_diag_execute_req{
__le32 tag;
__le32 cmdtype_cmddesc_phyid;
__le32 pat1_pat2;
__le32 threshold;
__le32 codepat_errmsk;
__le32 pmon;
__le32 pERF1CTL;
u32 reserved[8];
} __attribute__((packed, aligned(4)));
#define SAS_DIAG_PARAM_BYTES 24
/* * brief the data structure of Set Device State Command * use to describe MPI Set Device State Command (64 bytes)
*/ struct set_dev_state_req {
__le32 tag;
__le32 device_id;
__le32 nds;
u32 reserved[12];
} __attribute__((packed, aligned(4)));
/* * brief the data structure of sas_re_initialization
*/ struct sas_re_initialization_req {
__le32 tag;
__le32 SSAHOLT;/* bit29-set max port; ** bit28-set open reject cmd retries. ** bit27-set open reject data retries. ** bit26-set open reject option, remap:1 or not:0. ** bit25-set sata head of line time out.
*/
__le32 reserved_maxPorts;
__le32 open_reject_cmdretries_data_retries;/* cmd retries: 31-bit16; * data retries: bit15-bit0.
*/
__le32 sata_hol_tmo;
u32 reserved1[10];
} __attribute__((packed, aligned(4)));
/* * brief the data structure of SATA Start Command * use to describe MPI SATA IO Start Command (64 bytes)
*/
/** * brief the data structure of SSP INI IO Start Command * use to describe MPI SSP INI IO Start Command (64 bytes)
*/ struct ssp_ini_io_start_req {
__le32 tag;
__le32 device_id;
__le32 data_len;
__le32 dir_m_tlr; struct ssp_info_unit ssp_iu;
__le32 addr_low;
__le32 addr_high;
__le32 len;
__le32 esgl;
} __attribute__((packed, aligned(4)));
/** * brief the data structure of Firmware download * use to describe MPI FW DOWNLOAD Command (64 bytes)
*/ struct fw_flash_Update_req {
__le32 tag;
__le32 cur_image_offset;
__le32 cur_image_len;
__le32 total_image_len;
u32 reserved0[7];
__le32 sgl_addr_lo;
__le32 sgl_addr_hi;
__le32 len;
__le32 ext_reserved;
} __attribute__((packed, aligned(4)));
#define FWFLASH_IOMB_RESERVED_LEN 0x07 /** * brief the data structure of FW_FLASH_UPDATE Response * use to describe MPI FW_FLASH_UPDATE Response (64 bytes) *
*/ struct fw_flash_Update_resp {
__le32 tag;
__le32 status;
u32 reserved[13];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of Get NVM Data Command * use to get data from NVM in HBA(64 bytes)
*/ struct get_nvm_data_req {
__le32 tag;
__le32 len_ir_vpdd;
__le32 vpd_offset;
u32 reserved[8];
__le32 resp_addr_lo;
__le32 resp_addr_hi;
__le32 resp_len;
u32 reserved1;
} __attribute__((packed, aligned(4)));
#define IPMode 0x80000000 #define NVMD_TYPE 0x0000000F #define NVMD_STAT 0x0000FFFF #define NVMD_LEN 0xFF000000 /** * brief the data structure of Get NVMD Data Response * use to describe MPI Get NVMD Data Response (64 bytes)
*/ struct get_nvm_data_resp {
__le32 tag;
__le32 ir_tda_bn_dps_das_nvm;
__le32 dlen_status;
__le32 nvm_data[12];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of SAS Diagnostic Start/End Response * use to describe MPI SAS Diagnostic Start/End Response (64 bytes) *
*/ struct sas_diag_start_end_resp {
__le32 tag;
__le32 status;
u32 reserved[13];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of SAS Diagnostic Execute Response * use to describe MPI SAS Diagnostic Execute Response (64 bytes) *
*/ struct sas_diag_execute_resp {
__le32 tag;
__le32 cmdtype_cmddesc_phyid;
__le32 Status;
__le32 ReportData;
u32 reserved[11];
} __attribute__((packed, aligned(4)));
/** * brief the data structure of Set Device State Response * use to describe MPI Set Device State Response (64 bytes) *
*/ struct set_dev_state_resp {
__le32 tag;
__le32 status;
__le32 device_id;
__le32 pds_nds;
u32 reserved[11];
} __attribute__((packed, aligned(4)));
/* WARNING: This error code must always be the last number. * If you add error code, modify this code also * It is used as an index
*/ #define IO_ERROR_UNKNOWN_GENERIC 0x43
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.