From: Murray Jensen <Murray.Jensen@cmst.csiro.au>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Re: FEC question about setting SIEL register
Date: Tue, 08 Aug 2000 18:33:41 +1000 [thread overview]
Message-ID: <23468.965723621@msa.cmst.csiro.au> (raw)
In-Reply-To: Message from greyham@research.canon.com.au (Graham Stoney) of "Tue, 08 Aug 2000 15:51:21 +1000." <20000808055121.7716D220@elph.research.canon.com.au>
On Tue, 8 Aug 2000 15:51:21 +1000 (EST), greyham@research.canon.com.au (Graham Stoney) writes:
>Setting the SIEL is trivial enough,
Yes, but this might save you 5 minutes, if you choose to do it in
the kernel :-)
--- arch/ppc/kernel/ppc8xx_pic.c 2000/04/25 11:08:12 1.1.1.4
+++ arch/ppc/kernel/ppc8xx_pic.c 2000/08/08 08:29:59
@@ -156,3 +156,20 @@
panic("request_irq");
#endif
}
+
+void
+m8xx_set_irq_sense(unsigned int irq_nr, int isedge)
+{
+ volatile uint *psiel = &((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel;
+ unsigned int mask;
+
+ if (irq_nr >= NR_SIU_INTS || (irq_nr & 1) != 0)
+ panic("m8xx_set_irq_sense got bad irq number (%d)", irq_nr);
+
+ mask = 1 << (31 - irq_nr);
+
+ if (isedge != 0)
+ *psiel |= mask;
+ else
+ *psiel &= ~mask;
+}
--- arch/ppc/kernel/ppc8xx_pic.h 1999/12/20 06:33:23 1.1.1.2
+++ arch/ppc/kernel/ppc8xx_pic.h 2000/01/24 06:49:15 1.3
@@ -18,4 +18,6 @@
void mbx_i8259_action(int cpl, void *dev_id, struct pt_regs *regs);
#endif
+void m8xx_set_irq_sense(unsigned int irq_nr, int isedge);
+
#endif /* _PPC_KERNEL_PPC8xx_H */
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-08-08 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-08 5:51 FEC question about setting SIEL register Graham Stoney
2000-08-08 8:33 ` Murray Jensen [this message]
2000-08-08 20:11 ` Dan Malek
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=23468.965723621@msa.cmst.csiro.au \
--to=murray.jensen@cmst.csiro.au \
--cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).