0001
0002
0003
0004
0005
0006
0007
0008 #include <linux/stddef.h>
0009 #include <linux/kernel.h>
0010 #include <linux/of_fdt.h>
0011 #include <linux/of_platform.h>
0012
0013 #include <asm/machdep.h>
0014 #include <asm/udbg.h>
0015 #include <asm/mpic.h>
0016
0017 #include <sysdev/fsl_soc.h>
0018 #include <sysdev/fsl_pci.h>
0019
0020 #include "mpc85xx.h"
0021
0022 static void __init c293_pcie_pic_init(void)
0023 {
0024 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN |
0025 MPIC_SINGLE_DEST_CPU, 0, 256, " OpenPIC ");
0026
0027 BUG_ON(mpic == NULL);
0028
0029 mpic_init(mpic);
0030 }
0031
0032
0033
0034
0035
0036 static void __init c293_pcie_setup_arch(void)
0037 {
0038 if (ppc_md.progress)
0039 ppc_md.progress("c293_pcie_setup_arch()", 0);
0040
0041 fsl_pci_assign_primary();
0042
0043 printk(KERN_INFO "C293 PCIE board from Freescale Semiconductor\n");
0044 }
0045
0046 machine_arch_initcall(c293_pcie, mpc85xx_common_publish_devices);
0047
0048
0049
0050
0051 static int __init c293_pcie_probe(void)
0052 {
0053 if (of_machine_is_compatible("fsl,C293PCIE"))
0054 return 1;
0055 return 0;
0056 }
0057
0058 define_machine(c293_pcie) {
0059 .name = "C293 PCIE",
0060 .probe = c293_pcie_probe,
0061 .setup_arch = c293_pcie_setup_arch,
0062 .init_IRQ = c293_pcie_pic_init,
0063 .get_irq = mpic_get_irq,
0064 .calibrate_decr = generic_calibrate_decr,
0065 .progress = udbg_progress,
0066 };