1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * C293PCIE Board Setup 4 * 5 * Copyright 2013 Freescale Semiconductor Inc. 6 */ 7 8 #include <linux/stddef.h> 9 #include <linux/kernel.h> 10 #include <linux/of_fdt.h> 11 #include <linux/of_platform.h> 12 13 #include <asm/machdep.h> 14 #include <asm/udbg.h> 15 #include <asm/mpic.h> 16 17 #include <sysdev/fsl_soc.h> 18 #include <sysdev/fsl_pci.h> 19 20 #include "mpc85xx.h" 21 22 static void __init c293_pcie_pic_init(void) 23 { 24 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 25 MPIC_SINGLE_DEST_CPU, 0, 256, " OpenPIC "); 26 27 BUG_ON(mpic == NULL); 28 29 mpic_init(mpic); 30 } 31 32 33 /* 34 * Setup the architecture 35 */ 36 static void __init c293_pcie_setup_arch(void) 37 { 38 if (ppc_md.progress) 39 ppc_md.progress("c293_pcie_setup_arch()", 0); 40 41 fsl_pci_assign_primary(); 42 43 printk(KERN_INFO "C293 PCIE board from Freescale Semiconductor\n"); 44 } 45 46 machine_arch_initcall(c293_pcie, mpc85xx_common_publish_devices); 47 48 define_machine(c293_pcie) { 49 .name = "C293 PCIE", 50 .compatible = "fsl,C293PCIE", 51 .setup_arch = c293_pcie_setup_arch, 52 .init_IRQ = c293_pcie_pic_init, 53 .get_irq = mpic_get_irq, 54 .progress = udbg_progress, 55 }; 56