linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Cc: zhaokai@loongson.cn
Subject: saa7134 irq status bits
Date: Tue, 02 Apr 2013 17:47:44 +0200	[thread overview]
Message-ID: <515AFDA0.8090802@redhat.com> (raw)
In-Reply-To: <515A8D5A.4060605@loongson.cn>

  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 <zhaokai@loongson.cn>
To: kraxel@bytesex.org

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





           reply	other threads:[~2013-04-02 15:47 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <515A8D5A.4060605@loongson.cn>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=515AFDA0.8090802@redhat.com \
    --to=kraxel@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=zhaokai@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).