Use Cases
1357
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial ATA (SATA) Controller
}DataByteCnt;
typedef struct {
DbaAddressLow
DW0;
DbaAddressHigh DW1;
PrdtRsv
DW2;
DataByteCnt
DW3;
}PRDT;
//-----------PRDT end ---------------------------
//-----------Command Table Data Structure -------
// Since Command Table has to be 128 bytes = 0x80 bytes aligned if supporting more
//
than a single Command Header, then need to make sure that the Array you are
//
creating for all associated Command Tables match the 128 bytes alignment.
//
In order to do so, the number of PRD Table length you are allocating should be
//
multiples of 8.
typedef struct {
CommandFIS cfis;
Atapi
atapi;
Uint32
Rsv[12];
PRDT
prdTable[16];
// Have forced this size to 8 in order to meet the minimum
//
required size for Command Table.
}CommandTable;
//-----------Command Table Data Structure end ---
/////////////////////////////////////////////////////////////////////////////////////////////
// Receive FIS requires the Receive FIS to be 256 byte aligned. P0FB should be programmed
//
with this restriction.
//
// RECEIVE FIS Data Structure
// Members: DMA Setup FIS (DSFIS)
//
PIO Setup FIS (PSFIS)
//
D2H Register FIS (RFIS)
//
Set Device Bits FIS (SDBFIS)
//
Unknown FIS (UFIS)
//-----------DMA Setup FIS-----------------------
typedef struct {
Uint32 B0FisType:8;//bits[7:0]
Uint32 BYTE1:8;
//bits[15:8]
Uint32 B2Rsv:8;
//bits[23:16]
Uint32 B3Rsv:8;
//bits[31:24]
}DsfisW0;
typedef struct {
DsfisW0 DW0;
Uint32 DW1DmaBuffLow;
Uint32 DW2DmaBuffHigh;
Uint32 DW3Rsv;
Uint32 DW4DmaBuffOffset;
Uint32 DW5DmaXfrCnt;
Uint32 DW6Rsv;
}DMASetupFis;
//-----------DMA Setup FIS end PIO Setup FIS ----
typedef struct {
Uint32 B0FisType:8;//bits[7:0]
Uint32 BYTE1:8;
//bits[15:8]
Uint32 B2Status:8;
//bits[23:16]