2 * arch/powerpc/platforms/83xx/sbc834x.c
4 * Wind River SBC834x board specific routines
6 * By Paul Gortmaker (see MAINTAINERS for contact information)
8 * Based largely on the mpc834x_mds.c support by Kumar Gala.
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
16 #include <linux/stddef.h>
17 #include <linux/kernel.h>
18 #include <linux/init.h>
19 #include <linux/errno.h>
20 #include <linux/reboot.h>
21 #include <linux/pci.h>
22 #include <linux/kdev_t.h>
23 #include <linux/major.h>
24 #include <linux/console.h>
25 #include <linux/delay.h>
26 #include <linux/seq_file.h>
27 #include <linux/root_dev.h>
28 #include <linux/of_platform.h>
30 #include <asm/system.h>
31 #include <asm/atomic.h>
34 #include <asm/machdep.h>
39 #include <sysdev/fsl_soc.h>
43 /* ************************************************************************
45 * Setup the architecture
48 static void __init
sbc834x_setup_arch(void)
51 struct device_node
*np
;
55 ppc_md
.progress("sbc834x_setup_arch()", 0);
58 for_each_compatible_node(np
, "pci", "fsl,mpc8349-pci")
59 mpc83xx_add_bridge(np
);
64 static void __init
sbc834x_init_IRQ(void)
66 struct device_node
*np
;
68 np
= of_find_node_by_type(NULL
, "ipic");
74 /* Initialize the default interrupt mapping priorities,
75 * in case the boot rom changed something on us.
77 ipic_set_default_priority();
82 static struct __initdata of_device_id sbc834x_ids
[] = {
84 { .compatible
= "soc", },
88 static int __init
sbc834x_declare_of_platform_devices(void)
90 of_platform_bus_probe(NULL
, sbc834x_ids
, NULL
);
93 machine_device_initcall(sbc834x
, sbc834x_declare_of_platform_devices
);
96 * Called very early, MMU is off, device-tree isn't unflattened
98 static int __init
sbc834x_probe(void)
100 unsigned long root
= of_get_flat_dt_root();
102 return of_flat_dt_is_compatible(root
, "SBC834x");
105 define_machine(sbc834x
) {
107 .probe
= sbc834x_probe
,
108 .setup_arch
= sbc834x_setup_arch
,
109 .init_IRQ
= sbc834x_init_IRQ
,
110 .get_irq
= ipic_get_irq
,
111 .restart
= mpc83xx_restart
,
112 .time_init
= mpc83xx_time_init
,
113 .calibrate_decr
= generic_calibrate_decr
,
114 .progress
= udbg_progress
,