@@ -604,11 +604,6 @@ static void fifoInternalSendInterrupt() {
604604 }
605605}
606606
607- static volatile int __timeout = 0 ;
608-
609- static void __timeoutvbl () {
610- __timeout ++ ;
611- }
612607bool fifoInit () {
613608
614609
@@ -639,34 +634,6 @@ bool fifoInit() {
639634 }
640635 FIFO_BUFFER_SETCONTROL (FIFO_BUFFER_ENTRIES - 1 , FIFO_BUFFER_TERMINATE , FIFO_BUFFERCONTROL_UNUSED , 0 );
641636
642- #define __SYNC_START 0
643- #define __SYNC_END 14
644- #define __TIMEOUT 120
645-
646- int their_value = 0 ,my_value = __SYNC_START ,count = 0 ;
647-
648- irqSet (IRQ_VBLANK ,__timeoutvbl );
649- irqEnable (IRQ_IPC_SYNC |IRQ_VBLANK );
650-
651- do {
652- their_value = IPC_GetSync ();
653- if (their_value == __SYNC_END && count > 2 ) break ;
654- if (count > 3 ) break ;
655- if ( ((my_value + 1 )& 7 ) == their_value ) count ++ ;
656- my_value = (their_value + 1 )& 7 ;
657- IPC_SendSync (my_value );
658- swiIntrWait (1 ,IRQ_IPC_SYNC |IRQ_VBLANK );
659- } while (__timeout < __TIMEOUT );
660-
661- irqDisable (IRQ_IPC_SYNC );
662- irqSet (IRQ_VBLANK ,0 );
663-
664- if (__timeout >= __TIMEOUT ) {
665- IPC_SendSync (0 );
666- return false;
667- }
668-
669- IPC_SendSync (__SYNC_END );
670637 irqSet (IRQ_FIFO_EMPTY ,fifoInternalSendInterrupt );
671638 irqSet (IRQ_FIFO_NOT_EMPTY ,fifoInternalRecvInterrupt );
672639 REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_RECV_IRQ ;
0 commit comments