32 static unsigned char gUartStatuTable[8];
34 static int suart_set_pru_id (
unsigned int pru_no);
35 static void pru_set_rx_tx_mode(Uint32 pru_mode, Uint32 pruNum);
36 static void pru_set_delay_count (Uint32 pru_freq);
38 #if (PRU_ACTIVE == BOTH_PRU)
43 unsigned int * pu32SrCtlAddr = (
unsigned int *) ((
unsigned int)
47 unsigned char * pu32_pru_ram_base = (
unsigned char *) arm_iomap_pru->
pru_io_addr;
55 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
56 #if ((PRU_SUART1_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
64 pru_suart_regs->Reserved1 = 0;
74 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
75 #if ((PRU_SUART2_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
83 pru_suart_regs->Reserved1 = 0;
93 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
94 #if ((PRU_SUART3_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
102 pru_suart_regs->Reserved1 = 0;
112 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
113 #if ((PRU_SUART4_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
121 pru_suart_regs->Reserved1 = 0;
131 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
132 #if ((PRU_SUART5_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
140 pru_suart_regs->Reserved1 = 0;
150 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
151 #if ((PRU_SUART6_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
159 pru_suart_regs->Reserved1 = 0;
169 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
170 #if ((PRU_SUART7_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
178 pru_suart_regs->Reserved1 = 0;
188 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
189 #if ((PRU_SUART8_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
197 pru_suart_regs->Reserved1 = 0;
206 pu32_pru_ram_base = (
unsigned char *) ((
unsigned int)
214 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
215 #if ((PRU_SUART1_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
221 pru_suart_regs->Reserved1 = 1;
233 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
234 #if ((PRU_SUART2_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
240 pru_suart_regs->Reserved1 = 1;
252 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
253 #if ((PRU_SUART3_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
259 pru_suart_regs->Reserved1 = 1;
271 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
272 #if ((PRU_SUART4_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
278 pru_suart_regs->Reserved1 = 1;
290 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
291 #if ((PRU_SUART5_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
297 pru_suart_regs->Reserved1 = 1;
309 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
310 #if ((PRU_SUART6_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
316 pru_suart_regs->Reserved1 = 1;
328 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
329 #if ((PRU_SUART7_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
335 pru_suart_regs->Reserved1 = 1;
347 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
348 #if ((PRU_SUART8_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
354 pru_suart_regs->Reserved1 = 1;
365 unsigned int * pu32SrCtlAddr = (
unsigned int *) ((
unsigned int)
369 unsigned char * pu32_pru_ram_base = (
unsigned char *) arm_iomap_pru->
pru_io_addr;
377 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
378 #if ((PRU_SUART1_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
384 pru_suart_regs->Reserved1 = 1;
395 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
396 #if ((PRU_SUART1_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
404 pru_suart_regs->Reserved1 = 0;
416 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
417 #if ((PRU_SUART2_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
423 pru_suart_regs->Reserved1 = 1;
434 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
435 #if ((PRU_SUART2_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
443 pru_suart_regs->Reserved1 = 0;
454 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
455 #if ((PRU_SUART3_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
461 pru_suart_regs->Reserved1 = 1;
472 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
473 #if ((PRU_SUART3_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
481 pru_suart_regs->Reserved1 = 0;
492 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
493 #if ((PRU_SUART4_CONFIG_DUPLEX & PRU_SUART_HALF_TX_DISABLED) == PRU_SUART_HALF_TX_DISABLED)
499 pru_suart_regs->Reserved1 = 1;
510 pru_suart_regs->CH_Config2_TXRXStatus.bits_per_char = 8;
511 #if ((PRU_SUART4_CONFIG_DUPLEX & PRU_SUART_HALF_RX_DISABLED) == PRU_SUART_HALF_RX_DISABLED)
519 pru_suart_regs->Reserved1 = 0;
531 unsigned int rxBaudValue,
532 unsigned int oversampling,
533 unsigned char *pru_suart_emu_code,
536 unsigned int omapl_addr;
537 unsigned int u32loop;
567 #if (!(PRU1_MODE == PRU_MODE_INVALID))
571 omapl_addr = (
unsigned int) arm_iomap_pru->
pru_io_addr;
573 for (u32loop = 0; u32loop < 512; u32loop++)
575 *(
unsigned int *)(omapl_addr | u32loop) = 0x0;
576 #if (!(PRU1_MODE == PRU_MODE_INVALID))
577 *(
unsigned int *)(omapl_addr | u32loop | 0x2000) = 0x0;
582 (fw_size /
sizeof(
unsigned int)), arm_iomap_pru);
583 #if (!(PRU1_MODE == PRU_MODE_INVALID))
585 (fw_size /
sizeof(
unsigned int)), arm_iomap_pru);
596 #if (!(PRU1_MODE == PRU_MODE_INVALID))
601 #if (!(PRU1_MODE == PRU_MODE_INVALID))
608 #if (!(PRU1_MODE == PRU_MODE_INVALID))
613 for (idx = 0; idx < 8; idx++) {
620 static void pru_set_rx_tx_mode(Uint32 pru_mode, Uint32 pruNum)
623 unsigned int pruOffset;
648 (Uint8 *)&timeout, 2, &pru_arm_iomap);
649 #if (!(PRU1_MODE == PRU_MODE_INVALID))
652 (Uint8 *)&timeout, 2, &pru_arm_iomap);
657 static void pru_set_delay_count (Uint32 pru_freq)
661 if (pru_freq == 228 )
664 }
else if (pru_freq == 186)
675 (Uint8 *)&u32delay_cnt, 1, &pru_arm_iomap);
676 #if (!(PRU1_MODE == PRU_MODE_INVALID))
679 (Uint8 *)&u32delay_cnt, 1, &pru_arm_iomap);
693 unsigned int u32value = 0;
700 u32value = 0xFFFFFFFF;
703 if (-1 == s16retval) {
709 u32value = 0xFFFFFFFF;
712 if (-1 == s16retval) {
895 unsigned short txClkDivisor,
896 unsigned short rxClkDivisor)
899 unsigned int pruOffset;
901 unsigned short chNum;
902 unsigned short regval = 0;
910 if ((txClkDivisor > 385) || (txClkDivisor == 0))
915 if ((rxClkDivisor > 385) || (rxClkDivisor == 0))
955 if (txClkDivisor != 0)
963 regval |= txClkDivisor;
986 if (rxClkDivisor != 0)
994 regval |= txClkDivisor;
1005 (
suart_handle hUart,
unsigned short txDataBits,
unsigned short rxDataBits) {
1006 unsigned int offset;
1007 unsigned int pruOffset;
1009 unsigned short chNum;
1010 unsigned int reg_val;
1012 if (hUart ==
NULL) {
1061 if (txDataBits != 0) {
1069 reg_val |= txDataBits;
1091 if (rxDataBits != 0) {
1100 reg_val |= rxDataBits;
1114 unsigned int offset;
1115 unsigned int pruOffset;
1117 unsigned short chNum;
1118 unsigned short regVal = 0;
1119 if (hUart ==
NULL) {
1288 unsigned int offset;
1289 unsigned int pruOffset;
1290 unsigned short chNum;
1291 unsigned short u16ReadValue = 0;
1293 if (hUart ==
NULL) {
1337 return (u16ReadValue);
1345 unsigned int offset;
1346 unsigned int pruOffset;
1347 unsigned short chNum;
1348 unsigned short u16ReadValue = 0;
1350 if (hUart ==
NULL) {
1395 return (u16ReadValue);
1403 unsigned int offset;
1404 unsigned int pruOffset;
1405 unsigned short chNum;
1406 unsigned short regVal = 0;
1409 if (hUart ==
NULL) {
1532 unsigned int offset = 0;
1533 unsigned int u32ISRValue = 0;
1547 if ((u32ISRValue & 0x1) == 0x1)
1560 if ((u32ISRValue & 0x2) == 0x2)
1578 unsigned int offset = 0;
1579 unsigned int pruOffset;
1581 unsigned short chNum;
1582 unsigned short regVal = 0;
1584 unsigned short pru_num;
1586 if (hUart ==
NULL) {
1665 unsigned int offset = 0;
1666 unsigned int pruOffset;
1668 unsigned short chNum;
1669 unsigned short regVal = 0;
1670 unsigned short pru_num;
1671 if (hUart ==
NULL) {
1755 Uint8 * pDataBuffer,
1757 Uint32 * pu32DataRead)
1760 Uint8 * pu8SrcAddr =
NULL;
1761 Uint32 u32DataRead = 0;
1762 Uint32 u32DataLen = 0;
1763 Uint32 u32CharLen = 0;
1764 unsigned int offset = 0;
1765 unsigned int pruOffset;
1766 unsigned short chNum;
1767 unsigned short u16Status = 0;
1769 if (hUart ==
NULL) {
1851 if (u32DataRead > u32DataLen)
1853 u32DataRead -= u32DataLen;
1854 pu8SrcAddr += u32DataLen;
1861 u32DataRead = u32DataLen;
1868 pu8SrcAddr += u32DataLen;
1873 if (u32DataRead > s32MaxLen)
1875 u32DataRead = s32MaxLen;
1879 pu8SrcAddr = (Uint8 *) ((Uint32) pu8SrcAddr - (Uint32) pru_arm_iomap.
pFifoBufferPhysBase +
1883 for (offset = 0; offset < u32DataRead; offset++)
1885 * pDataBuffer++ = * pu8SrcAddr++;
1887 * pu32DataRead = u32DataRead;
1902 unsigned int offset;
1903 unsigned int pruOffset;
1904 unsigned short chNum;
1905 unsigned short u16Status;
1907 if (hUart ==
NULL) {
1971 unsigned int offset;
1972 unsigned int pruOffset;
1974 unsigned short chNum;
1976 if (hUart ==
NULL) {
2020 unsigned int offset;
2021 unsigned int pruOffset;
2023 unsigned short chNum;
2025 if (hUart ==
NULL) {
2076 unsigned int offset;
2077 unsigned int pruOffset;
2079 unsigned short chNum;
2081 if (hUart ==
NULL) {
2125 unsigned int offset;
2126 unsigned int pruOffset;
2128 unsigned short chNum;
2129 unsigned short regVal;
2130 unsigned short uartNum;
2132 if (hUart ==
NULL) {
2205 unsigned int offset;
2206 unsigned int pruOffset;
2208 unsigned short chNum;
2210 if (hUart ==
NULL) {
2264 unsigned int u32IntcOffset;
2265 unsigned int chNum = 0xFF;
2266 unsigned int regVal = 0;
2267 unsigned int u32RegVal = 0;
2268 unsigned int u32ISRValue = 0;
2269 unsigned int u32AckRegVal = 0;
2270 unsigned int u32StatInxClrRegoffset = 0;
2288 chNum = uartNum * 2 - 2;
2292 if (u32ISRValue & u32RegVal)
2306 if (u32ISRValue & u32RegVal)
2319 chNum = uartNum - 1;
2320 if ((u32ISRValue & 0x03FC) != 0)
2323 u32RegVal = 1 << (uartNum + 1);
2324 if (u32ISRValue & u32RegVal)
2334 if (u32ISRValue & 0x3FC00)
2337 u32RegVal = 1 << (uartNum + 9);
2338 if (u32ISRValue & u32RegVal)
2354 unsigned int offset;
2355 unsigned short txrxFlag = 0;
2356 unsigned short chnNum;
2358 chnNum = uartNum - 1;
2400 unsigned int u32offset;
2401 unsigned int u32value;
2406 if ((uartNum > 0) && (uartNum <= 4)) {
2409 }
else if ((uartNum > 4) && (uartNum <= 8)) {
2438 if (s16retval == -1) {
2446 unsigned int u32offset;
2447 unsigned int u32value;
2448 unsigned int intOffset;
2449 short s16retval = -1;
2455 u32value = 0x80000000;
2458 if (s16retval == -1) {
2468 u32value = intOffset;
2471 if (s16retval == -1) {
2481 if (s16retval == -1) {
2490 u32value = intOffset;
2492 if (s16retval == -1) {
2501 u32value = 0x03020100;
2504 if (-1 == s16retval) {
2512 u32value = 0x07060504;
2515 if (-1 == s16retval) {
2523 u32value = 0x00000908;
2526 if (-1 == s16retval) {
2536 u32value = 0x0000000000;
2539 if (-1 == s16retval) {
2555 u32value = 0x02020100;
2558 if (-1 == s16retval) {
2571 u32value = 0x04040303;
2574 if (-1 == s16retval) {
2587 u32value = 0x06060505;
2590 if (-1 == s16retval) {
2603 u32value = 0x08080707;
2606 if (-1 == s16retval) {
2618 u32value = 0x00010909;
2621 if (-1 == s16retval) {
2638 u32value = 0x03020100;
2641 if (-1 == s16retval) {
2654 u32value = 0x07060504;
2657 if (-1 == s16retval) {
2670 u32value = 0x03020908;
2673 if (-1 == s16retval) {
2686 u32value = 0x07060504;
2689 if (-1 == s16retval) {
2701 u32value = 0x00010908;
2704 if (-1 == s16retval) {
2710 for (intOffset = 0; intOffset < 18; intOffset++)
2713 u32value = 32 + intOffset;
2715 if (s16retval == -1) {
2726 if (s16retval == -1) {
2732 if (s16retval == -1) {
2738 if (s16retval == -1) {
2744 if (s16retval == -1) {
2753 if (s16retval == -1) {
2762 u32value = intOffset;
2764 if (s16retval == -1) {
2773 unsigned int txrxmode,
int s32Flag)
2776 unsigned int u32offset;
2777 unsigned int chnNum;
2778 unsigned int u32value;
2779 short s16retval = 0;
2785 chnNum = uartNum - 1;
2788 chnNum = (uartNum * 2) - 2;
2789 if (2 == txrxmode) {
2792 u32value = 34 + chnNum;
2795 u32value = 34 + chnNum;
2797 u32value = 42 + chnNum;
2799 u32value = 34 + chnNum;
2801 u32value = 42 + chnNum;
2805 if (
TRUE == s32Flag)
2809 if (s16retval == -1) {
2817 if (s16retval == -1) {
2825 unsigned int txrxmode,
unsigned int intrmask)
2827 unsigned int offset;
2828 unsigned int pruOffset;
2829 unsigned int txrxFlag;
2830 unsigned int regval = 0;
2831 unsigned int chnNum;
2833 chnNum = uartNum -1;
2839 if ((uartNum > 0) && (uartNum <= 4)) {
2843 }
else if ((uartNum > 4) && (uartNum <= 8)) {
2853 if (2 == txrxmode) {
2873 regval = 1 << chnNum;
2879 txrxFlag &= ~(regval);
2954 unsigned int txrxmode,
unsigned int intrmask)
2956 unsigned int offset;
2957 unsigned int pruOffset;
2958 unsigned short txrxFlag;
2959 unsigned short regval = 0;
2960 unsigned short chnNum;
2962 chnNum = uartNum -1;
2968 if ((uartNum > 0) && (uartNum <= 4)) {
2972 }
else if ((uartNum > 4) && (uartNum <= 8)) {
2982 if (2 == txrxmode) {
3001 regval = 1 << chnNum;
3006 txrxFlag &= ~(regval);
3076 unsigned int txrxmode,
unsigned int intrmask)
3078 unsigned short chnNum;
3079 unsigned int offset;
3080 unsigned short txrxFlag;
3081 unsigned short regval = 1;
3083 chnNum = uartNum -1;
3089 if ((uartNum > 0) && (uartNum <= 4)) {
3092 }
else if ((uartNum > 4) && (uartNum <= 8)) {
3101 if (2 == txrxmode) {
3118 regval = regval << chnNum;
3122 if (0 == intrmask) {
3127 if (1 == intrmask) {
3128 if (txrxFlag == regval)
3134 static int suart_set_pru_id (
unsigned int pru_no)
3136 unsigned int offset;
3137 unsigned short reg_val = 0;
3143 else if (1 == pru_no)
#define PRU_SUART_CH_CONFIG2_DATALEN_SHIFT
void pru_set_ram_data(arm_pru_iomap *arm_iomap_pru)
#define PRU_SUART_PRU0_IDLE_TIMEOUT_OFFSET
#define CHN_TXRX_IE_MASK_TIMEOUT
#define PRU_SUART8_CONFIG_RX_SER
short pru_softuart_write(suart_handle hUart, unsigned int *ptTxDataBuf, unsigned short dataLen)
#define PRU_SUART_CH_CTRL_MODE_MASK
#define PRU_SUART3_CONFIG_TX_SER
#define PRU_SUART_CH_CONFIG1_OVS_SHIFT
#define SUART_NUM_OF_BYTES_PER_CHANNEL
#define PRU_SUART6_CONFIG_TX_SER
#define MCASP_SRCTL_BASE_ADDR
#define PRU_SUART_CH_CONFIG1_DIVISOR_MASK
#define PRU_INTC_STATCLRINT1
#define PRU_SUART_CH_CONFIG1_DIVISOR_SHIFT
#define CHN_TXRX_STATUS_RDY
#define PRU_INTC_STATIDXCLR
void pru_mcasp_deinit(void)
#define PRU_INTC_HOSTMAP2
short pru_softuart_getRxDataLen(suart_handle hUart)
#define PRU_SUART_PRU1_ISR_OFFSET
#define SUART_GBL_INTR_ERR_MASK
#define PRU_INTC_HSTINTENIDXSET
void pru_set_fifo_timeout(Uint32 timeout)
#define MCASP_RBUF_BASE_ADDR
#define PRU_SUART6_CONFIG_DUPLEX
#define PRU_SUART3_CONFIG_RX_SER
#define PRU_SUART_PRU0_RX_TX_MODE
unsigned int asp_xsrctl_base
short pru_softuart_getTxStatus(suart_handle hUart)
#define PRU_MODE_RX_TX_BOTH
#define PRU_SUART_PRU0_ID_ADDR
#define PRU_INTC_STATCLRINT0
#define SUART_NUM_OF_CHANNELS_PER_SUART
short pru_ram_read_data(Uint32 u32offset, Uint8 *pu8datatoread, Uint16 u16wordstoread, arm_pru_iomap *pru_arm_iomap)
pru_ram_read_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138. ...
#define PRU_SUART4_CONFIG_DUPLEX
unsigned char Oversampling
unsigned int pru_clk_freq
#define PRU_SUART2_CONFIG_DUPLEX
#define PRU_SUART_PRU1_RX_TX_MODE
void * pFifoBufferPhysBase
#define PRU_SUART_CH_CTRL_SREQ_SHIFT
unsigned char rxBitsPerChar
short pru_softuart_read_data(suart_handle hUart, Uint8 *pDataBuffer, Int32 s32MaxLen, Uint32 *pu32DataRead)
short pru_softuart_clrRxFifo(suart_handle hUart)
#define PRU_SUART1_CONFIG_RX_SER
short pru_softuart_clrRxStatus(suart_handle hUart)
int suart_pru_to_host_intr_enable(unsigned short uartNum, unsigned int txrxmode, int s32Flag)
unsigned short rxClkDivisor
#define PRU_SUART7_CONFIG_DUPLEX
#define PRU_SUART6_CONFIG_RX_SER
#define PRU_INTC_CHANMAP10
#define PRU_SUART4_TX_EVT
unsigned char RXSerializer
#define PRU_SUART_PRU1_IDLE_TIMEOUT_OFFSET
short pru_ram_write_data(Uint32 u32offset, Uint8 *pu8datatowrite, Uint16 u16wordstowrite, arm_pru_iomap *pru_arm_iomap)
pru_ram_write_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138.
#define PRU_SUART_CH_BYTESDONECNTR_OFFSET
unsigned short txClkDivisor
#define PRU_SUART_PRU0_DELAY_OFFSET
short pru_softuart_open(suart_handle hSuart)
#define PRU_SUART2_CONFIG_RX_SER
__FAR__ Uint32 pru_disable(arm_pru_iomap *pru_arm_iomap)
short arm_to_pru_intr_init(void)
__FAR__ Uint32 pru_load(Uint8 pruNum, Uint32 *pruCode, Uint32 codeSizeInWords, arm_pru_iomap *pru_arm_iomap)
#define PRU_SUART_PRU1_DELAY_OFFSET
short pru_softuart_stopReceive(suart_handle hUart)
volatile pru_suart_regs * PRU_SUART_RegsOvly
#define PRU_SUART5_CONFIG_DUPLEX
short pru_ram_read_data_4byte(unsigned int u32offset, unsigned int *pu32datatoread, short u16wordstoread)
pru_ram_read_data_4byte() Download the data into data RAM of PRU0 or PRU1 of OMAP L138...
#define MCASP_SRCTL_RX_MODE
#define CHN_TXRX_IE_MASK_CMPLT
#define PRU_SUART0_TX_EVT_BIT
#define CHN_TXRX_STATUS_TIMEOUT
#define PRU_SUART_CH_CONFIG2_OFFSET
#define PRU_INTC_STATIDXSET
#define PRU_INTC_CHANMAP11
short pru_softuart_clrTxStatus(suart_handle hUart)
int suart_intr_setmask(unsigned short uartNum, unsigned int txrxmode, unsigned int intrmask)
#define PRU_SUART4_CONFIG_RX_SER
#define CHN_TXRX_IE_MASK_BI
#define PRU_SUART_PRU1_CH0_OFFSET
__FAR__ Uint32 pru_enable(Uint8 pruNum, arm_pru_iomap *pru_arm_iomap)
#define PRU_INTC_HOSTMAP0
int pru_intr_clr_isrstatus(unsigned short uartNum, unsigned int txrxmode)
#define SUART_INVALID_CLKDIVISOR
#define PRU_SUART_PRU0_IMR_OFFSET
#define PRU_SUART5_CONFIG_RX_SER
unsigned int asp_xbuf_base
#define PRU_SUART_PRU1_IMR_OFFSET
#define PRU_SUART8_CONFIG_DUPLEX
short suart_arm_to_pru_intr(unsigned short uartNum)
short pru_softuart_setdatabits(suart_handle hUart, unsigned short txDataBits, unsigned short rxDataBits)
One line description of the structure.
#define PRU_SUART_CH_CTRL_SREQ
#define PRU_SUART_CH_CTRL_MODE_SHIFT
#define PRU_SUART2_CONFIG_TX_SER
#define PRU_INTC_CHANMAP9
#define PRU_SUART_SERIALIZER_NONE
#define PRU_SUART_CH_TXRXDATA_OFFSET
#define CHN_RX_IE_MASK_OVRN
#define PRU_SUART_PRU0_CH0_OFFSET
unsigned short uartTxChannel
#define PRU_SUART_ERR_PARAMETER_INVALID
#define PRU_SUART1_CONFIG_TX_SER
#define PRU_SUART_CH_CONFIG1_OFFSET
#define MCASP_XBUF_BASE_ADDR
#define MCASP_SRCTL_TX_MODE
#define PRU_INTC_HOSTMAP1
void suart_mcasp_config(unsigned int mcasp_addr, unsigned int txBaudValue, unsigned int rxBaudValue, unsigned int oversampling, arm_pru_iomap *pru_arm_iomap)
short pru_softuart_deinit(void)
int pru_softuart_pending_tx_request(void)
__FAR__ Uint32 pru_run(Uint8 pruNum, arm_pru_iomap *pru_arm_iomap)
#define PRU_SUART_PRU1_ID_ADDR
#define PRU_SUART_UARTx_INVALID
#define PRU_SUART_PRU0_ISR_OFFSET
#define PRU_SUART4_CONFIG_TX_SER
#define PRU_SUART_CH_CTRL_SR_MASK
short pru_softuart_init(unsigned int txBaudValue, unsigned int rxBaudValue, unsigned int oversampling, unsigned char *pru_suart_emu_code, unsigned int fw_size, arm_pru_iomap *arm_iomap_pru)
#define PRU_SUART_CH_CONFIG2_BITPERCHAR_MASK
#define PRU_SUART8_CONFIG_TX_SER
#define PRU_INTC_HOSTINTLVL_MAX
short pru_softuart_setbaud(suart_handle hUart, unsigned short txClkDivisor, unsigned short rxClkDivisor)
short pru_softuart_read(suart_handle hUart, unsigned int *ptDataBuf, unsigned short dataLen)
#define PRU_INTC_HSTINTENIDXCLR
int suart_intr_clrmask(unsigned short uartNum, unsigned int txrxmode, unsigned int intrmask)
unsigned int asp_rsrctl_base
#define PRU_SUART0_TX_EVT
#define PRU_SUART3_CONFIG_DUPLEX
#define PRU_SUART_CH_CONFIG1_OVS_MASK
unsigned short uartRxChannel
#define SUART_UART_IN_USE
#define PRU_INTC_ENIDXSET
#define PRU_SUART_FAILURE
#define SUART_DEFAULT_OVRSMPL
short pru_softuart_setconfig(suart_handle hUart, suart_config *configUart)
#define PRU_SUART7_CONFIG_RX_SER
#define RX_DEFAULT_DATA_DUMP_ADDR
#define CHN_TXRX_STATUS_CMPLT
#define CHN_TXRX_IE_MASK_FE
One line description of the structure.
void suart_mcasp_psc_enable(unsigned int psc1_addr)
#define PRU_SUART_SUCCESS
short pru_ram_write_data_4byte(unsigned int u32offset, unsigned int *pu32datatoread, short u16wordstoread)
pru_ram_write_data_4byte() Download the data into data RAM of PRU0 or PRU1 of OMAP L138...
short pru_softuart_getRxStatus(suart_handle hUart)
#define PRU_SUART5_CONFIG_TX_SER
#define PRU_SUART_CH_CTRL_OFFSET
short pru_softuart_getTxDataLen(suart_handle hUart)
#define PRU_SUART0_RX_EVT_BIT
#define PRU_SUART_CH_CTRL_SR_SHIFT
#define PRU_SUART7_CONFIG_TX_SER
unsigned char txBitsPerChar
int suart_intr_getmask(unsigned short uartNum, unsigned int txrxmode, unsigned int intrmask)
unsigned char TXSerializer
void * pFifoBufferVirtBase
#define PRU_SUART_CH_CTRL_SREQ_MASK
#define PRU_SUART_CH_TXRXSTATUS_OFFSET
#define PRU_SUART1_CONFIG_DUPLEX
#define PRU_INTC_CHANMAP8
#define SUART_INVALID_UART_NUM
#define PRU_INTC_ENIDXCLR
unsigned short uartStatus
short suart_asp_serializer_deactivate(unsigned short u16srNum, arm_pru_iomap *pru_arm_iomap)
short pru_softuart_get_isrstatus(unsigned short uartNum, unsigned short *txrxFlag)
void suart_mcasp_reset(arm_pru_iomap *pru_arm_iomap)
#define PRU_SUART_CH_CONFIG2_BITPERCHAR_SHIFT
#define PRU_SUART_CH_CTRL_RX_MODE
#define PRU_SUART_CH_CONFIG2_DATALEN_MASK
#define SUART_PRU_ID_MASK
#define PRU_INTC_CHANMAP12
short pru_softuart_close(suart_handle hUart)
#define PRU_SUART_ERR_HANDLE_INVALID
#define PRU_SUART_CH_CTRL_TX_MODE
#define PRU_INTC_CHANMAP7
short pru_softuart_getconfig(suart_handle hUart, suart_config *configUart)
unsigned int asp_rbuf_base