diff options
author | wanzongshun <mcuos.com@gmail.com> | 2009-08-21 02:09:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-02 06:22:24 -0400 |
commit | 8e22676e56673494a15ba95b57af21eb47d8b98a (patch) | |
tree | 19bd69d853e61b9a45688d65f01b22c078faee45 | |
parent | 936fbe9efc96d40c8cdc23bba31a3beaad4f96c1 (diff) |
ARM: 5684/1: Add nuc960 platform to w90x900
Add nuc960 platform to w90x900.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-w90x900/Kconfig | 15 | ||||
-rw-r--r-- | arch/arm/mach-w90x900/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-w90x900/mach-nuc960evb.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-w90x900/nuc960.c | 54 | ||||
-rw-r--r-- | arch/arm/mach-w90x900/nuc960.h | 28 |
5 files changed, 143 insertions, 0 deletions
diff --git a/arch/arm/mach-w90x900/Kconfig b/arch/arm/mach-w90x900/Kconfig index 163b8010e575..69bab32a8bc2 100644 --- a/arch/arm/mach-w90x900/Kconfig +++ b/arch/arm/mach-w90x900/Kconfig | |||
@@ -10,6 +10,11 @@ config CPU_NUC950 | |||
10 | help | 10 | help |
11 | Support for NUCP950 of Nuvoton NUC900 CPUs. | 11 | Support for NUCP950 of Nuvoton NUC900 CPUs. |
12 | 12 | ||
13 | config CPU_NUC960 | ||
14 | bool | ||
15 | help | ||
16 | Support for NUCP960 of Nuvoton NUC900 CPUs. | ||
17 | |||
13 | menu "W90P910 Machines" | 18 | menu "W90P910 Machines" |
14 | 19 | ||
15 | config MACH_W90P910EVB | 20 | config MACH_W90P910EVB |
@@ -31,4 +36,14 @@ config MACH_W90P950EVB | |||
31 | 36 | ||
32 | endmenu | 37 | endmenu |
33 | 38 | ||
39 | menu "NUC960 Machines" | ||
40 | |||
41 | config MACH_W90N960EVB | ||
42 | bool "Nuvoton NUC960 Evaluation Board" | ||
43 | select CPU_NUC960 | ||
44 | help | ||
45 | Say Y here if you are using the Nuvoton NUC960EVB | ||
46 | |||
47 | endmenu | ||
48 | |||
34 | endif | 49 | endif |
diff --git a/arch/arm/mach-w90x900/Makefile b/arch/arm/mach-w90x900/Makefile index a4622b577a2c..828c0326441e 100644 --- a/arch/arm/mach-w90x900/Makefile +++ b/arch/arm/mach-w90x900/Makefile | |||
@@ -10,8 +10,10 @@ obj-y += clksel.o dev.o cpu.o | |||
10 | 10 | ||
11 | obj-$(CONFIG_CPU_W90P910) += nuc910.o | 11 | obj-$(CONFIG_CPU_W90P910) += nuc910.o |
12 | obj-$(CONFIG_CPU_NUC950) += nuc950.o | 12 | obj-$(CONFIG_CPU_NUC950) += nuc950.o |
13 | obj-$(CONFIG_CPU_NUC960) += nuc960.o | ||
13 | 14 | ||
14 | # machine support | 15 | # machine support |
15 | 16 | ||
16 | obj-$(CONFIG_MACH_W90P910EVB) += mach-nuc910evb.o | 17 | obj-$(CONFIG_MACH_W90P910EVB) += mach-nuc910evb.o |
17 | obj-$(CONFIG_MACH_W90P950EVB) += mach-nuc950evb.o | 18 | obj-$(CONFIG_MACH_W90P950EVB) += mach-nuc950evb.o |
19 | obj-$(CONFIG_MACH_W90N960EVB) += mach-nuc960evb.o | ||
diff --git a/arch/arm/mach-w90x900/mach-nuc960evb.c b/arch/arm/mach-w90x900/mach-nuc960evb.c new file mode 100644 index 000000000000..e3a46f19f2bc --- /dev/null +++ b/arch/arm/mach-w90x900/mach-nuc960evb.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-w90x900/mach-nuc960evb.c | ||
3 | * | ||
4 | * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche | ||
5 | * | ||
6 | * Copyright (C) 2008 Nuvoton technology corporation. | ||
7 | * | ||
8 | * Wan ZongShun <mcuos.com@gmail.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License as | ||
12 | * published by the Free Software Foundation;version 2 of the License. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <linux/platform_device.h> | ||
17 | #include <asm/mach/arch.h> | ||
18 | #include <asm/mach/map.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | #include <mach/map.h> | ||
21 | |||
22 | #include "nuc960.h" | ||
23 | |||
24 | static void __init nuc960evb_map_io(void) | ||
25 | { | ||
26 | nuc960_map_io(); | ||
27 | nuc960_init_clocks(); | ||
28 | } | ||
29 | |||
30 | static void __init nuc960evb_init(void) | ||
31 | { | ||
32 | nuc960_board_init(); | ||
33 | } | ||
34 | |||
35 | MACHINE_START(W90N960EVB, "W90N960EVB") | ||
36 | /* Maintainer: Wan ZongShun */ | ||
37 | .phys_io = W90X900_PA_UART, | ||
38 | .io_pg_offst = (((u32)W90X900_VA_UART) >> 18) & 0xfffc, | ||
39 | .boot_params = 0, | ||
40 | .map_io = nuc960evb_map_io, | ||
41 | .init_irq = nuc900_init_irq, | ||
42 | .init_machine = nuc960evb_init, | ||
43 | .timer = &nuc900_timer, | ||
44 | MACHINE_END | ||
diff --git a/arch/arm/mach-w90x900/nuc960.c b/arch/arm/mach-w90x900/nuc960.c new file mode 100644 index 000000000000..8851a3a27ce2 --- /dev/null +++ b/arch/arm/mach-w90x900/nuc960.c | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-w90x900/nuc960.c | ||
3 | * | ||
4 | * Based on linux/arch/arm/plat-s3c24xx/s3c244x.c by Ben Dooks | ||
5 | * | ||
6 | * Copyright (c) 2008 Nuvoton technology corporation. | ||
7 | * | ||
8 | * Wan ZongShun <mcuos.com@gmail.com> | ||
9 | * | ||
10 | * NUC960 cpu support | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation;version 2 of the License. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #include <linux/platform_device.h> | ||
19 | #include <asm/mach/map.h> | ||
20 | #include <mach/hardware.h> | ||
21 | #include "cpu.h" | ||
22 | |||
23 | /* define specific CPU platform device */ | ||
24 | |||
25 | static struct platform_device *nuc960_dev[] __initdata = { | ||
26 | &nuc900_device_kpi, | ||
27 | &nuc900_device_fmi, | ||
28 | }; | ||
29 | |||
30 | /* define specific CPU platform io map */ | ||
31 | |||
32 | static struct map_desc nuc960evb_iodesc[] __initdata = { | ||
33 | }; | ||
34 | |||
35 | /*Init NUC960 evb io*/ | ||
36 | |||
37 | void __init nuc960_map_io(void) | ||
38 | { | ||
39 | nuc900_map_io(nuc960evb_iodesc, ARRAY_SIZE(nuc960evb_iodesc)); | ||
40 | } | ||
41 | |||
42 | /*Init NUC960 clock*/ | ||
43 | |||
44 | void __init nuc960_init_clocks(void) | ||
45 | { | ||
46 | nuc900_init_clocks(); | ||
47 | } | ||
48 | |||
49 | /*Init NUC960 board info*/ | ||
50 | |||
51 | void __init nuc960_board_init(void) | ||
52 | { | ||
53 | nuc900_board_init(nuc960_dev, ARRAY_SIZE(nuc960_dev)); | ||
54 | } | ||
diff --git a/arch/arm/mach-w90x900/nuc960.h b/arch/arm/mach-w90x900/nuc960.h new file mode 100644 index 000000000000..f0c07cbe3a82 --- /dev/null +++ b/arch/arm/mach-w90x900/nuc960.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/nuc960.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton corporation | ||
5 | * | ||
6 | * Header file for NUC900 CPU support | ||
7 | * | ||
8 | * Wan ZongShun <mcuos.com@gmail.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | struct map_desc; | ||
17 | struct sys_timer; | ||
18 | |||
19 | /* core initialisation functions */ | ||
20 | |||
21 | extern void nuc900_init_irq(void); | ||
22 | extern struct sys_timer nuc900_timer; | ||
23 | |||
24 | /* extern file from nuc960.c */ | ||
25 | |||
26 | extern void nuc960_board_init(void); | ||
27 | extern void nuc960_init_clocks(void); | ||
28 | extern void nuc960_map_io(void); | ||