1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * MPC85xx DS Board Setup
5 * Author Xianghua Xiao (x.xiao@freescale.com)
6 * Roy Zang <tie-fei.zang@freescale.com>
7 * - Add PCI/PCI Exprees support
8 * Copyright 2007 Freescale Semiconductor Inc.
11 #include <linux/stddef.h>
12 #include <linux/kernel.h>
13 #include <linux/pci.h>
14 #include <linux/kdev_t.h>
15 #include <linux/delay.h>
16 #include <linux/seq_file.h>
17 #include <linux/interrupt.h>
19 #include <linux/of_irq.h>
22 #include <asm/machdep.h>
23 #include <asm/pci-bridge.h>
24 #include <mm/mmu_decl.h>
27 #include <asm/i8259.h>
28 #include <asm/swiotlb.h>
29 #include <asm/ppc-pci.h>
31 #include <sysdev/fsl_soc.h>
32 #include <sysdev/fsl_pci.h>
37 static void __init mpc85xx_ds_pic_init(void)
40 int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU;
42 if (of_machine_is_compatible("fsl,MPC8572DS-CAMP"))
43 flags |= MPIC_NO_RESET;
45 mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC ");
56 * Setup the architecture
58 static void __init mpc85xx_ds_setup_arch(void)
61 ppc_md.progress("mpc85xx_ds_setup_arch()", 0);
64 fsl_pci_assign_primary();
68 pr_info("MPC85xx DS board from Freescale Semiconductor\n");
71 machine_arch_initcall(mpc8544_ds, mpc85xx_common_publish_devices);
72 machine_arch_initcall(mpc8572_ds, mpc85xx_common_publish_devices);
74 define_machine(mpc8544_ds) {
76 .compatible = "MPC8544DS",
77 .setup_arch = mpc85xx_ds_setup_arch,
78 .init_IRQ = mpc85xx_ds_pic_init,
80 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
81 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
83 .get_irq = mpic_get_irq,
84 .progress = udbg_progress,
87 define_machine(mpc8572_ds) {
89 .compatible = "fsl,MPC8572DS",
90 .setup_arch = mpc85xx_ds_setup_arch,
91 .init_IRQ = mpc85xx_ds_pic_init,
93 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
94 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
96 .get_irq = mpic_get_irq,
97 .progress = udbg_progress,