virtex.c 1.3 KB

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