1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Paravirt target for a generic QEMU e500 machine
5 * This is intended to be a flexible device-tree-driven platform, not fixed
6 * to a particular piece of hardware or a particular spec of virtual hardware,
7 * beyond the assumption of an e500-family CPU. Some things are still hardcoded
8 * here, such as MPIC, but this is a limitation of the current code rather than
9 * an interface contract with QEMU.
11 * Copyright 2012 Freescale Semiconductor Inc.
14 #include <linux/kernel.h>
16 #include <linux/of_fdt.h>
17 #include <linux/pgtable.h>
18 #include <asm/machdep.h>
22 #include <asm/swiotlb.h>
23 #include <sysdev/fsl_soc.h>
24 #include <sysdev/fsl_pci.h>
28 static void __init qemu_e500_pic_init(void)
31 unsigned int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU |
34 mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC ");
40 static void __init qemu_e500_setup_arch(void)
42 ppc_md.progress("qemu_e500_setup_arch()", 0);
44 fsl_pci_assign_primary();
49 machine_arch_initcall(qemu_e500, mpc85xx_common_publish_devices);
51 define_machine(qemu_e500) {
53 .compatible = "fsl,qemu-e500",
54 .setup_arch = qemu_e500_setup_arch,
55 .init_IRQ = qemu_e500_pic_init,
57 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
58 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
60 .get_irq = mpic_get_coreint_irq,
61 .progress = udbg_progress,
62 .power_save = e500_idle,