Logo Search packages:      
Sourcecode: linux version File versions  Download package

static uint32_t GetFifoSize ( dmacHw_HANDLE_t  handle ) [static]

Get maximum FIFO for a DMA channel.

Returns:
Maximum allowable FIFO size

Definition at line 54 of file dmacHw.c.

Referenced by dmacHw_getDmaControllerAttribute().

      {
      uint32_t val = 0;
      dmacHw_CBLK_t *pCblk = dmacHw_HANDLE_TO_CBLK(handle);
      dmacHw_MISC_t *pMiscReg =
          (dmacHw_MISC_t *) dmacHw_REG_MISC_BASE(pCblk->module);

      switch (pCblk->channel) {
      case 0:
            val = (pMiscReg->CompParm2.lo & 0x70000000) >> 28;
            break;
      case 1:
            val = (pMiscReg->CompParm3.hi & 0x70000000) >> 28;
            break;
      case 2:
            val = (pMiscReg->CompParm3.lo & 0x70000000) >> 28;
            break;
      case 3:
            val = (pMiscReg->CompParm4.hi & 0x70000000) >> 28;
            break;
      case 4:
            val = (pMiscReg->CompParm4.lo & 0x70000000) >> 28;
            break;
      case 5:
            val = (pMiscReg->CompParm5.hi & 0x70000000) >> 28;
            break;
      case 6:
            val = (pMiscReg->CompParm5.lo & 0x70000000) >> 28;
            break;
      case 7:
            val = (pMiscReg->CompParm6.hi & 0x70000000) >> 28;
            break;
      }

      if (val <= 0x4) {
            return 8 << val;
      } else {
            dmacHw_ASSERT(0);
      }
      return 0;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index