From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nicolas DET <nd@bplan-gmbh.de>
Cc: linuxppc-dev@ozlabs.org, Sylvain Munaut <tnt@246tNt.com>,
sl@bplan-gmbh.de, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH/RFC] powerpc: Add MPC5200 Interrupt Controller support.
Date: Sun, 05 Nov 2006 10:35:40 +1100 [thread overview]
Message-ID: <1162683341.28571.82.camel@localhost.localdomain> (raw)
In-Reply-To: <454A5952.6090801@bplan-gmbh.de>
On Thu, 2006-11-02 at 21:47 +0100, Nicolas DET wrote:
> + *
> + * Programmable Interrupt Controller functions for the Freescale MPC52xx.
> + *
> + * Based on (well, mostly copied from) the code from the 2.4 kernel by
> + * Dale Farnsworth <dfarnsworth@mvista.com> and Kent Borg.
> + *
> + * Copyright (C) 2004 Sylvain Munaut <tnt@246tNt.com>
> + * Copyright (C) 2003 Montavista Software, Inc
You did significant changes, you should add your (c) before the "Based
on..." line.
> + switch (l1irq) {
> + case MPC52xx_IRQ_L1_CRIT:
> + pr_debug("%s: Critical. l2=%x\n", __func__, l2irq);
> +
> + BUG_ON(l2irq != 0);
> +
> + type = mpc52xx_irqx_gettype(l2irq);
> + good_irqchip = &mpc52xx_extirq_irqchip;
> + break;
> +
> + case MPC52xx_IRQ_L1_MAIN:
> + pr_debug("%s: Main IRQ[1-3] l2=%x\n", __func__, l2irq);
> +
> + if ((l2irq >= 1) && (l2irq <= 3)) {
> + type = mpc52xx_irqx_gettype(l2irq);
> + good_irqchip = &mpc52xx_extirq_irqchip;
> + } else {
> + good_irqchip = &mpc52xx_main_irqchip;
> + }
> + break;
You have changed the mapping of L1/L2 but not the device-tree
representation to match them. Which means that you need the ugly hack
above. That is not goot. Fix your device-tree instead and do the same
split in the tree for L1/L2 than you do in the code.
In fact, I'm wondering if it might not be worth going back to 2 cells
and have cell 0 just contain the HW number now that we have sanitized
those... In any way, the above special casing should go.
> + picnode = find_mpc52xx_picnode();
> + sdmanode = find_mpc52xx_sdmanode();
Any reason why you have those inline 1-line functions and just not put
the actual of_find_* call in here ?
You probably also need some of_node_put() in the error case. You are
doing a whole bunch of "return" that bypass them.
The rest looks ok.
Please submit the io.h patch separately. Also, you may need to fix the
default case (which is the one we are using) in there to work with
CONFIG_PCI not set (by defining PCI_DRAM_BASE to 0 among others).
> --- a/include/asm-ppc/io.h 2006-11-01 09:19:02.000000000 +0100
> +++ b/include/asm-ppc/io.h 2006-11-02 18:01:17.000000000 +0100
> @@ -26,7 +26,7 @@
>
> #if defined(CONFIG_4xx)
> #include <asm/ibm4xx.h>
> -#elif defined(CONFIG_PPC_MPC52xx)
> +#elif defined(CONFIG_PPC_MPC52xx) && !defined(CONFIG_PPC_MERGE)
> #include <asm/mpc52xx.h>
> #elif defined(CONFIG_8xx)
> #include <asm/mpc8xx.h>
Ben.
next prev parent reply other threads:[~2006-11-04 23:35 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-01 20:27 [PATCH/RFC] powerpc: Add MPC5200 Interrupt Controller support Nicolas DET
2006-11-01 22:05 ` Dale Farnsworth
2006-11-01 22:07 ` Sven Luther
2006-11-01 22:21 ` Dale Farnsworth
2006-11-01 22:12 ` Benjamin Herrenschmidt
2006-11-02 16:27 ` Nicolas DET
2006-11-02 20:47 ` Nicolas DET
2006-11-04 23:35 ` Benjamin Herrenschmidt [this message]
2006-11-05 0:27 ` Sylvain Munaut
2006-11-05 1:13 ` Benjamin Herrenschmidt
2006-11-06 6:28 ` Grant Likely
2006-11-06 8:39 ` Sylvain Munaut
2006-11-05 10:17 ` Nicolas DET
2006-11-05 10:37 ` Benjamin Herrenschmidt
2006-11-05 11:30 ` Nicolas DET
2006-11-05 13:02 ` Benjamin Herrenschmidt
2006-11-05 13:16 ` Nicolas DET
2006-11-05 14:32 ` Sylvain Munaut
2006-11-06 6:55 ` Grant Likely
-- strict thread matches above, loose matches on Subject: below --
2006-11-06 10:26 Nicolas DET
2006-11-06 11:03 Nicolas DET
2006-11-06 23:35 ` Sylvain Munaut
2006-11-07 9:22 ` Nicolas DET
2006-11-07 10:40 Nicolas DET
2006-11-07 10:45 ` Sylvain Munaut
2006-11-07 16:30 ` Grant Likely
2006-11-07 20:52 ` Sylvain Munaut
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=1162683341.28571.82.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=linuxppc-embedded@ozlabs.org \
--cc=nd@bplan-gmbh.de \
--cc=sl@bplan-gmbh.de \
--cc=tnt@246tNt.com \
/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).