1
2
3
4
5
6
7
8
9
10
11#include <linux/init.h>
12#include <linux/of_platform.h>
13#include <asm/machdep.h>
14#include <asm/prom.h>
15#include <asm/time.h>
16#include <asm/xilinx_intc.h>
17#include <asm/xilinx_pci.h>
18#include <asm/ppc4xx.h>
19
20static const struct of_device_id xilinx_of_bus_ids[] __initconst = {
21 { .compatible = "xlnx,plb-v46-1.00.a", },
22 { .compatible = "xlnx,plb-v34-1.01.a", },
23 { .compatible = "xlnx,plb-v34-1.02.a", },
24 { .compatible = "xlnx,opb-v20-1.10.c", },
25 { .compatible = "xlnx,dcr-v29-1.00.a", },
26 { .compatible = "xlnx,compound", },
27 {}
28};
29
30static int __init virtex_device_probe(void)
31{
32 of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
33
34 return 0;
35}
36machine_device_initcall(virtex, virtex_device_probe);
37
38static int __init virtex_probe(void)
39{
40 if (!of_machine_is_compatible("xlnx,virtex"))
41 return 0;
42
43 return 1;
44}
45
46define_machine(virtex) {
47 .name = "Xilinx Virtex",
48 .probe = virtex_probe,
49 .setup_arch = xilinx_pci_init,
50 .init_IRQ = xilinx_intc_init_tree,
51 .get_irq = xintc_get_irq,
52 .restart = ppc4xx_reset_system,
53 .calibrate_decr = generic_calibrate_decr,
54};
55