| /******************************************************************************** |
| * Marvell GPL License Option |
| * |
| * If you received this File from Marvell, you may opt to use, redistribute and/or |
| * modify this File in accordance with the terms and conditions of the General |
| * Public License Version 2, June 1991 (the "GPL License"), a copy of which is |
| * available along with the File in the license.txt file or by writing to the Free |
| * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or |
| * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. |
| * |
| * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED |
| * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY |
| * DISCLAIMED. The GPL License provides additional details about this warranty |
| * disclaimer. |
| ******************************************************************************/ |
| |
| ////// |
| /// don't edit! auto-generated by docc: sataWrapper.h |
| //////////////////////////////////////////////////////////// |
| #ifndef sataWrapper_h |
| #define sataWrapper_h (){} |
| |
| |
| #include "ctypes.h" |
| |
| #pragma pack(1) |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| #ifndef _DOCC_H_BITOPS_ |
| #define _DOCC_H_BITOPS_ (){} |
| |
| #define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0) |
| #define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb)) |
| #define _bCLRMASK_(b) (~_bSETMASK_(b)) |
| #define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb)) |
| #define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb))) |
| #define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0) |
| |
| #endif |
| |
| |
| |
| ////// |
| /// |
| /// $INTERFACE SataRegs biu (4,4) |
| /// # # ---------------------------------------------------------- |
| /// @ 0x00000 (W-) |
| /// # # Stuffing bytes... |
| /// %% 262144 |
| /// @ 0x08000 IPPorts (P) |
| /// %unsigned 4 unit_mbus_id 0x1 |
| /// ### |
| /// * Connected to port unit_mbus_id |
| /// ### |
| /// %unsigned 3 REFCLK_CNFG 0x1 |
| /// ### |
| /// * Connected to port REFCLK_CNFG |
| /// ### |
| /// %unsigned 1 SATA_GEN2_EN_0 0x1 |
| /// ### |
| /// * Connected to port SATA_GEN2_EN_0 |
| /// ### |
| /// %unsigned 1 SATA_COMM_EN_0 0x1 |
| /// ### |
| /// * Connected to port SATA_COMM_EN_0 |
| /// ### |
| /// %unsigned 1 SATA_PHY_OFF_0 0x0 |
| /// ### |
| /// * Connected to port SATA_PHY_OFF_0 |
| /// ### |
| /// %unsigned 1 SATA_GEN2_EN_1 0x1 |
| /// ### |
| /// * Connected to port SATA_GEN2_EN_1 |
| /// ### |
| /// %unsigned 1 SATA_COMM_EN_1 0x1 |
| /// ### |
| /// * Connected to port SATA_COMM_EN_1 |
| /// ### |
| /// %unsigned 1 SATA_PHY_OFF_1 0x0 |
| /// ### |
| /// * Connected to port SATA_PHY_OFF_1 |
| /// ### |
| /// %unsigned 2 SATA_DIG_DEBUG 0x0 |
| /// ### |
| /// * SATA Debug Bus Select |
| /// * 0: SATA_MONITOR_0 (Controller) |
| /// * 1: DIG_TEST_BUS (Analog) |
| /// * 2: SATA_ST_ACTIVE_0, SATA_PHY_READY_0 |
| /// ### |
| /// %% 17 # Stuffing bits... |
| /// # # ---------------------------------------------------------- |
| /// $ENDOFINTERFACE # size: 32772B, bits: 15b, padding: 0B |
| //////////////////////////////////////////////////////////// |
| #ifndef h_SataRegs |
| #define h_SataRegs (){} |
| |
| #define RA_SataRegs_IPPorts 0x8000 |
| |
| #define BA_SataRegs_IPPorts_unit_mbus_id 0x8000 |
| #define B16SataRegs_IPPorts_unit_mbus_id 0x8000 |
| #define LSb32SataRegs_IPPorts_unit_mbus_id 0 |
| #define LSb16SataRegs_IPPorts_unit_mbus_id 0 |
| #define bSataRegs_IPPorts_unit_mbus_id 4 |
| #define MSK32SataRegs_IPPorts_unit_mbus_id 0x0000000F |
| |
| #define BA_SataRegs_IPPorts_REFCLK_CNFG 0x8000 |
| #define B16SataRegs_IPPorts_REFCLK_CNFG 0x8000 |
| #define LSb32SataRegs_IPPorts_REFCLK_CNFG 4 |
| #define LSb16SataRegs_IPPorts_REFCLK_CNFG 4 |
| #define bSataRegs_IPPorts_REFCLK_CNFG 3 |
| #define MSK32SataRegs_IPPorts_REFCLK_CNFG 0x00000070 |
| |
| #define BA_SataRegs_IPPorts_SATA_GEN2_EN_0 0x8000 |
| #define B16SataRegs_IPPorts_SATA_GEN2_EN_0 0x8000 |
| #define LSb32SataRegs_IPPorts_SATA_GEN2_EN_0 7 |
| #define LSb16SataRegs_IPPorts_SATA_GEN2_EN_0 7 |
| #define bSataRegs_IPPorts_SATA_GEN2_EN_0 1 |
| #define MSK32SataRegs_IPPorts_SATA_GEN2_EN_0 0x00000080 |
| |
| #define BA_SataRegs_IPPorts_SATA_COMM_EN_0 0x8001 |
| #define B16SataRegs_IPPorts_SATA_COMM_EN_0 0x8000 |
| #define LSb32SataRegs_IPPorts_SATA_COMM_EN_0 8 |
| #define LSb16SataRegs_IPPorts_SATA_COMM_EN_0 8 |
| #define bSataRegs_IPPorts_SATA_COMM_EN_0 1 |
| #define MSK32SataRegs_IPPorts_SATA_COMM_EN_0 0x00000100 |
| |
| #define BA_SataRegs_IPPorts_SATA_PHY_OFF_0 0x8001 |
| #define B16SataRegs_IPPorts_SATA_PHY_OFF_0 0x8000 |
| #define LSb32SataRegs_IPPorts_SATA_PHY_OFF_0 9 |
| #define LSb16SataRegs_IPPorts_SATA_PHY_OFF_0 9 |
| #define bSataRegs_IPPorts_SATA_PHY_OFF_0 1 |
| #define MSK32SataRegs_IPPorts_SATA_PHY_OFF_0 0x00000200 |
| |
| #define BA_SataRegs_IPPorts_SATA_GEN2_EN_1 0x8001 |
| #define B16SataRegs_IPPorts_SATA_GEN2_EN_1 0x8000 |
| #define LSb32SataRegs_IPPorts_SATA_GEN2_EN_1 10 |
| #define LSb16SataRegs_IPPorts_SATA_GEN2_EN_1 10 |
| #define bSataRegs_IPPorts_SATA_GEN2_EN_1 1 |
| #define MSK32SataRegs_IPPorts_SATA_GEN2_EN_1 0x00000400 |
| |
| #define BA_SataRegs_IPPorts_SATA_COMM_EN_1 0x8001 |
| #define B16SataRegs_IPPorts_SATA_COMM_EN_1 0x8000 |
| #define LSb32SataRegs_IPPorts_SATA_COMM_EN_1 11 |
| #define LSb16SataRegs_IPPorts_SATA_COMM_EN_1 11 |
| #define bSataRegs_IPPorts_SATA_COMM_EN_1 1 |
| #define MSK32SataRegs_IPPorts_SATA_COMM_EN_1 0x00000800 |
| |
| #define BA_SataRegs_IPPorts_SATA_PHY_OFF_1 0x8001 |
| #define B16SataRegs_IPPorts_SATA_PHY_OFF_1 0x8000 |
| #define LSb32SataRegs_IPPorts_SATA_PHY_OFF_1 12 |
| #define LSb16SataRegs_IPPorts_SATA_PHY_OFF_1 12 |
| #define bSataRegs_IPPorts_SATA_PHY_OFF_1 1 |
| #define MSK32SataRegs_IPPorts_SATA_PHY_OFF_1 0x00001000 |
| |
| #define BA_SataRegs_IPPorts_SATA_DIG_DEBUG 0x8001 |
| #define B16SataRegs_IPPorts_SATA_DIG_DEBUG 0x8000 |
| #define LSb32SataRegs_IPPorts_SATA_DIG_DEBUG 13 |
| #define LSb16SataRegs_IPPorts_SATA_DIG_DEBUG 13 |
| #define bSataRegs_IPPorts_SATA_DIG_DEBUG 2 |
| #define MSK32SataRegs_IPPorts_SATA_DIG_DEBUG 0x00006000 |
| /////////////////////////////////////////////////////////// |
| |
| typedef struct SIE_SataRegs { |
| /////////////////////////////////////////////////////////// |
| UNSG8 RSVDx0 [32768]; |
| /////////////////////////////////////////////////////////// |
| #define GET32SataRegs_IPPorts_unit_mbus_id(r32) _BFGET_(r32, 3, 0) |
| #define SET32SataRegs_IPPorts_unit_mbus_id(r32,v) _BFSET_(r32, 3, 0,v) |
| #define GET16SataRegs_IPPorts_unit_mbus_id(r16) _BFGET_(r16, 3, 0) |
| #define SET16SataRegs_IPPorts_unit_mbus_id(r16,v) _BFSET_(r16, 3, 0,v) |
| |
| #define GET32SataRegs_IPPorts_REFCLK_CNFG(r32) _BFGET_(r32, 6, 4) |
| #define SET32SataRegs_IPPorts_REFCLK_CNFG(r32,v) _BFSET_(r32, 6, 4,v) |
| #define GET16SataRegs_IPPorts_REFCLK_CNFG(r16) _BFGET_(r16, 6, 4) |
| #define SET16SataRegs_IPPorts_REFCLK_CNFG(r16,v) _BFSET_(r16, 6, 4,v) |
| |
| #define GET32SataRegs_IPPorts_SATA_GEN2_EN_0(r32) _BFGET_(r32, 7, 7) |
| #define SET32SataRegs_IPPorts_SATA_GEN2_EN_0(r32,v) _BFSET_(r32, 7, 7,v) |
| #define GET16SataRegs_IPPorts_SATA_GEN2_EN_0(r16) _BFGET_(r16, 7, 7) |
| #define SET16SataRegs_IPPorts_SATA_GEN2_EN_0(r16,v) _BFSET_(r16, 7, 7,v) |
| |
| #define GET32SataRegs_IPPorts_SATA_COMM_EN_0(r32) _BFGET_(r32, 8, 8) |
| #define SET32SataRegs_IPPorts_SATA_COMM_EN_0(r32,v) _BFSET_(r32, 8, 8,v) |
| #define GET16SataRegs_IPPorts_SATA_COMM_EN_0(r16) _BFGET_(r16, 8, 8) |
| #define SET16SataRegs_IPPorts_SATA_COMM_EN_0(r16,v) _BFSET_(r16, 8, 8,v) |
| |
| #define GET32SataRegs_IPPorts_SATA_PHY_OFF_0(r32) _BFGET_(r32, 9, 9) |
| #define SET32SataRegs_IPPorts_SATA_PHY_OFF_0(r32,v) _BFSET_(r32, 9, 9,v) |
| #define GET16SataRegs_IPPorts_SATA_PHY_OFF_0(r16) _BFGET_(r16, 9, 9) |
| #define SET16SataRegs_IPPorts_SATA_PHY_OFF_0(r16,v) _BFSET_(r16, 9, 9,v) |
| |
| #define GET32SataRegs_IPPorts_SATA_GEN2_EN_1(r32) _BFGET_(r32,10,10) |
| #define SET32SataRegs_IPPorts_SATA_GEN2_EN_1(r32,v) _BFSET_(r32,10,10,v) |
| #define GET16SataRegs_IPPorts_SATA_GEN2_EN_1(r16) _BFGET_(r16,10,10) |
| #define SET16SataRegs_IPPorts_SATA_GEN2_EN_1(r16,v) _BFSET_(r16,10,10,v) |
| |
| #define GET32SataRegs_IPPorts_SATA_COMM_EN_1(r32) _BFGET_(r32,11,11) |
| #define SET32SataRegs_IPPorts_SATA_COMM_EN_1(r32,v) _BFSET_(r32,11,11,v) |
| #define GET16SataRegs_IPPorts_SATA_COMM_EN_1(r16) _BFGET_(r16,11,11) |
| #define SET16SataRegs_IPPorts_SATA_COMM_EN_1(r16,v) _BFSET_(r16,11,11,v) |
| |
| #define GET32SataRegs_IPPorts_SATA_PHY_OFF_1(r32) _BFGET_(r32,12,12) |
| #define SET32SataRegs_IPPorts_SATA_PHY_OFF_1(r32,v) _BFSET_(r32,12,12,v) |
| #define GET16SataRegs_IPPorts_SATA_PHY_OFF_1(r16) _BFGET_(r16,12,12) |
| #define SET16SataRegs_IPPorts_SATA_PHY_OFF_1(r16,v) _BFSET_(r16,12,12,v) |
| |
| #define GET32SataRegs_IPPorts_SATA_DIG_DEBUG(r32) _BFGET_(r32,14,13) |
| #define SET32SataRegs_IPPorts_SATA_DIG_DEBUG(r32,v) _BFSET_(r32,14,13,v) |
| #define GET16SataRegs_IPPorts_SATA_DIG_DEBUG(r16) _BFGET_(r16,14,13) |
| #define SET16SataRegs_IPPorts_SATA_DIG_DEBUG(r16,v) _BFSET_(r16,14,13,v) |
| |
| #define w32SataRegs_IPPorts {\ |
| UNSG32 uIPPorts_unit_mbus_id : 4;\ |
| UNSG32 uIPPorts_REFCLK_CNFG : 3;\ |
| UNSG32 uIPPorts_SATA_GEN2_EN_0 : 1;\ |
| UNSG32 uIPPorts_SATA_COMM_EN_0 : 1;\ |
| UNSG32 uIPPorts_SATA_PHY_OFF_0 : 1;\ |
| UNSG32 uIPPorts_SATA_GEN2_EN_1 : 1;\ |
| UNSG32 uIPPorts_SATA_COMM_EN_1 : 1;\ |
| UNSG32 uIPPorts_SATA_PHY_OFF_1 : 1;\ |
| UNSG32 uIPPorts_SATA_DIG_DEBUG : 2;\ |
| UNSG32 RSVDx8000_b15 : 17;\ |
| } |
| union { UNSG32 u32SataRegs_IPPorts; |
| struct w32SataRegs_IPPorts; |
| }; |
| /////////////////////////////////////////////////////////// |
| } SIE_SataRegs; |
| |
| typedef union T32SataRegs_IPPorts |
| { UNSG32 u32; |
| struct w32SataRegs_IPPorts; |
| } T32SataRegs_IPPorts; |
| /////////////////////////////////////////////////////////// |
| |
| typedef union TSataRegs_IPPorts |
| { UNSG32 u32[1]; |
| struct { |
| struct w32SataRegs_IPPorts; |
| }; |
| } TSataRegs_IPPorts; |
| |
| /////////////////////////////////////////////////////////// |
| SIGN32 SataRegs_drvrd(SIE_SataRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst); |
| SIGN32 SataRegs_drvwr(SIE_SataRegs *p, UNSG32 base, SIGN32 mem, SIGN32 tst, UNSG32 *pcmd); |
| void SataRegs_reset(SIE_SataRegs *p); |
| SIGN32 SataRegs_cmp (SIE_SataRegs *p, SIE_SataRegs *pie, char *pfx, void *hLOG, SIGN32 mem, SIGN32 tst); |
| #define SataRegs_check(p,pie,pfx,hLOG) SataRegs_cmp(p,pie,pfx,(void*)(hLOG),0,0) |
| #define SataRegs_print(p, pfx,hLOG) SataRegs_cmp(p,0, pfx,(void*)(hLOG),0,0) |
| |
| #endif |
| ////// |
| /// ENDOFINTERFACE: SataRegs |
| //////////////////////////////////////////////////////////// |
| |
| |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| #pragma pack() |
| |
| #endif |
| ////// |
| /// ENDOFFILE: sataWrapper.h |
| //////////////////////////////////////////////////////////// |
| |