Texas Instruments TMS320C6A816 Series Technical Reference Manual page 1585

C6-integra dsp+arm processors
Table of Contents

Advertisement

www.ti.com
if (readOrWrite == DATA_DIR_WR) // The Write setting here is based on the Data FIS
direction.
CmdListNum->DW0.Write=1;
else if (readOrWrite == DATA_DIR_RD) // The Write setting here is based on the Data FIS
direction.
CmdListNum->DW0.Write=0;
else return(1);
//
CmdListNum->DW0.Prdtl=sata_input_prdLength;
Data transfer.
CmdListNum->DW0.Prdtl=sata_input_filePageSize*sata_input_prdLength;
this when using DMA for Data transfer.
// *************************************************************************************
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ **** Initializing the Command FIS (H2D FIS) ******
// Cmd FIS is made of a 20 Bytes size FIS.
// FIS Fieds are Initialized into the alloted data buffers.
// Strucutre type 'cmdFis' holds 8 of the 20 bytes of the FIS. These
//
seven elements of the cfis are good enough for majority of command
//
building tasks.
// If need to access other cfis members, need to access the cfis member
//
directly. Example of how to access the FIS Type, cfis Byte0.
//
CmdTable[n].cfis.DW0.B0FisType=0x27;
// FIS Type is hard coded within buildCmdFis function and Reserved Locations
//
are also cleared to Zeros, so no need of iniitalizing this bytes is necessary here.
// Make sure the Device 28 Bit LBA Address is initialize prior to calling this function.
if (Dev28bitLbaAddress == 0xFFFFFFFF)
return(1);
myCmdFis.cfisByte1
for Command Wr and Cleared for Control Wr
//myCmdFis.cfisByte1
Cleared for Command Control Wr.
if (readOrWrite == DATA_DIR_WR) {
if (xferType == DMA_PROTOCOL) {
myCmdFis.cfisCmd
//myCmdFis.cfisCmd
} else {
myCmdFis.cfisCmd
28-Bit Addressing
}
}
else {
if (xferType == DMA_PROTOCOL) {
myCmdFis.cfisCmd
//myCmdFis.cfisCmd
} else {
if (PioCmd == ATA_CMD_IDENTIFY_DEVICE)
myCmdFis.cfisCmd
Uses 28-Bit Addressing.
else
myCmdFis.cfisCmd
28-Bit Addressing.
}
}
myCmdFis.cfisFeature
myCmdFis.cfisDw1SecNumLbaLow
myCmdFis.cfisDw1CylLowLbaMid
myCmdFis.cfisDw1CylHighLbahigh = (Uint8)(Dev28bitLbaAddress>>16);
myCmdFis.cfisDw1Dev
//
myCmdFis.cfisDw3SecCnt
myCmdFis.cfisDw3SecCnt
(sata_input_filePageSize*sata_input_prd_dataBuffLen*sata_input_prdLength)/512;
myCmdFis.cfisDw3Ctrl
// The below require to be initialized at least once and can be ignored especially if
//
not using 48-Bit Addressing. If use 48-Bit Addressing, then require constant
//
maintenance prior to invoking a command.
SPRUGX9 – 15 April 2011
Submit Documentation Feedback
Preliminary
//
Write=1/0=>Write/Read;
//
Write=1/0=>Write/Read;
// Need to update this when using DMA for
= CMDFIS_BYTE1_C_IS_CMD_UPDATE;
= CMDFIS_BYTE1_C_IS_CTRL_UPDATE; // Bit7 of Byte1 is
= ATA_CMD_WRITE_DMA; // Uses 28-Bit Addressing.
= ATA_CMD_WRITE_DMA_EXT; // Uses 48-Bit Addressing.
= ATA_CMD_WRITE_SECTOR; // PIO Write Command: Uses
= ATA_CMD_READ_DMA; // Uses 28-Bit Addressing.
= ATA_CMD_READ_DMA_EXT; // Uses 48-Bit Addressing.
= ATA_CMD_IDENTIFY_DEVICE; // PIO Read Command:
= ATA_CMD_READ_SECTOR; // PIO Read Command: Uses
= 0x00;
= (Uint8) Dev28bitLbaAddress;
= (Uint8)(Dev28bitLbaAddress>>8);
= ( DEVICE_REG_USE_LBA_ADDRESSING |
(Uint8)(Dev28bitLbaAddress>>24)
);
= (sata_input_prdLength*sata_input_prd_dataBuffLen)/512;
=
= 0x00;
© 2011, Texas Instruments Incorporated
Use Cases
// Need to update
// Bit7 of Byte1 is set
Serial ATA (SATA) Controller
1585

Advertisement

Table of Contents
loading

Table of Contents