comparison chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_async.c @ 77:4bdffcf1467a

l1_dyn_dwl_async.c: perfect match to original TCS211 object
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Tue, 29 Mar 2016 06:21:36 +0000
parents a05803fbe089
children
comparison
equal deleted inserted replaced
76:a05803fbe089 77:4bdffcf1467a
638 } 638 }
639 #endif // (TRACE_TYPE == 1) || (TRACE_TYPE == 4) 639 #endif // (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
640 640
641 // Check if there is any pending primitive waiting to be de-queued 641 // Check if there is any pending primitive waiting to be de-queued
642 { 642 {
643 #if 0 /* LoCosto code */
643 UWORD32 remaining_primitive_flag=0; 644 UWORD32 remaining_primitive_flag=0;
644 UWORD32 process_continue_flag=1; 645 UWORD32 process_continue_flag=1;
645 UWORD32 delay_primitive_processed_flag=0; 646 UWORD32 delay_primitive_processed_flag=0;
646 647
647 remaining_primitive_flag = (l1_check_Fifo_Primitive()>0); 648 remaining_primitive_flag = (l1_check_Fifo_Primitive()>0);
655 delay_primitive_processed_flag=1; 656 delay_primitive_processed_flag=1;
656 // If yes set the restart command at apihisr level 657 // If yes set the restart command at apihisr level
657 l1a_apihisr_com.dyn_dwnld.command.restart = TRUE; 658 l1a_apihisr_com.dyn_dwnld.command.restart = TRUE;
658 659
659 /********** WORKAROUND *************/ 660 /********** WORKAROUND *************/
660 #if (OP_RIV_AUDIO == 1) 661 #if (OP_RIV_AUDIO == 1)
661 { 662 {
662 // WARNING: temporary until os_activate_hisr() is declared in L3 functions 663 // WARNING: temporary until os_activate_hisr() is declared in L3 functions
663 extern NU_HISR apiHISR; 664 extern NU_HISR apiHISR;
664 NU_Activate_HISR(&apiHISR); 665 NU_Activate_HISR(&apiHISR);
665 } 666 }
666 #else 667 #else
667 os_activate_hisr(API_HISR); 668 os_activate_hisr(API_HISR);
668 #endif // OP_RIV_AUDIO == 1 669 #endif // OP_RIV_AUDIO == 1
669 /********** WORKAROUND *************/ 670 /********** WORKAROUND *************/
670 *state = WAIT_RESULT; 671 *state = WAIT_RESULT;
671 } 672 }
672 remaining_primitive_flag = (l1_check_Fifo_Primitive()>0); 673 remaining_primitive_flag = (l1_check_Fifo_Primitive()>0);
673 } 674 }
674 675
675 // else stop the DSP background task as no other patch must be downloaded 676 // else stop the DSP background task as no other patch must be downloaded
676 if(delay_primitive_processed_flag == 0) 677 if(delay_primitive_processed_flag == 0)
677 { 678 {
678 #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4)) 679 #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
679 // Enable trace DSP upon Dynamic Download deactivation 680 // Enable trace DSP upon Dynamic Download deactivation
680 l1_enable_DSP_trace(); 681 l1_enable_DSP_trace();
681 //Trace_dsp_dump(); 682 //Trace_dsp_dump();
682 #endif // omaps00090550 #14-D removal 683 #endif // omaps00090550 #14-D removal
683 l1a_l1s_com.dyn_dwnld_task.stop=TRUE; 684 l1a_l1s_com.dyn_dwnld_task.stop=TRUE;
684 *state = WAIT_STOP; 685 *state = WAIT_STOP;
685 } 686 }
687
688 #else /* TCS211 reconstruction from disassembly */
689
690 if (l1_check_Fifo_Primitive() != 0)
691 {
692 l1_pop_Primitive(&(delay_primitive));
693 if (l1_dynamic_download_manager(delay_primitive, TRUE) == TRUE)
694 {
695 // If yes set the restart command at apihisr level
696 l1a_apihisr_com.dyn_dwnld.command.restart = TRUE;
697
698 /********** WORKAROUND *************/
699 #if (OP_RIV_AUDIO == 1)
700 {
701 // WARNING: temporary until os_activate_hisr() is declared in L3 functions
702 extern NU_HISR apiHISR;
703 NU_Activate_HISR(&apiHISR);
704 }
705 #else
706 os_activate_hisr(API_HISR);
707 #endif // OP_RIV_AUDIO == 1
708 /********** WORKAROUND *************/
709 *state = WAIT_RESULT;
710 }
711 }
712 else
713 {
714 #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
715 // Enable trace DSP upon Dynamic Download deactivation
716 l1_enable_DSP_trace();
717 //Trace_dsp_dump();
718 #endif // omaps00090550 #14-D removal
719 l1a_l1s_com.dyn_dwnld_task.stop=TRUE;
720 *state = WAIT_STOP;
721 }
722 #endif
686 } 723 }
687 } 724 }
688 break; 725 break;
689 } // switch(SignalCode) 726 } // switch(SignalCode)
690 return; 727 return;