2 * Paravirt target for a generic QEMU e500 machine
4 * This is intended to be a flexible device-tree-driven platform, not fixed
5 * to a particular piece of hardware or a particular spec of virtual hardware,
6 * beyond the assumption of an e500-family CPU. Some things are still hardcoded
7 * here, such as MPIC, but this is a limitation of the current code rather than
8 * an interface contract with QEMU.
10 * Copyright 2012 Freescale Semiconductor Inc.
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
18 #include <linux/kernel.h>
19 #include <linux/of_fdt.h>
20 #include <asm/machdep.h>
24 #include <sysdev/fsl_soc.h>
25 #include <sysdev/fsl_pci.h>
29 void __init
qemu_e500_pic_init(void)
33 mpic
= mpic_alloc(NULL
, 0, MPIC_BIG_ENDIAN
| MPIC_SINGLE_DEST_CPU
,
40 static void __init
qemu_e500_setup_arch(void)
42 ppc_md
.progress("qemu_e500_setup_arch()", 0);
49 * Called very early, device-tree isn't unflattened
51 static int __init
qemu_e500_probe(void)
53 unsigned long root
= of_get_flat_dt_root();
55 return !!of_flat_dt_is_compatible(root
, "fsl,qemu-e500");
58 machine_device_initcall(qemu_e500
, mpc85xx_common_publish_devices
);
60 define_machine(qemu_e500
) {
62 .probe
= qemu_e500_probe
,
63 .setup_arch
= qemu_e500_setup_arch
,
64 .init_IRQ
= qemu_e500_pic_init
,
66 .pcibios_fixup_bus
= fsl_pcibios_fixup_bus
,
68 .get_irq
= mpic_get_irq
,
69 .restart
= fsl_rstcr_restart
,
70 .calibrate_decr
= generic_calibrate_decr
,
71 .progress
= udbg_progress
,