Preliminary
www.ti.com
Use Cases
Uint8 regfisByte1;
Uint8 regfisStatus;
Uint8 regfisError;
Uint8 regfisDw1SecNumLbaLow;
Uint8 regfisDw1CylLowLbaMid;
Uint8 regfisDw1CylHighLbahigh;
Uint8 regfisDw1Dev;
Uint8 regfisDw3SecCnt;
}regFis;
typedef struct {
Uint8 sdbfisType;
Uint8 sdbfisByte1;
Uint8 sdbfisStatus;
Uint8 sdbfisError;
}sdbFis;
typedef struct {
Uint32 ufisWord[16];
}uFis;
typedef struct {
Uint32
capSMPS:1;
Uint32
capSSS:1;
Uint32
piPi:2;
Uint32
p0cmdCpd:1;
Uint32
p0cmdEsp:1;
Uint32
p0cmdMpsp:1;
Uint32
p0cmdHpcp:1;
Uint32
rsv:24;
}FirmwareCtrlFeatures;
void initMemory(Uint32 *startAddress, Uint32 length, Uint32 seedWord, Uint32 modifyVal) {
Uint32 I;
*start+ = seedWord;
for (I=0; i<length-1; I++) {
se= modifyVal;
*start+ = seedWord;
}
}
void clearCmdList(void) {
//clear Host to Device (Command FIS) Space
initMemory((Uint32*)CmdLists, (LISTLENGTH*(sizeof(CmdListHeader)/4)), 0, 0);
}
void clearCmdTables(void) {
Uint16 cmdSlot;
for (cmdSlot=0; cmdSlot<LISTLENGTH; +) {
//Clear Command FIS and ATAPI Command Spaces for Command Header X; LISTLENGTH < X < 0
initMemory((Uint32 *)&CmdTable[cmdSlot], (sizeof(CommandFIS)/4)+(sizeof(Atapi)/4), 0,
0);
//Clear PRD Descriptor Locations for Command Header X; LISTLENGTH < X < 0
initMemory((Uint32*)((Uint32)&CmdTable[c0x80),
(sata_input_filePageSize*(sizeof(PRDT)/4)*sata_input_prdLength), 0, 0);
}
}
void clearRcvFis() {
//clear Receive DMA Setup FIS Space.
initMemory((Uint32*)&RcvFis, (sizeof(DMASetupFis)/4), 0, 0);
//clear Receive PIO Setup FIS Space.
initMemory((Uint32*)((Uint32)&0x20), (sizeof(PIOSetupFis)/4), 0, 0);
//clear Receive Device to Host (D2H) Register FIS Space.
initMemory((Uint32*)((Uint32)&0x40), (sizeof(D2HRegFis)/4), 0, 0);
//clear Set Device Bits FIS Space.
initMemory((Uint32*)((Uint32)&0x58), (sizeof(SetDevBitsFis)/4), 0, 0);
//clear Unknow FIS Space.
initMemory((Uint32*)((Uint32)&0x60), (sizeof(UnknownFis)/4), 0, 0);
}
1581
SPRUGX9 – 15 April 2011
Serial ATA (SATA) Controller
© 2011, Texas Instruments Incorporated
Содержание TMS320C6A816 Series
Страница 2: ...Preliminary 2 SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 92: ...92 Read This First SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1122: ...1122 Multichannel Audio Serial Port McASP SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1562: ...1562 Real Time Clock RTC SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1658: ...1658 Timers SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1750: ...1750 UART IrDA CIR Module SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1984: ...1984 Universal Serial Bus USB SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...