aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwanzongshun <mcuos.com@gmail.com>2009-08-21 02:09:03 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-02 06:22:24 -0400
commit8e22676e56673494a15ba95b57af21eb47d8b98a (patch)
tree19bd69d853e61b9a45688d65f01b22c078faee45
parent936fbe9efc96d40c8cdc23bba31a3beaad4f96c1 (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/Kconfig15
-rw-r--r--arch/arm/mach-w90x900/Makefile2
-rw-r--r--arch/arm/mach-w90x900/mach-nuc960evb.c44
-rw-r--r--arch/arm/mach-w90x900/nuc960.c54
-rw-r--r--arch/arm/mach-w90x900/nuc960.h28
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
13config CPU_NUC960
14 bool
15 help
16 Support for NUCP960 of Nuvoton NUC900 CPUs.
17
13menu "W90P910 Machines" 18menu "W90P910 Machines"
14 19
15config MACH_W90P910EVB 20config MACH_W90P910EVB
@@ -31,4 +36,14 @@ config MACH_W90P950EVB
31 36
32endmenu 37endmenu
33 38
39menu "NUC960 Machines"
40
41config 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
47endmenu
48
34endif 49endif
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
11obj-$(CONFIG_CPU_W90P910) += nuc910.o 11obj-$(CONFIG_CPU_W90P910) += nuc910.o
12obj-$(CONFIG_CPU_NUC950) += nuc950.o 12obj-$(CONFIG_CPU_NUC950) += nuc950.o
13obj-$(CONFIG_CPU_NUC960) += nuc960.o
13 14
14# machine support 15# machine support
15 16
16obj-$(CONFIG_MACH_W90P910EVB) += mach-nuc910evb.o 17obj-$(CONFIG_MACH_W90P910EVB) += mach-nuc910evb.o
17obj-$(CONFIG_MACH_W90P950EVB) += mach-nuc950evb.o 18obj-$(CONFIG_MACH_W90P950EVB) += mach-nuc950evb.o
19obj-$(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
24static void __init nuc960evb_map_io(void)
25{
26 nuc960_map_io();
27 nuc960_init_clocks();
28}
29
30static void __init nuc960evb_init(void)
31{
32 nuc960_board_init();
33}
34
35MACHINE_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,
44MACHINE_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
25static struct platform_device *nuc960_dev[] __initdata = {
26 &nuc900_device_kpi,
27 &nuc900_device_fmi,
28};
29
30/* define specific CPU platform io map */
31
32static struct map_desc nuc960evb_iodesc[] __initdata = {
33};
34
35/*Init NUC960 evb io*/
36
37void __init nuc960_map_io(void)
38{
39 nuc900_map_io(nuc960evb_iodesc, ARRAY_SIZE(nuc960evb_iodesc));
40}
41
42/*Init NUC960 clock*/
43
44void __init nuc960_init_clocks(void)
45{
46 nuc900_init_clocks();
47}
48
49/*Init NUC960 board info*/
50
51void __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
16struct map_desc;
17struct sys_timer;
18
19/* core initialisation functions */
20
21extern void nuc900_init_irq(void);
22extern struct sys_timer nuc900_timer;
23
24/* extern file from nuc960.c */
25
26extern void nuc960_board_init(void);
27extern void nuc960_init_clocks(void);
28extern void nuc960_map_io(void);