diff options
author | Niklaus Giger <niklaus.giger@member.fsf.org> | 2008-10-01 15:23:23 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-10-17 13:28:05 -0400 |
commit | 9fa126da4a9addec77db4663933ed592188a0741 (patch) | |
tree | cdcc1948bd078249447d608a7c348c6cda44491b /arch/powerpc/platforms | |
parent | 4cbfc467cc08976e74a6f203c404e728d4dbd902 (diff) |
powerpc/40x: Add support for Netstal HCU4 board
Adds support for a HCU4 PPC405GPr based board from Netstal Maschinen AG.
Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/40x/Kconfig | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/hcu4.c | 61 |
3 files changed, 70 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig index 72ba3a7289fe..9bd152553050 100644 --- a/arch/powerpc/platforms/40x/Kconfig +++ b/arch/powerpc/platforms/40x/Kconfig | |||
@@ -32,6 +32,14 @@ config EP405 | |||
32 | help | 32 | help |
33 | This option enables support for the EP405/EP405PC boards. | 33 | This option enables support for the EP405/EP405PC boards. |
34 | 34 | ||
35 | config HCU4 | ||
36 | bool "Hcu4" | ||
37 | depends on 40x | ||
38 | default y | ||
39 | select 405GPR | ||
40 | help | ||
41 | This option enables support for the Nestal Maschinen HCU4 board. | ||
42 | |||
35 | config KILAUEA | 43 | config KILAUEA |
36 | bool "Kilauea" | 44 | bool "Kilauea" |
37 | depends on 40x | 45 | depends on 40x |
diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile index 1d93273a1db1..9bab76a652a6 100644 --- a/arch/powerpc/platforms/40x/Makefile +++ b/arch/powerpc/platforms/40x/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | obj-$(CONFIG_KILAUEA) += kilauea.o | 1 | obj-$(CONFIG_KILAUEA) += kilauea.o |
2 | obj-$(CONFIG_HCU4) += hcu4.o | ||
2 | obj-$(CONFIG_MAKALU) += makalu.o | 3 | obj-$(CONFIG_MAKALU) += makalu.o |
3 | obj-$(CONFIG_WALNUT) += walnut.o | 4 | obj-$(CONFIG_WALNUT) += walnut.o |
4 | obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o | 5 | obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o |
diff --git a/arch/powerpc/platforms/40x/hcu4.c b/arch/powerpc/platforms/40x/hcu4.c new file mode 100644 index 000000000000..60b2afecab75 --- /dev/null +++ b/arch/powerpc/platforms/40x/hcu4.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Architecture- / platform-specific boot-time initialization code for | ||
3 | * IBM PowerPC 4xx based boards. Adapted from original | ||
4 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek | ||
5 | * <dan@net4x.com>. | ||
6 | * | ||
7 | * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu> | ||
8 | * | ||
9 | * Rewritten and ported to the merged powerpc tree: | ||
10 | * Copyright 2007 IBM Corporation | ||
11 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
12 | * | ||
13 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
14 | * the terms of the GNU General Public License version 2. This program | ||
15 | * is licensed "as is" without any warranty of any kind, whether express | ||
16 | * or implied. | ||
17 | */ | ||
18 | |||
19 | #include <linux/init.h> | ||
20 | #include <linux/of_platform.h> | ||
21 | |||
22 | #include <asm/machdep.h> | ||
23 | #include <asm/prom.h> | ||
24 | #include <asm/udbg.h> | ||
25 | #include <asm/time.h> | ||
26 | #include <asm/uic.h> | ||
27 | #include <asm/ppc4xx.h> | ||
28 | |||
29 | static __initdata struct of_device_id hcu4_of_bus[] = { | ||
30 | { .compatible = "ibm,plb3", }, | ||
31 | { .compatible = "ibm,opb", }, | ||
32 | { .compatible = "ibm,ebc", }, | ||
33 | {}, | ||
34 | }; | ||
35 | |||
36 | static int __init hcu4_device_probe(void) | ||
37 | { | ||
38 | of_platform_bus_probe(NULL, hcu4_of_bus, NULL); | ||
39 | return 0; | ||
40 | } | ||
41 | machine_device_initcall(hcu4, hcu4_device_probe); | ||
42 | |||
43 | static int __init hcu4_probe(void) | ||
44 | { | ||
45 | unsigned long root = of_get_flat_dt_root(); | ||
46 | |||
47 | if (!of_flat_dt_is_compatible(root, "netstal,hcu4")) | ||
48 | return 0; | ||
49 | |||
50 | return 1; | ||
51 | } | ||
52 | |||
53 | define_machine(hcu4) { | ||
54 | .name = "HCU4", | ||
55 | .probe = hcu4_probe, | ||
56 | .progress = udbg_progress, | ||
57 | .init_IRQ = uic_init_tree, | ||
58 | .get_irq = uic_get_irq, | ||
59 | .restart = ppc4xx_reset_system, | ||
60 | .calibrate_decr = generic_calibrate_decr, | ||
61 | }; | ||