public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Kristoffer Ericson <kristoffer.ericson@gmail.com>
To: linux-sh@vger.kernel.org
Subject: IRQ3 seems to work now for SH7709
Date: Thu, 21 Feb 2008 20:29:12 +0000	[thread overview]
Message-ID: <20080221212912.c7ebeb94.Kristoffer.ericson@gmail.com> (raw)

Greetings,

IRQ0->IRQ5 needs to be silenced by first setting priority 0 and then mask out the affected bit in IRR0. This was done previously in 2.6.17 in the ipr handler. This is also according to SH7709 manual.

This can be found inside 2.6.17 with linuxsh patches applied :

static void mask_and_ack_ipr(unsigned int irq)

  89 {
  90         disable_ipr_irq(irq);
  91 
  92 #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
  93     defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705)
  94         /* This is needed when we use edge triggered setting */
  95         /* XXX: Is it really needed? */
  96         if (IRQ0_IRQ <= irq && irq <= IRQ5_IRQ) {
  97                 /* Clear external interrupt request */
  98                 int a = ctrl_inb(INTC_IRR0);
  99                 a &= ~(1 << (irq - IRQ0_IRQ));
 100                 ctrl_outb(a, INTC_IRR0);
 101         }
 102 #endif
 103 }

(you can access entire file at http://www.jlime.org/gitweb?p=jlime-stable.git;a=blob;f=arch/sh/kernel/cpu/irq/ipr.c;hå5150ed085619d5962e039e1ebb2a4fdc2e9b15;hb?3554525f5c300a6e41d0aae01673c45e9098c3)

I added minor code to intc_disable() just to test it

#ifdef CONFIG_CPU_SUBTYPE_SH7709
	if (irq = 35) {                <--- my touchscreen IRQ
		int a = inb(IRR0);
		a &= ~(1 << 3);
		outb(a, IRR0);
	}
#endif

And the result was that the interrupt no longer keeps feeding data instead only when touchscreen is actually touched, so seems valid.

Best wishes
Kristoffer

             reply	other threads:[~2008-02-21 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 20:29 Kristoffer Ericson [this message]
2008-02-22  8:30 ` IRQ3 seems to work now for SH7709 Magnus Damm
2008-02-22  8:40 ` Magnus Damm
2008-02-22 11:47 ` Kristoffer Ericson

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=20080221212912.c7ebeb94.Kristoffer.ericson@gmail.com \
    --to=kristoffer.ericson@gmail.com \
    --cc=linux-sh@vger.kernel.org \
    /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