linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Cc: Sylvain Munaut <tnt@246tNt.com>
Subject: [PATCH 5/9] [POWERPC] Separate IRQ config / register set from main header
Date: Mon, 27 Nov 2006 14:16:26 -0700	[thread overview]
Message-ID: <1164662207513-git-send-email-grant.likely@secretlab.ca> (raw)
In-Reply-To: <11646622072999-git-send-email-grant.likely@secretlab.ca>

From: Sylvain Munaut <tnt@246tNt.com>

There is no need to expose theses settings outside the scope
of the interrupt controller code itself.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
 arch/powerpc/platforms/52xx/mpc52xx_pic.c |    1 +
 arch/powerpc/platforms/52xx/mpc52xx_pic.h |   53 +++++++++++++++++++++++++++++
 include/asm-powerpc/mpc52xx.h             |   37 --------------------
 3 files changed, 54 insertions(+), 37 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 6df51f0..504154f 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -33,6 +33,7 @@ #include <asm/system.h>
 #include <asm/irq.h>
 #include <asm/prom.h>
 #include <asm/mpc52xx.h>
+#include "mpc52xx_pic.h"
 
 /*
  *
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.h b/arch/powerpc/platforms/52xx/mpc52xx_pic.h
new file mode 100644
index 0000000..1a26bcd
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.h
@@ -0,0 +1,53 @@
+/*
+ * Header file for Freescale MPC52xx Interrupt controller
+ *
+ * Copyright (C) 2004-2005 Sylvain Munaut <tnt@246tNt.com>
+ * Copyright (C) 2003 MontaVista, Software, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#ifndef __POWERPC_SYSDEV_MPC52xx_PIC_H__
+#define __POWERPC_SYSDEV_MPC52xx_PIC_H__
+
+#include <asm/types.h>
+
+
+/* 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     (0x00c0)
+
+#define MPC52xx_IRQ_L2_OFFSET   (0)
+#define MPC52xx_IRQ_L2_MASK     (0x003f)
+
+#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 */
+};
+
+#endif /* __POWERPC_SYSDEV_MPC52xx_PIC_H__ */
+
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index e9aa622..fff752c 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -20,48 +20,11 @@ #endif /* __ASSEMBLY__ */
 
 
 /* ======================================================================== */
-/* 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)
-
-
-/* ======================================================================== */
 /* Structures mapping of some unit register set                             */
 /* ======================================================================== */
 
 #ifndef __ASSEMBLY__
 
-/* 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 */
-};
-
 /* Memory Mapping Control */
 struct mpc52xx_mmap_ctl {
 	u32 mbar;		/* MMAP_CTRL + 0x00 */
-- 
1.4.3.rc2.g0503

  reply	other threads:[~2006-11-27 21:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-27 21:16 MPC52xx support rework for 2.6.20 Grant Likely
2006-11-27 21:16 ` [PATCH 1/9] [POWERPC] Document describing mpc52xx device tree binding conventions Grant Likely
2006-11-27 21:16   ` [PATCH 2/9] [POWERPC] Move MPC52xx PIC driver into arch/powerpc/platforms/52xx Grant Likely
2006-11-27 21:16     ` [PATCH 3/9] [POWERPC] Put mpc52xx support file in platforms/52xx Grant Likely
2006-11-27 21:16       ` [PATCH 4/9] [POWERPC] move Efika support files into platforms/52xx Grant Likely
2006-11-27 21:16         ` Grant Likely [this message]
2006-11-27 21:16           ` [PATCH 6/9] [POWERPC] Add common routines for 52xx support in arch/powerpc Grant Likely
2006-11-27 21:16             ` [PATCH 7/9] [POWERPC] Add lite5200 board support to arch/powerpc Grant Likely
2006-11-27 21:16               ` [PATCH 8/9] [POWERPC] Add device trees for lite5200 and lite5200b eval boards Grant Likely
2006-11-27 21:16                 ` [PATCH 9/9] [POWERPC] defconfig for lite5200 board Grant Likely
2006-11-27 21:56         ` [PATCH 4/9] [POWERPC] move Efika support files into platforms/52xx Arnd Bergmann
2006-11-27 22:09           ` Grant Likely
2006-11-27 22:12           ` Benjamin Herrenschmidt
2006-11-27 22:33             ` Arnd Bergmann
2006-11-27 21:39 ` MPC52xx support rework for 2.6.20 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=1164662207513-git-send-email-grant.likely@secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --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).