Skip to contentSkip to conversation

saa7134 irq status bits

DISCUSSION Gerd Hoffmann 1 participant 1 message Apr 2, 2013 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,

Forwarding to linux-media mailing list, hoping that someone there can help out. I havn't worked in the code for years now, can't remember what the AR irq bit is and can't find my copy of the saa7134 data sheet too ...

cheers,
Gerd

-------- Original Message --------
Subject: hello kraxel
Date: Tue, 02 Apr 2013 15:48:42 +0800
From: zhaokai <[email protected]>
To: [email protected]

Dear Kraxel:

My name is zhaokai, I am a soft developer working in beijing. This is my first mail to The Kernel Developer, I am very excited. Now I have a question about your code for saa7134 driver in linux kernel 2.6.21.
We use Loongson CPU,I compile kernel and run the image,when I run my test app for saa7134 camera
this message will print:
saa7130[0]/irq: looping -- clearing all enable bits

I study the saa7134 driver code,find the message come from the follow code:

    if (10 == loop) {
        print_irqstatus(dev,loop,report,status);
        if (report & SAA7134_IRQ_REPORT_PE) {
            /* disable all parity error */
            printk(KERN_WARNING "%s/irq: looping -- "
                   "clearing PE (parity error!) enable bit\n",dev->name);
            saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE);
        } else if (report & SAA7134_IRQ_REPORT_GPIO16) {
            /* disable gpio16 IRQ */
            printk(KERN_WARNING "%s/irq: looping -- "
                   "clearing GPIO16 enable bit\n",dev->name);
            saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16);
        } else if (report & SAA7134_IRQ_REPORT_GPIO18) {
            /* disable gpio18 IRQs */
            printk(KERN_WARNING "%s/irq: looping -- "
                   "clearing GPIO18 enable bit\n",dev->name);
            saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18);
        } else {
            /* disable all irqs */
            printk(KERN_WARNING "%s/irq: looping -- "
                   "clearing all enable bits\n",dev->name);
            saa_writel(SAA7134_IRQ1,0);
            saa_writel(SAA7134_IRQ2,0);
        }
    }

this is in the interrupt handle function,I add some print and find the value of SAA7134_IRQ_REPORT register is 0x11 or 0x10, normally it would be 0x1 or 0x0,
0x1x means SAA7134_IRQ_REPORT_AR, So what is the meaning of SAA7134_IRQ_REPORT_AR ?

Best regards,
ZhaoKai