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)
36 unsigned long isa_io_base = 0;
37 unsigned long isa_mem_base = 0;
40 /* ************************************************************************
42 * Setup the architecture
45 static void __init mpc832x_rdb_setup_arch(void)
47 struct device_node *np;
50 ppc_md.progress("mpc832x_rdb_setup_arch()", 0);
53 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
56 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
59 #ifdef CONFIG_QUICC_ENGINE
62 if ((np = of_find_node_by_name(np, "par_io")) != NULL) {
66 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;)
69 #endif /* CONFIG_QUICC_ENGINE */
72 static struct of_device_id mpc832x_ids[] = {
74 { .compatible = "soc", },
80 static int __init mpc832x_declare_of_platform_devices(void)
82 if (!machine_is(mpc832x_rdb))
85 /* Publish the QE devices */
86 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
90 device_initcall(mpc832x_declare_of_platform_devices);
92 void __init mpc832x_rdb_init_IRQ(void)
95 struct device_node *np;
97 np = of_find_node_by_type(NULL, "ipic");
103 /* Initialize the default interrupt mapping priorities,
104 * in case the boot rom changed something on us.
106 ipic_set_default_priority();
109 #ifdef CONFIG_QUICC_ENGINE
110 np = of_find_node_by_type(NULL, "qeic");
116 #endif /* CONFIG_QUICC_ENGINE */
120 * Called very early, MMU is off, device-tree isn't unflattened
122 static int __init mpc832x_rdb_probe(void)
124 unsigned long root = of_get_flat_dt_root();
126 return of_flat_dt_is_compatible(root, "MPC832xRDB");
129 define_machine(mpc832x_rdb) {
130 .name = "MPC832x RDB",
131 .probe = mpc832x_rdb_probe,
132 .setup_arch = mpc832x_rdb_setup_arch,
133 .init_IRQ = mpc832x_rdb_init_IRQ,
134 .get_irq = ipic_get_irq,
135 .restart = mpc83xx_restart,
136 .time_init = mpc83xx_time_init,
137 .calibrate_decr = generic_calibrate_decr,
138 .progress = udbg_progress,