2 * MPC8360E-RDK board file.
4 * Copyright (c) 2006 Freescale Semicondutor, Inc.
5 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
15 #include <linux/kernel.h>
16 #include <linux/pci.h>
17 #include <linux/of_platform.h>
24 #include <asm/qe_ic.h>
25 #include <sysdev/fsl_soc.h>
29 static struct of_device_id __initdata mpc836x_rdk_ids[] = {
30 { .compatible = "simple-bus", },
34 static int __init mpc836x_rdk_declare_of_platform_devices(void)
36 return of_platform_bus_probe(NULL, mpc836x_rdk_ids, NULL);
38 machine_device_initcall(mpc836x_rdk, mpc836x_rdk_declare_of_platform_devices);
40 static void __init mpc836x_rdk_setup_arch(void)
43 struct device_node *np;
47 ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
50 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
51 mpc83xx_add_bridge(np);
57 static void __init mpc836x_rdk_init_IRQ(void)
59 struct device_node *np;
61 np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
68 * Initialize the default interrupt mapping priorities,
69 * in case the boot rom changed something on us.
71 ipic_set_default_priority();
74 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
78 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);
83 * Called very early, MMU is off, device-tree isn't unflattened.
85 static int __init mpc836x_rdk_probe(void)
87 unsigned long root = of_get_flat_dt_root();
89 return of_flat_dt_is_compatible(root, "fsl,mpc8360rdk");
92 define_machine(mpc836x_rdk) {
93 .name = "MPC836x RDK",
94 .probe = mpc836x_rdk_probe,
95 .setup_arch = mpc836x_rdk_setup_arch,
96 .init_IRQ = mpc836x_rdk_init_IRQ,
97 .get_irq = ipic_get_irq,
98 .restart = mpc83xx_restart,
99 .time_init = mpc83xx_time_init,
100 .calibrate_decr = generic_calibrate_decr,
101 .progress = udbg_progress,