s3c_mfc_irq分析

来源:互联网 发布:mysql in share mode 编辑:程序博客网 时间:2024/05/16 19:04
源码比较简单
   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:  }
.csharpcode, .csharpcode pre{font-size: small;color: black;font-family: consolas, "Courier New", courier, monospace;background-color: #ffffff;/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {background-color: #f4f4f4;width: 100%;margin: 0em;}.csharpcode .lnum { color: #606060; }

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

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

原创粉丝点击