• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
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/ppc4xx.h>
18 
19 static struct of_device_id xilinx_of_bus_ids[] __initdata = {
20 	{ .compatible = "xlnx,plb-v46-1.00.a", },
21 	{ .compatible = "xlnx,plb-v34-1.01.a", },
22 	{ .compatible = "xlnx,plb-v34-1.02.a", },
23 	{ .compatible = "xlnx,opb-v20-1.10.c", },
24 	{ .compatible = "xlnx,dcr-v29-1.00.a", },
25 	{ .compatible = "xlnx,compound", },
26 	{}
27 };
28 
virtex_device_probe(void)29 static int __init virtex_device_probe(void)
30 {
31 	of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
32 
33 	return 0;
34 }
35 machine_device_initcall(virtex, virtex_device_probe);
36 
virtex_probe(void)37 static int __init virtex_probe(void)
38 {
39 	unsigned long root = of_get_flat_dt_root();
40 
41 	if (!of_flat_dt_is_compatible(root, "xlnx,virtex"))
42 		return 0;
43 
44 	return 1;
45 }
46 
define_machine(virtex)47 define_machine(virtex) {
48 	.name			= "Xilinx Virtex",
49 	.probe			= virtex_probe,
50 	.init_IRQ		= xilinx_intc_init_tree,
51 	.get_irq		= xilinx_intc_get_irq,
52 	.restart		= ppc4xx_reset_system,
53 	.calibrate_decr		= generic_calibrate_decr,
54 };
55