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