Full support for Ginger Console
[linux-ginger.git] / arch / powerpc / platforms / 512x / mpc512x_shared.c
blob434d683df5a0e927931660fb55a328ffc40301e4
1 /*
2 * Copyright (C) 2007,2008 Freescale Semiconductor, Inc. All rights reserved.
4 * Author: John Rigby <jrigby@freescale.com>
6 * Description:
7 * MPC512x Shared code
9 * This is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
15 #include <linux/kernel.h>
16 #include <linux/io.h>
17 #include <linux/irq.h>
18 #include <linux/of_platform.h>
20 #include <asm/machdep.h>
21 #include <asm/ipic.h>
22 #include <asm/prom.h>
23 #include <asm/time.h>
25 #include "mpc512x.h"
27 void __init mpc512x_init_IRQ(void)
29 struct device_node *np;
31 np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-ipic");
32 if (!np)
33 return;
35 ipic_init(np, 0);
36 of_node_put(np);
39 * Initialize the default interrupt mapping priorities,
40 * in case the boot rom changed something on us.
42 ipic_set_default_priority();
46 * Nodes to do bus probe on, soc and localbus
48 static struct of_device_id __initdata of_bus_ids[] = {
49 { .compatible = "fsl,mpc5121-immr", },
50 { .compatible = "fsl,mpc5121-localbus", },
51 {},
54 void __init mpc512x_declare_of_platform_devices(void)
56 if (of_platform_bus_probe(NULL, of_bus_ids, NULL))
57 printk(KERN_ERR __FILE__ ": "
58 "Error while probing of_platform bus\n");