Changes between Version 1 and Version 2 of Component/Vci Multi Ahci


Ignore:
Timestamp:
Mar 29, 2015, 12:05:34 PM (12 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Component/Vci Multi Ahci

    v1 v2  
    1616that is handled as a software FIFO. For each channel[k], the ''Command List'' can register up to 32
    1717''read'' or ''write'' commands, that are handled in pseudo-parallelism by the channel controller.
    18 This VCI component has a DMA capability, and use it to access the ''Command List'' and to transfer
     18This VCI component has a DMA capability, and use it to access both the ''Command List'' and to transfer
    1919the data to or from memory.
    2020
    … …  
    2727This hardware component checks for segmentation violation, and can be used as a default target.
    2828
     29== 2) Command List ==
     30
     31For each channel, the VciMultiAhci driver must use two arrays to register commands: The Command Descriptor array (32 entries) define the Command List (software FIFO). Each Command Descriptor occupies 16 bytes, with the following format:
     32
     33{{{
     34typedef struct hba_cmd_desc_s  // size = 16 bytes
     35{
     36    unsigned char       flag[2];        // only one bit used : WRITE when bit 6 of flag[0] is set
     37    unsigned char       prdtl[2];       // Number of buffers (no more than 16535)
     38    unsigned int        prdbc;          // Number of bytes actually transfered
     39    unsigned int        ctba;           // Command Table base address 32 LSB bits
     40    unsigned int        ctbau;          // Command Table base address 32 MSB bits
     41} hba_cmd_desc_t;
     42}}}
     43
     44== 3) Command Table
     45
    2946== 2) Addressable registers ==
    3047
    31 Each channel[k] contains seven 32 bits registers:
     48Each channel[k] contains six 32 bits read/write registers:
    3249
    33  * '''HBA''' (read/write)
    34 Physical address of the source (or destination) buffer in SoC memory.
     50 * '''HBA_PXCLB'''
     5132 LSB bits of the Command List array physical address.
    3552
    36  * '''BLOCK_DEVICE_COUNT''' (read/write)
    37 Number of blocks to be transfered.
     53 * '''HBA_PXCLBU'''
     5432 MSB bits of the Command List array physical address. *
    3855
    39  * '''BLOCK_DEVICE_LBA''' (read/write)
    40 Logical Base Address (index of the first block in the block device)
     56 * '''HBA_PXIS'''
     57Channel status, used for error reporting.
     58
     59 * '''HBA_PXIE'''
     60Intcommanderrupt enable.
     61
     62 * '''HBA_PXCMD'''
     63Boolean : running when non zero
     64
     65 * '''HBA_PXCI'''
     66Bit-vector, one bit per command in the Command List. These bits are handled as 32 set/reset flip-flops: set by software when a command ha been posted in Command List / reset by hardware when the command is completed.
    4167
    4268 * '''BLOCK_DEVICE_OP''' (write only)