summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-07-02 20:46:20 +0400
committerKumar Gala <galak@kernel.crashing.org>2008-07-14 16:55:41 +0400
commit98384c6cdd1fd593f399b6f879bae2cae70aad48 (patch)
tree02e289153fb30d0039b306db33fee92ee9be387d /arch/powerpc/platforms/86xx/mpc8610_hpcd.c
parenta5d28c8e64ff0bc77d38d9c19c6d8163e4c0ffaa (diff)
downloadlinux-98384c6cdd1fd593f399b6f879bae2cae70aad48.tar.xz
powerpc/86xx: Refactor pic init
Moved the pic initialization into its own common file and out of the board code. Also fixed the OF reference counting on the mpic node. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/86xx/mpc8610_hpcd.c')
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index eb16208b29d9..30725302884a 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -39,6 +39,8 @@
#include <sysdev/fsl_pci.h>
#include <sysdev/fsl_soc.h>
+#include "mpc86xx.h"
+
static unsigned char *pixis_bdcfg0, *pixis_arch;
static struct of_device_id __initdata mpc8610_ids[] = {
@@ -56,28 +58,6 @@ static int __init mpc8610_declare_of_platform_devices(void)
}
machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
-static void __init mpc86xx_hpcd_init_irq(void)
-{
- struct mpic *mpic1;
- struct device_node *np;
- struct resource res;
-
- /* Determine PIC address. */
- np = of_find_node_by_type(NULL, "open-pic");
- if (np == NULL)
- return;
- of_address_to_resource(np, 0, &res);
-
- /* Alloc mpic structure and per isu has 16 INT entries. */
- mpic1 = mpic_alloc(np, res.start,
- MPIC_PRIMARY | MPIC_WANTS_RESET |
- MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
- 0, 256, " MPIC ");
- BUG_ON(mpic1 == NULL);
-
- mpic_init(mpic1);
-}
-
#ifdef CONFIG_PCI
static void __devinit quirk_uli1575(struct pci_dev *dev)
{
@@ -405,7 +385,7 @@ define_machine(mpc86xx_hpcd) {
.name = "MPC86xx HPCD",
.probe = mpc86xx_hpcd_probe,
.setup_arch = mpc86xx_hpcd_setup_arch,
- .init_IRQ = mpc86xx_hpcd_init_irq,
+ .init_IRQ = mpc86xx_init_irq,
.get_irq = mpic_get_irq,
.restart = fsl_rstcr_restart,
.time_init = mpc86xx_time_init,