现在的位置: 首页 > 综合 > 正文

s3c_mfc_irq分析

2018年01月23日 ⁄ 综合 ⁄ 共 1105字 ⁄ 字号 评论关闭
源码比较简单
   1:   
   2:  static irqreturn_t s3c_mfc_irq(int irq, void *dev_id)
   3:  {
   4:      unsigned int    intReason;
   5:      s3c_mfc_inst_context_t      *pMfcInst;
   6:   
   7:   
   8:      pMfcInst = (s3c_mfc_inst_context_t *)dev_id;
   9:   
  10:      intReason   = s3c_mfc_intr_reason();
  11:   
  12:      /* if PIC_RUN, buffer full and buffer empty interrupt */
  13:      if (intReason & S3C_MFC_INTR_ENABLE_RESET) {
  14:          s3c_mfc_intr_type = intReason;
  15:          wake_up_interruptible(&s3c_mfc_wait_queue);
  16:      }
  17:   
  18:      s3c_mfc_clear_intr();
  19:   
  20:      return IRQ_HANDLED;
  21:  }

s3c_mfc_intr_reason函数检查INT_REASON寄存器(the interrupt reason register) 的值

wake_up_interruptible为wait.h(include/linux)下,故和系统有关,需要修改。

抱歉!评论已关闭.