All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Müller (ELSOFT AG)" <d.mueller@elsoft.ch>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Additional IRQ handlers in ppc4xx_init_IRQ()
Date: Tue, 23 Oct 2001 09:10:29 +0200	[thread overview]
Message-ID: <3BD517E5.5090204@elsoft.ch> (raw)


Hello

I have a question regarding the registration of additional IRQ handlers
for a PPC405GP based board. The board uses the PIC inside the PIIX4 too,
so i have set NR_BOARD_IRQ to 16 in my board specific include file and
extended ppc4xx_init_IRQ as follows:

static void __init
ppc4xx_init_IRQ(void)
{
	int i;

	ppc4xx_pic_init();

#if !defined(CONFIG_PIP405) && !defined(CONFIG_MIP405)
	for (i = 0; i < NR_IRQS; i++)
		irq_desc[i].handler = ppc4xx_pic;
#else
/* MPL PIP405 / MIP405 uses PIIX4 PIC too */
	for (i = 0; i < NR_AIC_IRQS; i++)
		irq_desc[i].handler = ppc4xx_pic;
	for (i = NR_AIC_IRQS; i < NR_IRQS; i++)
		irq_desc[i].handler = &i8259_pic;

	i8259_pic_irq_offset = NR_AIC_IRQS;
	i8259_init();
	request_irq(ISA_BRIDGE_INT, pip405_mip405_i8259_action, 0,
		    "i8259 cascade", NULL);
#endif
	return;
}


Perhaps something like the following would be a better solution:

static void __init
ppc4xx_init_IRQ(void)
{
	int i;

	ppc4xx_pic_init();

	for (i = 0; i < NR_IRQS; i++)
		irq_desc[i].handler = ppc4xx_pic;
#if defined(CONFIG_IRQ_FIXUP)
         board_fixup_irq();
#endif

	return;
}

Which is the way to go?


Dave


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2001-10-23  7:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-23  7:10 David Müller (ELSOFT AG) [this message]
2001-10-23 18:32 ` Additional IRQ handlers in ppc4xx_init_IRQ() Dan Malek
2001-10-24  9:26   ` David Müller (ELSOFT AG)

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=3BD517E5.5090204@elsoft.ch \
    --to=d.mueller@elsoft.ch \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.