Lines Matching refs:ulBase
99 static long SPITransfer8(unsigned long ulBase, unsigned char *ucDout, in SPITransfer8() argument
139 ulReadReg = (ulBase + MCSPI_O_RX0); in SPITransfer8()
140 ulWriteReg = (ulBase + MCSPI_O_TX0); in SPITransfer8()
141 ulStatReg = (ulBase + MCSPI_O_CH0STAT); in SPITransfer8()
148 HWREG( ulBase + MCSPI_O_CH0CONF) |= MCSPI_CH0CONF_FORCE; in SPITransfer8()
194 HWREG( ulBase + MCSPI_O_CH0CONF) &= ~MCSPI_CH0CONF_FORCE; in SPITransfer8()
219 static long SPITransfer16(unsigned long ulBase, unsigned short *usDout, in SPITransfer16() argument
272 ulReadReg = (ulBase + MCSPI_O_RX0); in SPITransfer16()
273 ulWriteReg = (ulBase + MCSPI_O_TX0); in SPITransfer16()
274 ulStatReg = (ulBase + MCSPI_O_CH0STAT); in SPITransfer16()
281 HWREG( ulBase + MCSPI_O_CH0CONF) |= MCSPI_CH0CONF_FORCE; in SPITransfer16()
327 HWREG( ulBase + MCSPI_O_CH0CONF) &= ~MCSPI_CH0CONF_FORCE; in SPITransfer16()
351 static long SPITransfer32(unsigned long ulBase, unsigned long *ulDout, in SPITransfer32() argument
405 ulReadReg = (ulBase + MCSPI_O_RX0); in SPITransfer32()
406 ulWriteReg = (ulBase + MCSPI_O_TX0); in SPITransfer32()
407 ulStatReg = (ulBase + MCSPI_O_CH0STAT); in SPITransfer32()
414 HWREG( ulBase + MCSPI_O_CH0CONF) |= MCSPI_CH0CONF_FORCE; in SPITransfer32()
460 HWREG( ulBase + MCSPI_O_CH0CONF) &= ~MCSPI_CH0CONF_FORCE; in SPITransfer32()
479 SPIIntNumberGet(unsigned long ulBase) in SPIIntNumberGet() argument
493 if(g_ppulSPIIntMap[ulIdx][0] == ulBase) in SPIIntNumberGet()
521 SPIDmaMaskGet(unsigned long ulBase) in SPIDmaMaskGet() argument
535 if(g_ulSPIDmaMaskMap[ulIdx][0] == ulBase) in SPIDmaMaskGet()
563 SPIEnable(unsigned long ulBase) in SPIEnable() argument
568 HWREG(ulBase + MCSPI_O_CH0CTRL) |= MCSPI_CH0CTRL_EN; in SPIEnable()
584 SPIDisable(unsigned long ulBase) in SPIDisable() argument
589 HWREG(ulBase + MCSPI_O_CH0CTRL) &= ~MCSPI_CH0CTRL_EN; in SPIDisable()
612 SPIDmaEnable(unsigned long ulBase, unsigned long ulFlags) in SPIDmaEnable() argument
617 HWREG(ulBase + MCSPI_O_CH0CONF) |= ulFlags; in SPIDmaEnable()
639 SPIDmaDisable(unsigned long ulBase, unsigned long ulFlags) in SPIDmaDisable() argument
644 HWREG(ulBase + MCSPI_O_CH0CONF) &= ~ulFlags; in SPIDmaDisable()
659 SPIReset(unsigned long ulBase) in SPIReset() argument
665 HWREG(ulBase + MCSPI_O_SYSCONFIG) |= MCSPI_SYSCONFIG_SOFTRESET; in SPIReset()
670 while(!(HWREG(ulBase + MCSPI_O_SYSSTATUS)& MCSPI_SYSSTATUS_RESETDONE)) in SPIReset()
743 SPIConfigSetExpClk(unsigned long ulBase,unsigned long ulSPIClk, in SPIConfigSetExpClk() argument
754 ulRegData = HWREG(ulBase + MCSPI_O_MODULCTRL); in SPIConfigSetExpClk()
771 HWREG(ulBase + MCSPI_O_MODULCTRL) = ulRegData; in SPIConfigSetExpClk()
807 HWREG(ulBase + MCSPI_O_CH0CTRL) = ((ulDivider & 0x00000FF0) << 4); in SPIConfigSetExpClk()
819 HWREG(ulBase + MCSPI_O_CH0CONF) = ulRegData; in SPIConfigSetExpClk()
837 SPIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData) in SPIDataGetNonBlocking() argument
844 ulRegVal = HWREG(ulBase + MCSPI_O_CH0STAT); in SPIDataGetNonBlocking()
851 *pulData = HWREG(ulBase + MCSPI_O_RX0); in SPIDataGetNonBlocking()
874 SPIDataGet(unsigned long ulBase, unsigned long *pulData) in SPIDataGet() argument
879 while(!(HWREG(ulBase + MCSPI_O_CH0STAT) & MCSPI_CH0STAT_RXS)) in SPIDataGet()
886 *pulData = HWREG(ulBase + MCSPI_O_RX0); in SPIDataGet()
903 SPIDataPutNonBlocking(unsigned long ulBase, unsigned long ulData) in SPIDataPutNonBlocking() argument
910 ulRegVal = HWREG(ulBase + MCSPI_O_CH0STAT); in SPIDataPutNonBlocking()
918 HWREG(ulBase + MCSPI_O_TX0) = ulData; in SPIDataPutNonBlocking()
939 SPIDataPut(unsigned long ulBase, unsigned long ulData) in SPIDataPut() argument
944 while(!(HWREG(ulBase + MCSPI_O_CH0STAT)&MCSPI_CH0STAT_TXS)) in SPIDataPut()
951 HWREG(ulBase + MCSPI_O_TX0) = ulData; in SPIDataPut()
972 SPIFIFOEnable(unsigned long ulBase, unsigned long ulFlags) in SPIFIFOEnable() argument
977 HWREG(ulBase + MCSPI_O_CH0CONF) |= ulFlags; in SPIFIFOEnable()
998 SPIFIFODisable(unsigned long ulBase, unsigned long ulFlags) in SPIFIFODisable() argument
1003 HWREG(ulBase + MCSPI_O_CH0CONF) &= ~(ulFlags); in SPIFIFODisable()
1020 void SPIFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel, in SPIFIFOLevelSet() argument
1028 ulRegVal = HWREG(ulBase + MCSPI_O_XFERLEVEL); in SPIFIFOLevelSet()
1038 HWREG(ulBase + MCSPI_O_XFERLEVEL) = ulRegVal; in SPIFIFOLevelSet()
1057 SPIFIFOLevelGet(unsigned long ulBase, unsigned long *pulTxLevel, in SPIFIFOLevelGet() argument
1065 ulRegVal = HWREG(ulBase + MCSPI_O_XFERLEVEL); in SPIFIFOLevelGet()
1087 SPIWordCountSet(unsigned long ulBase, unsigned long ulWordCount) in SPIWordCountSet() argument
1094 ulRegVal = HWREG(ulBase + MCSPI_O_XFERLEVEL); in SPIWordCountSet()
1099 HWREG(ulBase + MCSPI_O_XFERLEVEL) = ((ulRegVal & 0x0000FFFF)| in SPIWordCountSet()
1123 SPIIntRegister(unsigned long ulBase, void(*pfnHandler)(void)) in SPIIntRegister() argument
1130 ulInt = SPIIntNumberGet(ulBase); in SPIIntRegister()
1161 SPIIntUnregister(unsigned long ulBase) in SPIIntUnregister() argument
1168 ulInt = SPIIntNumberGet(ulBase); in SPIIntUnregister()
1206 SPIIntEnable(unsigned long ulBase, unsigned long ulIntFlags) in SPIIntEnable() argument
1215 ulDmaMsk = SPIDmaMaskGet(ulBase); in SPIIntEnable()
1224 ulDmaMsk = (SPIDmaMaskGet(ulBase) >> 1); in SPIIntEnable()
1231 HWREG(ulBase + MCSPI_O_IRQENABLE) |= (ulIntFlags & 0x0003000F); in SPIIntEnable()
1253 SPIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) in SPIIntDisable() argument
1262 ulDmaMsk = SPIDmaMaskGet(ulBase); in SPIIntDisable()
1271 ulDmaMsk = (SPIDmaMaskGet(ulBase) >> 1); in SPIIntDisable()
1278 HWREG(ulBase + MCSPI_O_IRQENABLE) &= ~(ulIntFlags & 0x0003000F); in SPIIntDisable()
1298 SPIIntStatus(unsigned long ulBase, tBoolean bMasked) in SPIIntStatus() argument
1307 ulIntFlag = HWREG(ulBase + MCSPI_O_IRQSTATUS) & 0x0003000F; in SPIIntStatus()
1311 ulIntFlag &= HWREG(ulBase + MCSPI_O_IRQENABLE); in SPIIntStatus()
1317 ulDmaMsk = SPIDmaMaskGet(ulBase); in SPIIntStatus()
1371 SPIIntClear(unsigned long ulBase, unsigned long ulIntFlags) in SPIIntClear() argument
1380 ulDmaMsk = SPIDmaMaskGet(ulBase); in SPIIntClear()
1389 ulDmaMsk = (SPIDmaMaskGet(ulBase) >> 1); in SPIIntClear()
1396 HWREG(ulBase + MCSPI_O_IRQSTATUS) = (ulIntFlags & 0x0003000F); in SPIIntClear()
1412 void SPICSEnable(unsigned long ulBase) in SPICSEnable() argument
1417 HWREG( ulBase+MCSPI_O_CH0CONF) |= MCSPI_CH0CONF_FORCE; in SPICSEnable()
1433 void SPICSDisable(unsigned long ulBase) in SPICSDisable() argument
1438 HWREG( ulBase+MCSPI_O_CH0CONF) &= ~MCSPI_CH0CONF_FORCE; in SPICSDisable()
1471 long SPITransfer(unsigned long ulBase, unsigned char *ucDout, in SPITransfer() argument
1481 ulWordLength = (HWREG(ulBase + MCSPI_O_CH0CONF) & MCSPI_CH0CONF_WL_M); in SPITransfer()
1497 lRet = SPITransfer8(ulBase,ucDout,ucDin,ulCount,ulFlags); in SPITransfer()
1505 lRet = SPITransfer16(ulBase,(unsigned short *)ucDout, in SPITransfer()
1513 lRet = SPITransfer32(ulBase,(unsigned long *)ucDout, in SPITransfer()