mpc8536_ds.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * MPC8536 DS Board Setup
  3. *
  4. * Copyright 2008 Freescale Semiconductor, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation; either version 2 of the License, or (at your
  9. * option) any later version.
  10. */
  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>
  18. #include <linux/of_platform.h>
  19. #include <asm/time.h>
  20. #include <asm/machdep.h>
  21. #include <asm/pci-bridge.h>
  22. #include <mm/mmu_decl.h>
  23. #include <asm/prom.h>
  24. #include <asm/udbg.h>
  25. #include <asm/mpic.h>
  26. #include <asm/swiotlb.h>
  27. #include <sysdev/fsl_soc.h>
  28. #include <sysdev/fsl_pci.h>
  29. #include "mpc85xx.h"
  30. void __init mpc8536_ds_pic_init(void)
  31. {
  32. struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
  33. 0, 256, " OpenPIC ");
  34. BUG_ON(mpic == NULL);
  35. mpic_init(mpic);
  36. }
  37. /*
  38. * Setup the architecture
  39. */
  40. static void __init mpc8536_ds_setup_arch(void)
  41. {
  42. if (ppc_md.progress)
  43. ppc_md.progress("mpc8536_ds_setup_arch()", 0);
  44. fsl_pci_assign_primary();
  45. swiotlb_detect_4g();
  46. printk("MPC8536 DS board from Freescale Semiconductor\n");
  47. }
  48. machine_arch_initcall(mpc8536_ds, mpc85xx_common_publish_devices);
  49. machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier);
  50. /*
  51. * Called very early, device-tree isn't unflattened
  52. */
  53. static int __init mpc8536_ds_probe(void)
  54. {
  55. return of_machine_is_compatible("fsl,mpc8536ds");
  56. }
  57. define_machine(mpc8536_ds) {
  58. .name = "MPC8536 DS",
  59. .probe = mpc8536_ds_probe,
  60. .setup_arch = mpc8536_ds_setup_arch,
  61. .init_IRQ = mpc8536_ds_pic_init,
  62. #ifdef CONFIG_PCI
  63. .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
  64. .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
  65. #endif
  66. .get_irq = mpic_get_irq,
  67. .calibrate_decr = generic_calibrate_decr,
  68. .progress = udbg_progress,
  69. };