• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "fw_pvt.h"
2 #include "viddec_fw_parser_ipclib_config.h"
3 #include "viddec_fw_debug.h"
4 
5 extern uint32_t timer;
6 
enable_intr(void)7 void enable_intr(void)
8 {
9     TRAPS_ENABLE;
10     TRAPS_INT_ENABLE;
11     //reg_write(INT_REG, 0);
12 }
13 
14 /*------------------------------------------------------------------------------
15  * Function:  mfd_trap_handler
16  * This is the FW's ISR, Currently we don't support any INT as we are running parsers only on GV which
17  * are pure SW modules.
18  *------------------------------------------------------------------------------
19  */
mfd_trap_handler()20 void mfd_trap_handler()
21 {
22     uint32_t reg=0, temp=0;
23     temp = reg_read(INT_STATUS);
24     //DEBUG_WRITE(0xff, temp, timer, 0, 0, 0);
25     if(temp & INT_WDOG_ENABLE)
26     {
27         timer++;
28         set_wdog(VIDDEC_WATCHDOG_COUNTER_MAX);
29         reg = reg_read(INT_STATUS);
30     }
31     if(temp & 0x4)
32     {
33 
34         temp = temp & (~0x4);
35         reg_write(INT_REG, temp);
36         //val = reg_read(DMA_CONTROL_STATUS);
37         //val |=DMA_CTRL_STATUS_DONE;
38         //reg_write(DMA_CONTROL_STATUS, val);
39         //reg = reg_read(INT_STATUS);
40     }
41     if(temp & 0x2)
42     {
43 
44         temp = temp & (~0x2);
45         reg_write(INT_REG, temp);
46     }
47 
48     if(temp & 0x1)
49     {
50         temp = temp & (~0x1);
51         reg_write(INT_REG, temp);
52     }
53     //DEBUG_WRITE(0xff, timer, temp, reg, 0, val);
54     __asm__("nop");
55 
56 }
57