Lines Matching defs:ctx

321 static E3_Addr teac_main2elan( ELAN3_CTX *ctx, void* main_addr )
323 E3_Addr result= elan3_main2elan(ctx,main_addr);
326 main_addr,result,elan3_addressable(ctx,main_addr,64));
364 result->ctx = NULL;
419 if ((result->ctx = elan3_init( 0, EADDR_ALLOC_MAIN, ALLOC_MAIN_SIZE,
425 elan3_block_inputter (result->ctx, 1);
441 if (elan3_create(result->ctx, &(result->cap))) {
451 (void)elan3_get_devinfo(result->ctx, &info);
452 (void)elan3_get_position(result->ctx, &position);
521 if (elan3_attach(result->ctx, &(result->cap))) {
527 if (elan3_addvp(result->ctx, 0, &(result->cap))) {
533 result->vp = elan3_process(result->ctx);
535 if (! elan3_set_required_mappings (result->ctx)) {
557 elan3_allocElan(result->ctx, E3_EVENT_ALIGN,
585 elan3_allocMain(result->ctx, 0,
596 (long)teac_main2elan(result->ctx,(void*)(result->m_rcv[0])));
606 elan3_allocMain(result->ctx, 8,
617 (long)teac_main2elan(result->ctx,result->mbuff[0]));
621 elan3_allocMain(result->ctx,
629 elan3_allocElan(result->ctx, E3_DMA_ALIGN, sizeof(E3_DMA)))) {
636 elan3_allocElan(result->ctx, E3_EVENT_ALIGN,
647 elan3_allocElan(result->ctx, E3_EVENT_ALIGN,
658 elan3_allocElan(result->ctx, E3_EVENT_ALIGN,
666 elan3_allocMain(result->ctx, 0,
674 elan3_allocMain(result->ctx, 0,
694 elan3_allocMain(result->ctx, 0,
703 if (!(buf= (char*)elan3_allocMain(result->ctx, 8,
716 elan3_initevent_word (result->ctx,
718 elan3_initevent_word (result->ctx,
722 elan3_initevent_word (result->ctx,
728 elan3_initevent_word (result->ctx,
737 elan3_primeevent(result->ctx, result->r_event[j][i], 1);
744 elan3_primeevent(result->ctx, result->sbuf_pull_event[i], 1);
745 elan3_setevent( result->ctx, result->sbuf_pull_event[i] );
749 elan3_block_inputter (result->ctx, 0);
764 elan3_waitevent_word(tcomm->ctx, tcomm->sbuf_pull_event[i],
769 elan3_block_inputter (tcomm->ctx, 1);
771 if (tcomm->e_dma != 0) elan3_freeElan(tcomm->ctx, tcomm->e_dma);
772 if (tcomm->s_event != 0) elan3_freeElan(tcomm->ctx, tcomm->s_event);
775 if (tcomm->r_event[0][0] != 0) elan3_freeElan(tcomm->ctx,
782 elan3_freeElan(tcomm->ctx, tcomm->sbuf_pull_event[0]);
786 elan3_free(tcomm->ctx, tcomm->sendWrappers[i]->buf);
794 elan3_freeElan(tcomm->ctx, tcomm->rbuf_pull_event);
795 if (tcomm->m_snd != NULL) elan3_free(tcomm->ctx,
798 if (tcomm->m_rcv[0] != NULL) elan3_free(tcomm->ctx,
803 elan3_free(tcomm->ctx, (E3_uint32*)tcomm->sbuf_ready[0]);
804 if (tcomm->rbuf_ready != NULL) elan3_free(tcomm->ctx,
807 if (tcomm->mbuff[0] != NULL) elan3_free(tcomm->ctx, tcomm->mbuff[0]);
811 elan3_detach(tcomm->ctx);
812 elan3_fini(tcomm->ctx);
840 if (elan3_pollevent_word(tcomm->ctx, &(tcomm->m_rcv[thisId][i]), 1)) {
856 if (elan3_pollevent_word(tcomm->ctx, tcomm->sbuf_ready[i], 1))
869 if (elan3_pollevent_word(tcomm->ctx, tcomm->sbuf_ready[i],
884 elan3_free( tcomm->ctx, tcomm->sendWrappers[i]->buf );
886 (char*)elan3_allocMain(tcomm->ctx, 8, size))) {
911 if (!(result->buf= (char*)elan3_allocMain(tcomm->ctx, 8, size))) {
932 if (elan3_pollevent_word(tcomm->ctx, tcomm->sbuf_ready[i],
944 elan3_free( tcomm->ctx, tcomm->sendWrappers[i]->buf );
987 msg->mptr = teac_main2elan( tcomm->ctx, start );
989 msg->mptr = teac_main2elan(tcomm->ctx, buf->buf);
990 msg->clr_event = elan3_sdram2elan(tcomm->ctx, tcomm->ctx->sdram,
998 elan3_sdram2elan(tcomm->ctx,tcomm->ctx->sdram,tcomm->s_event);
999 tcomm->dma->dma_source = teac_main2elan(tcomm->ctx, msg);
1000 elan3_primeevent(tcomm->ctx, tcomm->sbuf_pull_event[buf->bufId], num_ids);
1005 elan3_local_cookie(tcomm->ctx, vp, ids[iDest]);
1008 elan3_sdram2elan(tcomm->ctx,tcomm->ctx->sdram,
1012 tcomm->dma->dma_dest = teac_main2elan(tcomm->ctx, msg)
1015 elan3_primeevent(tcomm->ctx, tcomm->s_event, 1);
1017 elan3_putdma_main(tcomm->ctx, tcomm->dma, tcomm->e_dma);
1029 elan3_waitevent_word(tcomm->ctx,
1049 if (elan3_pollevent_word(tcomm->ctx, &(tcomm->m_rcv[id][iEvent]), 1))
1060 (long)teac_main2elan(tcomm->ctx,(void*)(&tcomm->mbuff[id][i])));
1077 elan3_primeevent(tcomm->ctx, tcomm->r_event[id][iBuf],1);
1090 if (!(result->buf= (void*)elan3_allocMain(tcomm->ctx, 8,E_BUFFER_SIZE))) {
1096 if (!(result->buf= (void*)elan3_allocMain(tcomm->ctx, 8,
1111 tcomm->dma->dma_dest = teac_main2elan(tcomm->ctx,result->buf);
1113 elan3_remote_cookie(tcomm->ctx, vp, tcomm->mbuff[id][iBuf].host);
1115 elan3_local_cookie(tcomm->ctx, vp, tcomm->mbuff[id][iBuf].host);
1118 elan3_sdram2elan(tcomm->ctx,tcomm->ctx->sdram,
1122 elan3_primeevent(tcomm->ctx, tcomm->rbuf_pull_event,1);
1124 elan3_getdma_main(tcomm->ctx, tcomm->dma, tcomm->e_dma);
1125 elan3_waitevent_word(tcomm->ctx,
1135 elan3_free(tcomm->ctx, buf->buf);
1192 (void)elan3_get_devinfo(c->ctx, &info);
1193 (void)elan3_get_position(c->ctx, &position);
1211 *elanBaseAddr= (long)teac_main2elan(c->ctx,(void*)c->m_rcv[0]);