2 * arch/powerpc/platforms/83xx/mpc832x_rdb.c
4 * Copyright (C) Freescale Semiconductor, Inc. 2007. All rights reserved.
7 * MPC832x RDB board specific routines.
8 * This file is based on mpc832x_mds.c and mpc8313_rdb.c
9 * Author: Michael Barkowski <michael.barkowski@freescale.com>
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
17 #include <linux/pci.h>
19 #include <asm/of_platform.h>
24 #include <asm/qe_ic.h>
30 #define DBG(fmt...) udbg_printf(fmt)
35 /* ************************************************************************
37 * Setup the architecture
40 static void __init mpc832x_rdb_setup_arch(void)
42 #if defined(CONFIG_PCI) || defined(CONFIG_QUICC_ENGINE)
43 struct device_node *np;
47 ppc_md.progress("mpc832x_rdb_setup_arch()", 0);
50 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
51 mpc83xx_add_bridge(np);
53 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
56 #ifdef CONFIG_QUICC_ENGINE
59 if ((np = of_find_node_by_name(np, "par_io")) != NULL) {
63 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;)
66 #endif /* CONFIG_QUICC_ENGINE */
69 static struct of_device_id mpc832x_ids[] = {
71 { .compatible = "soc", },
77 static int __init mpc832x_declare_of_platform_devices(void)
79 if (!machine_is(mpc832x_rdb))
82 /* Publish the QE devices */
83 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
87 device_initcall(mpc832x_declare_of_platform_devices);
89 void __init mpc832x_rdb_init_IRQ(void)
92 struct device_node *np;
94 np = of_find_node_by_type(NULL, "ipic");
100 /* Initialize the default interrupt mapping priorities,
101 * in case the boot rom changed something on us.
103 ipic_set_default_priority();
106 #ifdef CONFIG_QUICC_ENGINE
107 np = of_find_node_by_type(NULL, "qeic");
113 #endif /* CONFIG_QUICC_ENGINE */
117 * Called very early, MMU is off, device-tree isn't unflattened
119 static int __init mpc832x_rdb_probe(void)
121 unsigned long root = of_get_flat_dt_root();
123 return of_flat_dt_is_compatible(root, "MPC832xRDB");
126 define_machine(mpc832x_rdb) {
127 .name = "MPC832x RDB",
128 .probe = mpc832x_rdb_probe,
129 .setup_arch = mpc832x_rdb_setup_arch,
130 .init_IRQ = mpc832x_rdb_init_IRQ,
131 .get_irq = ipic_get_irq,
132 .restart = mpc83xx_restart,
133 .time_init = mpc83xx_time_init,
134 .calibrate_decr = generic_calibrate_decr,
135 .progress = udbg_progress,