diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-10-01 22:15:29 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2007-10-03 08:23:14 -0400 |
commit | 486ba7e6418b69143701f6772e8864d9299178b8 (patch) | |
tree | d6790c6041ce781fdf76d5b3e3b48156406a9d78 | |
parent | 4dc9783ea9e4d6f97e40b808991b324a4719a837 (diff) |
[POWERPC] Virtex: Add generic Xilinx Virtex board support
Adds support for generic Xilinx Virtex boards. Any board which specifies
"xilinx,virtex" in the compatible property will make use of this board
support.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
-rw-r--r-- | arch/powerpc/platforms/40x/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/virtex.c | 50 |
2 files changed, 51 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile index e6c0bbd063a4..0a3cfe99a7ed 100644 --- a/arch/powerpc/platforms/40x/Makefile +++ b/arch/powerpc/platforms/40x/Makefile | |||
@@ -1 +1,2 @@ | |||
1 | obj-$(CONFIG_WALNUT) += walnut.o | 1 | obj-$(CONFIG_WALNUT) += walnut.o |
2 | obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o | ||
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c new file mode 100644 index 000000000000..b52aa94abd78 --- /dev/null +++ b/arch/powerpc/platforms/40x/virtex.c | |||
@@ -0,0 +1,50 @@ | |||
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 | |||
18 | static int __init virtex_device_probe(void) | ||
19 | { | ||
20 | if (!machine_is(virtex)) | ||
21 | return 0; | ||
22 | |||
23 | of_platform_bus_probe(NULL, NULL, NULL); | ||
24 | |||
25 | return 0; | ||
26 | } | ||
27 | device_initcall(virtex_device_probe); | ||
28 | |||
29 | static int __init virtex_probe(void) | ||
30 | { | ||
31 | unsigned long root = of_get_flat_dt_root(); | ||
32 | |||
33 | if (!of_flat_dt_is_compatible(root, "xilinx,virtex")) | ||
34 | return 0; | ||
35 | |||
36 | return 1; | ||
37 | } | ||
38 | |||
39 | static void __init virtex_setup_arch(void) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | define_machine(virtex) { | ||
44 | .name = "Xilinx Virtex", | ||
45 | .probe = virtex_probe, | ||
46 | .setup_arch = virtex_setup_arch, | ||
47 | .init_IRQ = xilinx_intc_init_tree, | ||
48 | .get_irq = xilinx_intc_get_irq, | ||
49 | .calibrate_decr = generic_calibrate_decr, | ||
50 | }; | ||