c293pcie.c 1.1 KB

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