mvme2500.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Board setup routines for the Emerson/Artesyn MVME2500
  4. *
  5. * Copyright 2014 Elettra-Sincrotrone Trieste S.C.p.A.
  6. *
  7. * Based on earlier code by:
  8. *
  9. * Xianghua Xiao ([email protected])
  10. * Tom Armistead ([email protected])
  11. * Copyright 2012 Emerson
  12. *
  13. * Author Alessio Igor Bogani <[email protected]>
  14. */
  15. #include <linux/pci.h>
  16. #include <asm/udbg.h>
  17. #include <asm/mpic.h>
  18. #include <sysdev/fsl_soc.h>
  19. #include <sysdev/fsl_pci.h>
  20. #include "mpc85xx.h"
  21. void __init mvme2500_pic_init(void)
  22. {
  23. struct mpic *mpic = mpic_alloc(NULL, 0,
  24. MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU,
  25. 0, 256, " OpenPIC ");
  26. BUG_ON(mpic == NULL);
  27. mpic_init(mpic);
  28. }
  29. /*
  30. * Setup the architecture
  31. */
  32. static void __init mvme2500_setup_arch(void)
  33. {
  34. if (ppc_md.progress)
  35. ppc_md.progress("mvme2500_setup_arch()", 0);
  36. fsl_pci_assign_primary();
  37. pr_info("MVME2500 board from Artesyn\n");
  38. }
  39. machine_arch_initcall(mvme2500, mpc85xx_common_publish_devices);
  40. /*
  41. * Called very early, device-tree isn't unflattened
  42. */
  43. static int __init mvme2500_probe(void)
  44. {
  45. return of_machine_is_compatible("artesyn,MVME2500");
  46. }
  47. define_machine(mvme2500) {
  48. .name = "MVME2500",
  49. .probe = mvme2500_probe,
  50. .setup_arch = mvme2500_setup_arch,
  51. .init_IRQ = mvme2500_pic_init,
  52. #ifdef CONFIG_PCI
  53. .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
  54. .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
  55. #endif
  56. .get_irq = mpic_get_irq,
  57. .calibrate_decr = generic_calibrate_decr,
  58. .progress = udbg_progress,
  59. };