All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt.com>
To: Nicolas DET <nd@bplan-gmbh.de>
Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH/RFC] powerpc: Add MPC5200 Interrupt Controller support.
Date: Tue, 07 Nov 2006 00:35:14 +0100	[thread overview]
Message-ID: <454FC6B2.10909@246tNt.com> (raw)
In-Reply-To: <200611061103.kA6B3ADJ023943@post.webmailer.de>


> +
> +	/*
> +	 * Most of ours IRQs will be level low
> +	 * Only external IRQs on some platform may be others
> +	 */
> +	type = IRQ_TYPE_LEVEL_LOW;
>   
I've been wondering : Why LEVEL_LOW ?
Aren't they LEVEL_HIGH ?
(not that it changes much here ...)


> +
> +end:
> +	of_node_put(picnode);
> +	of_node_put(sdmanode);
>   
Is of_node_put specified as resilient to NULL argument ? (in the error
path, that could happen)

Also, I think "PANIC" would be appropriate in the error path. If we
can't init
the PIC properly we may as well give up ... It's not like we're going to
do much
without it ...


> +/* HW IRQ mapping */
> +#define MPC52xx_IRQ_L1_CRIT	(0)
> +#define MPC52xx_IRQ_L1_MAIN	(1)
> +#define MPC52xx_IRQ_L1_PERP	(2)
> +#define MPC52xx_IRQ_L1_SDMA	(3)
> +
> +#define MPC52xx_IRQ_L1_OFFSET   (6)
> +#define MPC52xx_IRQ_L1_MASK     (0xc0)
> +
> +#define MPC52xx_IRQ_L2_OFFSET   (0)
> +#define MPC52xx_IRQ_L2_MASK     (0x3f)
> +
> +#define MPC52xx_IRQ_HIGHTESTHWIRQ (0xd0)
> +
> +/* Interrupt controller Register set */
> +struct mpc52xx_intr {
> +	u32 per_mask;		/* INTR + 0x00 */
> +	u32 per_pri1;		/* INTR + 0x04 */
> +	u32 per_pri2;		/* INTR + 0x08 */
> +	u32 per_pri3;		/* INTR + 0x0c */
> +	u32 ctrl;		/* INTR + 0x10 */
> +	u32 main_mask;		/* INTR + 0x14 */
> +	u32 main_pri1;		/* INTR + 0x18 */
> +	u32 main_pri2;		/* INTR + 0x1c */
> +	u32 reserved1;		/* INTR + 0x20 */
> +	u32 enc_status;		/* INTR + 0x24 */
> +	u32 crit_status;	/* INTR + 0x28 */
> +	u32 main_status;	/* INTR + 0x2c */
> +	u32 per_status;		/* INTR + 0x30 */
> +	u32 reserved2;		/* INTR + 0x34 */
> +	u32 per_error;		/* INTR + 0x38 */
> +};
>   
When I said on IRC you could remerge them, I meant a little more
smartly than just 'join' them. i.e., put the mpc52xx_intr with all the
other register set at the very least ...



    Sylvain

  reply	other threads:[~2006-11-06 23:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06 11:03 [PATCH/RFC] powerpc: Add MPC5200 Interrupt Controller support Nicolas DET
2006-11-06 23:35 ` Sylvain Munaut [this message]
2006-11-07  9:22   ` Nicolas DET
  -- strict thread matches above, loose matches on Subject: below --
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
2006-11-06 10:26 Nicolas DET
2006-11-01 20:27 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
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

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=454FC6B2.10909@246tNt.com \
    --to=tnt@246tnt.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=nd@bplan-gmbh.de \
    /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.