From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: linuxppc-dev <Linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] mpic: add support for serial mode interrupts
Date: Tue, 20 Jun 2006 14:01:26 +1000 [thread overview]
Message-ID: <1150776086.23600.329.camel@localhost.localdomain> (raw)
In-Reply-To: <20060619200811.GA15524@mag.az.mvista.com>
On Mon, 2006-06-19 at 13:08 -0700, Mark A. Greer wrote:
> MPC10x-style interrupt controllers have a serial mode that allows
> several interrupts to be clocked in through one INT signal.
>
> This patch adds the software support for that mode.
You hard code the clock ratio... why not add a separate call to be
called after mpic_init,
something like mpic_set_serial_int(int mpic, int enable, int
clock_ratio) ?
Ben.
> Signed-off-by: Mark A. Greer <mgreer@mvista.com>
> --
>
> arch/powerpc/sysdev/mpic.c | 6 ++++++
> include/asm-powerpc/mpic.h | 2 ++
> 2 files changed, 8 insertions(+)
> --
>
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 7dcdfcb..1829aed 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -629,6 +629,12 @@ #endif /* CONFIG_SMP */
> mb();
> }
>
> + /* For serial interrupts & set clock ratio */
> + if (flags & MPIC_SERIAL_MODE)
> + mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1,
> + mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1)
> + | (1<<27) | (0x7<<28));
> +
> /* Read feature register, calculate num CPUs and, for non-ISU
> * MPICs, num sources as well. On ISU MPICs, sources are counted
> * as ISUs are added
> diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
> index 6b9e781..f35ccdc 100644
> --- a/include/asm-powerpc/mpic.h
> +++ b/include/asm-powerpc/mpic.h
> @@ -186,6 +186,8 @@ #define MPIC_BROKEN_U3 0x00000004
> #define MPIC_BROKEN_IPI 0x00000008
> /* MPIC wants a reset */
> #define MPIC_WANTS_RESET 0x00000010
> +/* MPIC serial mode */
> +#define MPIC_SERIAL_MODE 0x00000020
>
> /* Allocate the controller structure and setup the linux irq descs
> * for the range if interrupts passed in. No HW initialization is
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
next prev parent reply other threads:[~2006-06-20 4:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 20:08 [PATCH] mpic: add support for serial mode interrupts Mark A. Greer
2006-06-19 20:11 ` Olof Johansson
2006-06-19 20:19 ` Mark A. Greer
2006-06-19 22:35 ` Segher Boessenkool
2006-06-21 1:12 ` Benjamin Herrenschmidt
2006-06-19 22:03 ` Mark A. Greer
2006-06-20 4:01 ` Benjamin Herrenschmidt [this message]
2006-06-20 16:37 ` Mark A. Greer
2006-06-20 21:15 ` Mark A. Greer
2006-06-20 22:04 ` Benjamin Herrenschmidt
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=1150776086.23600.329.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=Linuxppc-dev@ozlabs.org \
--cc=mgreer@mvista.com \
--cc=paulus@samba.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