powerpc/83xx: consolidate of_platform_bus_probe calls
[deliverable/linux.git] / arch / powerpc / platforms / 83xx / mpc836x_rdk.c
CommitLineData
b13e9309
AV
1/*
2 * MPC8360E-RDK board file.
3 *
4 * Copyright (c) 2006 Freescale Semicondutor, Inc.
5 * Copyright (c) 2007-2008 MontaVista Software, Inc.
6 *
7 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
8 *
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.
13 */
14
15#include <linux/kernel.h>
16#include <linux/pci.h>
17#include <linux/of_platform.h>
18#include <linux/io.h>
19#include <asm/prom.h>
20#include <asm/time.h>
21#include <asm/ipic.h>
22#include <asm/udbg.h>
23#include <asm/qe.h>
24#include <asm/qe_ic.h>
25#include <sysdev/fsl_soc.h>
76fe1ffc 26#include <sysdev/fsl_pci.h>
b13e9309
AV
27
28#include "mpc83xx.h"
29
7669d58c 30machine_device_initcall(mpc836x_rdk, mpc83xx_declare_of_platform_devices);
b13e9309
AV
31
32static void __init mpc836x_rdk_setup_arch(void)
33{
34#ifdef CONFIG_PCI
35 struct device_node *np;
36#endif
37
38 if (ppc_md.progress)
39 ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
40
41#ifdef CONFIG_PCI
42 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
43 mpc83xx_add_bridge(np);
44#endif
20cfb41b 45#ifdef CONFIG_QUICC_ENGINE
b13e9309 46 qe_reset();
20cfb41b 47#endif
b13e9309
AV
48}
49
b13e9309
AV
50/*
51 * Called very early, MMU is off, device-tree isn't unflattened.
52 */
53static int __init mpc836x_rdk_probe(void)
54{
55 unsigned long root = of_get_flat_dt_root();
56
57 return of_flat_dt_is_compatible(root, "fsl,mpc8360rdk");
58}
59
60define_machine(mpc836x_rdk) {
61 .name = "MPC836x RDK",
62 .probe = mpc836x_rdk_probe,
63 .setup_arch = mpc836x_rdk_setup_arch,
d4fb5ebd 64 .init_IRQ = mpc83xx_ipic_and_qe_init_IRQ,
b13e9309
AV
65 .get_irq = ipic_get_irq,
66 .restart = mpc83xx_restart,
67 .time_init = mpc83xx_time_init,
68 .calibrate_decr = generic_calibrate_decr,
69 .progress = udbg_progress,
70};
This page took 0.23516 seconds and 5 git commands to generate.