From: Wolfgang Grandegger <wg@grandegger.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 7/8] powerpc/5200: Refactor mpc5200 interrupt controller driver
Date: Sun, 25 Jan 2009 21:06:10 +0100 [thread overview]
Message-ID: <497CC632.2000402@grandegger.com> (raw)
In-Reply-To: <20090121205540.31232.77034.stgit@localhost.localdomain>
Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Rework the mpc5200-pic driver to simplify it and fix up the setting
> of desc->status when set_type is called for internal IRQs (so they
> are reported as level, not edge). The simplification is due to
> splitting off the handling of external IRQs into a separate block
> so they don't need to be handled as exceptions in the normal
> CRIT, MAIN and PERP paths.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> CC: Wolfram Sang <w.sang@pengutronix.de>
> ---
>
> arch/powerpc/platforms/52xx/mpc52xx_pic.c | 145 ++++++++++++-----------------
> 1 files changed, 58 insertions(+), 87 deletions(-)
>
>
> diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> index c0a9559..277c9c5 100644
> --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> @@ -190,10 +190,10 @@ static void mpc52xx_extirq_ack(unsigned int virq)
>
> static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
> {
> - struct irq_desc *desc = get_irq_desc(virq);
> u32 ctrl_reg, type;
> int irq;
> int l2irq;
> + void *handler = handle_level_irq;
>
> irq = irq_map[virq].hwirq;
> l2irq = irq & MPC52xx_IRQ_L2_MASK;
> @@ -201,32 +201,21 @@ static int mpc52xx_extirq_set_type(unsigned int virq, unsigned int flow_type)
> pr_debug("%s: irq=%x. l2=%d flow_type=%d\n", __func__, irq, l2irq, flow_type);
>
> switch (flow_type) {
> - case IRQF_TRIGGER_HIGH:
> - type = 0;
> - break;
> - case IRQF_TRIGGER_RISING:
> - type = 1;
> - break;
> - case IRQF_TRIGGER_FALLING:
> - type = 2;
> - break;
> - case IRQF_TRIGGER_LOW:
> - type = 3;
> - break;
> + case IRQF_TRIGGER_HIGH: type = 0; break;
> + case IRQF_TRIGGER_RISING: type = 1; handler = handle_edge_irq; break;
> + case IRQF_TRIGGER_FALLING: type = 2; handler = handle_edge_irq; break;
> + case IRQF_TRIGGER_LOW: type = 3; break;
The Linux coding style tells us not to do that:
http://lxr.linux.no/linux+v2.6.28.2/Documentation/CodingStyle#L60
Wolfgang.
next prev parent reply other threads:[~2009-01-25 20:06 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 20:55 [PATCH 1/8] powerpc/5200: update device tree binding documentation Grant Likely
2009-01-21 20:55 ` [PATCH 2/8] powerpc/5200: Stop using device_type and port-number properties Grant Likely
2009-01-21 21:13 ` Juergen Beisert
2009-01-22 4:46 ` Grant Likely
2009-01-29 21:15 ` Wolfram Sang
2009-01-21 20:55 ` [PATCH 3/8] powerpc/5200: Trim cruft from device trees Grant Likely
2009-01-29 21:21 ` Wolfram Sang
2009-01-21 20:55 ` [PATCH 4/8] powerpc/5200: Add support for the Media5200 board from Freescale Grant Likely
2009-01-21 20:55 ` [PATCH 5/8] powerpc/5200: Don't specify IRQF_SHARED in PSC UART driver Grant Likely
2009-01-29 21:24 ` Wolfram Sang
2009-01-21 20:55 ` [PATCH 6/8] powerpc/5200: Remove pr_debug() from hot paths in irq driver Grant Likely
2009-01-29 21:29 ` Wolfram Sang
2009-01-21 20:55 ` [PATCH 7/8] powerpc/5200: Refactor mpc5200 interrupt controller driver Grant Likely
2009-01-25 20:06 ` Wolfgang Grandegger [this message]
2009-01-26 0:22 ` Grant Likely
2009-01-26 6:26 ` Wolfgang Denk
2009-01-26 8:31 ` Wolfgang Grandegger
2009-01-26 17:58 ` Matt Sealey
2009-01-26 9:22 ` Wolfram Sang
2009-01-27 17:52 ` Matt Sealey
2009-01-27 17:54 ` Grant Likely
2009-01-29 21:33 ` Wolfram Sang
2009-01-21 20:55 ` [PATCH 8/8] powerpc/5200: Rework GPT driver to also be an IRQ controller Grant Likely
2009-01-27 12:23 ` Wolfram Sang
2009-01-25 19:48 ` [PATCH 1/8] powerpc/5200: update device tree binding documentation Wolfram Sang
2009-01-26 1:46 ` Grant Likely
2009-01-26 9:26 ` Wolfram Sang
2009-01-27 16:25 ` Grant Likely
2009-01-27 18:00 ` Matt Sealey
2009-01-27 18:06 ` Grant Likely
2009-01-29 21:09 ` Wolfram Sang
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=497CC632.2000402@grandegger.com \
--to=wg@grandegger.com \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.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).