34 Uint32
pru_load(Uint8 pruNum, Uint32 * pruCode, Uint32 codeSizeInWords,
41 pruIram = (Uint32 *) ((Uint32 )pru_arm_iomap->
pru_io_addr + 0x8000);
43 pruIram = (Uint32 *) ((Uint32 )pru_arm_iomap->
pru_io_addr + 0xc000);
51 for (i = 0; i < codeSizeInWords; i++) {
52 pruIram[i] = pruCode[i];
71 CSL_FINST(hPru->CONTROL, PRUCORE_CONTROL_COUNTENABLE, ENABLE);
72 CSL_FINST(hPru->CONTROL, PRUCORE_CONTROL_ENABLE, ENABLE);
91 while (
CSL_FEXT(hPru->CONTROL, PRUCORE_CONTROL_RUNSTATE) ==
107 unsigned int delay_cnt;
111 CSL_FINST(hPru->CONTROL, PRUCORE_CONTROL_COUNTENABLE, DISABLE);
112 for (delay_cnt = 0x10000; delay_cnt > 0; delay_cnt--)
113 CSL_FINST(hPru->CONTROL, PRUCORE_CONTROL_ENABLE, DISABLE);
115 for (delay_cnt = 0x10000; delay_cnt > 0; delay_cnt--)
121 CSL_FINST(hPru->CONTROL, PRUCORE_CONTROL_COUNTENABLE, DISABLE);
123 for (delay_cnt = 0x10000; delay_cnt > 0; delay_cnt--)
124 CSL_FINST(hPru->CONTROL, PRUCORE_CONTROL_ENABLE, DISABLE);
126 for (delay_cnt = 0x10000; delay_cnt > 0; delay_cnt--)
138 pru_psc_enable(pru_arm_iomap);
161 while (
CSL_FEXT(PSC->PTSTAT, PSC_PTSTAT_GOSTAT0) ==
174 while (
CSL_FEXT(PSC->PTSTAT, PSC_PTSTAT_GOSTAT0) ==
187 while (
CSL_FEXT(PSC->PTSTAT, PSC_PTSTAT_GOSTAT0) ==
200 while (
CSL_FEXT(PSC->PTSTAT, PSC_PTSTAT_GOSTAT0) ==
226 Uint8 * pu8datatowrite,
228 Uint8 *pu8addresstowrite;
230 u32offset = (
unsigned int)pru_arm_iomap->
pru_io_addr + u32offset;
231 pu8addresstowrite = (Uint8 *) (u32offset);
233 for (u16loop = 0; u16loop < u16bytestowrite; u16loop++)
234 *pu8addresstowrite++ = *pu8datatowrite++;
252 Uint8 * pu8datatoread,
255 Uint8 *pu8addresstoread;
257 u32offset = (
unsigned int)pru_arm_iomap->
pru_io_addr + u32offset;
258 pu8addresstoread = (Uint8 *) (u32offset);
260 for (u16loop = 0; u16loop < u16bytestoread; u16loop++)
261 *pu8datatoread++ = *pu8addresstoread++;
279 unsigned int *pu32datatowrite,
280 short u16wordstowrite)
283 unsigned int *pu32addresstowrite;
286 pu32addresstowrite = (
unsigned int *)(u32offset);
288 for (u16loop = 0; u16loop < u16wordstowrite; u16loop++)
289 *pu32addresstowrite++ = *pu32datatowrite++;
307 unsigned int *pu32datatoread,
308 short u16wordstoread)
310 unsigned int *pu32addresstoread;
313 pu32addresstoread = (
unsigned int *)(u32offset);
315 for (u16loop = 0; u16loop < u16wordstoread; u16loop++)
316 *pu32datatoread++ = *pu32addresstoread++;
#define CSL_FEXT(reg, PER_REG_FIELD)
#define CSL_PRUCORE_CONTROL_RESETVAL
#define CSL_PSC_MDSTAT_STATE_SYNCRST
short pru_ram_read_data(Uint32 u32offset, Uint8 *pu8datatoread, Uint16 u16bytestoread, arm_pru_iomap *pru_arm_iomap)
pru_ram_read_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138. ...
#define CSL_PSC_PTSTAT_GOSTAT0_IN_TRANSITION
Uint32 pru_run(Uint8 pruNum, arm_pru_iomap *pru_arm_iomap)
Uint32 pru_enable(Uint8 pruNum, arm_pru_iomap *pru_arm_iomap)
#define CSL_PRUCORE_0
Peripheral Instance of PRU CORE instances.
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...
Uint32 pru_load(Uint8 pruNum, Uint32 *pruCode, Uint32 codeSizeInWords, arm_pru_iomap *pru_arm_iomap)
volatile CSL_PscRegs * CSL_PscRegsOvly
Uint32 pru_disable(arm_pru_iomap *pru_arm_iomap)
#define CSL_FINST(reg, PER_REG_FIELD, TOKEN)
Uint32 pru_waitForHalt(Uint8 pruNum, Int32 timeout, arm_pru_iomap *pru_arm_iomap)
#define CSL_PRUCORE_CONTROL_RUNSTATE_RUN
short pru_ram_write_data(Uint32 u32offset, Uint8 *pu8datatowrite, Uint16 u16bytestowrite, arm_pru_iomap *pru_arm_iomap)
pru_ram_write_data() Download the data into data RAM of PRU0 or PRU1 of OMAP L138.
volatile CSL_PrucoreRegs * CSL_PrucoreRegsOvly
#define CSL_PSC_MDSTAT_STATE_ENABLE
short pru_ram_write_data_4byte(unsigned int u32offset, unsigned int *pu32datatowrite, short u16wordstowrite)
pru_ram_write_data_4byte() Download the data into data RAM of PRU0 or PRU1 of OMAP L138...