virtex.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Xilinx Virtex 5FXT based board support, derived from
  3. * the Xilinx Virtex (IIpro & 4FX) based board support
  4. *
  5. * Copyright 2007 Secret Lab Technologies Ltd.
  6. * Copyright 2008 Xilinx, Inc.
  7. *
  8. * This file is licensed under the terms of the GNU General Public License
  9. * version 2. This program is licensed "as is" without any warranty of any
  10. * kind, whether express or implied.
  11. */
  12. #include <linux/init.h>
  13. #include <linux/of_platform.h>
  14. #include <asm/machdep.h>
  15. #include <asm/prom.h>
  16. #include <asm/time.h>
  17. #include <asm/xilinx_intc.h>
  18. #include <asm/xilinx_pci.h>
  19. #include <asm/reg.h>
  20. #include <asm/ppc4xx.h>
  21. #include "44x.h"
  22. static struct of_device_id xilinx_of_bus_ids[] __initdata = {
  23. { .compatible = "simple-bus", },
  24. { .compatible = "xlnx,plb-v46-1.00.a", },
  25. { .compatible = "xlnx,plb-v46-1.02.a", },
  26. { .compatible = "xlnx,plb-v34-1.01.a", },
  27. { .compatible = "xlnx,plb-v34-1.02.a", },
  28. { .compatible = "xlnx,opb-v20-1.10.c", },
  29. { .compatible = "xlnx,dcr-v29-1.00.a", },
  30. { .compatible = "xlnx,compound", },
  31. {}
  32. };
  33. static int __init virtex_device_probe(void)
  34. {
  35. of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
  36. return 0;
  37. }
  38. machine_device_initcall(virtex, virtex_device_probe);
  39. static int __init virtex_probe(void)
  40. {
  41. unsigned long root = of_get_flat_dt_root();
  42. if (!of_flat_dt_is_compatible(root, "xlnx,virtex440"))
  43. return 0;
  44. return 1;
  45. }
  46. define_machine(virtex) {
  47. .name = "Xilinx Virtex440",
  48. .probe = virtex_probe,
  49. .setup_arch = xilinx_pci_init,
  50. .init_IRQ = xilinx_intc_init_tree,
  51. .get_irq = xilinx_intc_get_irq,
  52. .calibrate_decr = generic_calibrate_decr,
  53. .restart = ppc4xx_reset_system,
  54. };