ARM: Add Winbond/Nuvoton NUC93X Platform support
Subsystems (2)
PATCH 1/1 ARM: Add Winbond/Nuvoton NUC93X Platform support
Dear Russell,
Sorry for sending wrong lists.arm.linux.org.uk <mailto:[email protected]>maillist, re-submitted it.
The previous nuc932 support patches have been discarded by me and because it belongs to
another SoCs series named nuc93x,at present, which included nuc931 and nuc932, I think it is
better to create a new mach-nuc93x,So I made the patch,and request your advice.Thanks!
---arch/arm/Kconfig | 11 ++arch/arm/Makefile | 1 +arch/arm/mach-nuc93x/Kconfig | 19 +++arch/arm/mach-nuc93x/Makefile | 14 +++arch/arm/mach-nuc93x/Makefile.boot | 3 +arch/arm/mach-nuc93x/clock.c | 83 ++++++++++++++arch/arm/mach-nuc93x/clock.h | 36 ++++++
arch/arm/mach-nuc93x/cpu.c | 135 ++++++++++++++++++++++ arch/arm/mach-nuc93x/cpu.h | 48 ++++++++ arch/arm/mach-nuc93x/dev.c | 42 +++++++
arch/arm/mach-nuc93x/include/mach/clkdev.h | 7 + arch/arm/mach-nuc93x/include/mach/entry-macro.S | 32 +++++ arch/arm/mach-nuc93x/include/mach/hardware.h | 22 ++++ arch/arm/mach-nuc93x/include/mach/io.h | 28 +++++ arch/arm/mach-nuc93x/include/mach/irqs.h | 59 ++++++++++ arch/arm/mach-nuc93x/include/mach/map.h | 139 +++++++++++++++++++++++ arch/arm/mach-nuc93x/include/mach/memory.h | 21 ++++ arch/arm/mach-nuc93x/include/mach/regs-clock.h | 53 +++++++++ arch/arm/mach-nuc93x/include/mach/regs-ebi.h | 33 ++++++ arch/arm/mach-nuc93x/include/mach/regs-irq.h | 42 +++++++ arch/arm/mach-nuc93x/include/mach/regs-serial.h | 52 +++++++++ arch/arm/mach-nuc93x/include/mach/regs-timer.h | 28 +++++ arch/arm/mach-nuc93x/include/mach/system.h | 28 +++++ arch/arm/mach-nuc93x/include/mach/timex.h | 25 ++++ arch/arm/mach-nuc93x/include/mach/uncompress.h | 50 ++++++++ arch/arm/mach-nuc93x/include/mach/vmalloc.h | 23 ++++ arch/arm/mach-nuc93x/irq.c | 66 +++++++++++ arch/arm/mach-nuc93x/mach-nuc932evb.c | 45 ++++++++ arch/arm/mach-nuc93x/nuc932.c | 65 +++++++++++ arch/arm/mach-nuc93x/nuc932.h | 29 +++++ arch/arm/mach-nuc93x/time.c | 100 ++++++++++++++++
31 files changed, 1339 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-nuc93x/Kconfig
create mode 100644 arch/arm/mach-nuc93x/Makefile
create mode 100644 arch/arm/mach-nuc93x/Makefile.boot create mode 100644 arch/arm/mach-nuc93x/clock.c
create mode 100644 arch/arm/mach-nuc93x/clock.h
create mode 100644 arch/arm/mach-nuc93x/cpu.c
create mode 100644 arch/arm/mach-nuc93x/cpu.h
create mode 100644 arch/arm/mach-nuc93x/dev.c
create mode 100644 arch/arm/mach-nuc93x/include/mach/clkdev.h create mode 100644 arch/arm/mach-nuc93x/include/mach/entry-macro.S create mode 100644 arch/arm/mach-nuc93x/include/mach/hardware.h create mode 100644 arch/arm/mach-nuc93x/include/mach/io.h create mode 100644 arch/arm/mach-nuc93x/include/mach/irqs.h create mode 100644 arch/arm/mach-nuc93x/include/mach/map.h create mode 100644 arch/arm/mach-nuc93x/include/mach/memory.h create mode 100644 arch/arm/mach-nuc93x/include/mach/regs-clock.h create mode 100644 arch/arm/mach-nuc93x/include/mach/regs-ebi.h create mode 100644 arch/arm/mach-nuc93x/include/mach/regs-irq.h create mode 100644 arch/arm/mach-nuc93x/include/mach/regs-serial.h create mode 100644 arch/arm/mach-nuc93x/include/mach/regs-timer.h create mode 100644 arch/arm/mach-nuc93x/include/mach/system.h create mode 100644 arch/arm/mach-nuc93x/include/mach/timex.h create mode 100644 arch/arm/mach-nuc93x/include/mach/uncompress.h create mode 100644 arch/arm/mach-nuc93x/include/mach/vmalloc.h create mode 100644 arch/arm/mach-nuc93x/irq.c
create mode 100644 arch/arm/mach-nuc93x/mach-nuc932evb.c create mode 100644 arch/arm/mach-nuc93x/nuc932.c
create mode 100644 arch/arm/mach-nuc93x/nuc932.h
create mode 100644 arch/arm/mach-nuc93x/time.c
arch/arm/Kconfig +0 -0
@@ -548,6 +548,15 @@ config ARCH_W90X900
<http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/
ConsumerElectronicsIC/ARMMicrocontroller/ARMMicrocontroller>
+config ARCH_NUC93X
+ bool "Nuvoton NUC93X CPU"
+ select CPU_ARM926T
+ select HAVE_CLK
+ select COMMON_CLKDEV
+ help
+ Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a
+ low-power and high performance MPEG-4/JPEG multimedia controller chip. +
config ARCH_PNX4008
bool "Philips Nexperia PNX4008 Mobile"
select CPU_ARM926T
@@ -828,6 +837,8 @@ source "arch/arm/mach-u300/Kconfig"
source "arch/arm/mach-w90x900/Kconfig"
+source "arch/arm/mach-nuc93x/Kconfig"
+
source "arch/arm/mach-bcmring/Kconfig"
source "arch/arm/mach-ux500/Kconfig"
arch/arm/Makefile +0 -0
@@ -170,6 +170,7 @@ machine-$(CONFIG_ARCH_U300) := u300
machine-$(CONFIG_ARCH_U8500) := ux500
machine-$(CONFIG_ARCH_VERSATILE) := versatile
machine-$(CONFIG_ARCH_W90X900) := w90x900
+machine-$(CONFIG_ARCH_NUC93X) := nuc93x
machine-$(CONFIG_FOOTBRIDGE) := footbridge
machine-$(CONFIG_ARCH_MXC91231) := mxc91231
arch/arm/mach-nuc93x/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +if ARCH_NUC93X + +config CPU_NUC932 + bool + help + Support for NUC932 of Nuvoton NUC93X CPUs. + +menu "NUC932 Machines" + +config MACH_NUC932EVB + bool "Nuvoton NUC932 Evaluation Board" + default y + select CPU_NUC932 + help + Say Y here if you are using the Nuvoton NUC932EVB + +endmenu + +endif
arch/arm/mach-nuc93x/Makefile new file +14 -0
@@ -0,0 +1,14 @@ +# +# Makefile for the linux kernel. +# + +# Object file lists. + +obj-y := irq.o time.o dev.o cpu.o clock.o +# NUC932 CPU support files + +obj-$(CONFIG_CPU_NUC932) += nuc932.o + +# machine support + +obj-$(CONFIG_MACH_NUC932EVB) += mach-nuc932evb.o
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/Makefile.boot
new file mode 100644
index 0000000..a057b54
arch/arm/mach-nuc93x/Makefile.boot new file +3 -0
@@ -0,0 +1,3 @@ +zreladdr-y := 0x00008000 +params_phys-y := 0x00000100 +
arch/arm/mach-nuc93x/clock.c new file +83 -0
83 lines not on this page · raw message
arch/arm/mach-nuc93x/clock.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* linux/arch/arm/mach-nuc93x/clock.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* +* Wan ZongShun <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License. +*/ + +#include <asm/clkdev.h> + +void nuc93x_clk_enable (struct clk *clk,int enable); +void clks_register (struct clk_lookup *clks,size_t num); + +struct clk { +unsigned long cken; +unsigned int enabled; +void (*enable)(struct clk *,int enable); +}; + +#define DEFINE_CLK (_name, _ctrlbit) \ +struct clk clk_##_name = { \ + .enable = nuc93x_clk_enable, \ + .cken = (1 << _ctrlbit), \ + } + +#define DEF_CLKLOOK (_clk, _devname, _conname) \ + { \ + .clk = _clk, \ + .dev_id = _devname, \ + .con_id = _conname, \ + } +
arch/arm/mach-nuc93x/cpu.c new file +135 -0
135 lines not on this page · raw message
arch/arm/mach-nuc93x/cpu.h new file +48 -0
48 lines not on this page · raw message
arch/arm/mach-nuc93x/dev.c new file +42 -0
42 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/clkdev.h
new file mode 100644
index 0000000..04b37a8
arch/arm/mach-nuc93x/include/mach/clkdev.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef __ASM_MACH_CLKDEV_H +#define __ASM_MACH_CLKDEV_H + +#define __clk_get (clk) ({ 1; }) +#define __clk_put (clk) do { } while (0) + +#endif
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/entry-macro.S
new file mode 100644
index 0000000..1352cbd
arch/arm/mach-nuc93x/include/mach/entry-macro.S new file +32 -0
@@ -0,0 +1,32 @@ +/* + * arch/arm/mach-nuc93x/include/mach/entry-macro.S + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + * + */ + +#include <mach/hardware.h> +#include <mach/regs-irq.h> + + .macro get_irqnr_preamble, base, tmp + .endm + + .macro arch_ret_to_user, tmp1, tmp2 + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + + mov \base, #AIC_BA + + ldr \irqnr, [ \base, #AIC_IPER] + ldr \irqnr, [ \base, #AIC_ISNR] + cmp \irqnr, #0 + + .endm + + /* currently don't need an disable_fiq macro */ + + .macro disable_fiq + .endm
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/hardware.h
new file mode 100644
index 0000000..fb5c6fc
arch/arm/mach-nuc93x/include/mach/hardware.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* arch/arm/mach-nuc93x/include/mach/hardware.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* All rights reserved. +* +* Wan ZongShun <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +*/ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include <asm/sizes.h> +#include <mach/map.h> + +#endif /* __ASM_ARCH_HARDWARE_H */
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/io.h
new file mode 100644
index 0000000..72e5051
arch/arm/mach-nuc93x/include/mach/io.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* arch/arm/mach-nuc93x/include/mach/io.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* All rights reserved. +* +* Wan ZongShun <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +*/ + +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +/* +* 1:1 mapping for ioremapped regions. +*/ + +#define __mem_pci (a) (a) +#define __io (a) __typesafe_io(a) + +#endif
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/irqs.h
new file mode 100644
index 0000000..7c4aa71
arch/arm/mach-nuc93x/include/mach/irqs.h new file +59 -0
59 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/map.h
new file mode 100644
index 0000000..fd0b5e8
arch/arm/mach-nuc93x/include/mach/map.h new file +139 -0
139 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/memory.h
new file mode 100644
index 0000000..323ab0d
arch/arm/mach-nuc93x/include/mach/memory.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* arch/arm/mach-nuc93x/include/mach/memory.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* All rights reserved. +* +* Wan ZongShun <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +*/ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +#define PHYS_OFFSET UL(0x00000000) + +#endif
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/regs-clock.h
new file mode 100644
index 0000000..5cb2954
arch/arm/mach-nuc93x/include/mach/regs-clock.h new file +53 -0
53 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/regs-ebi.h
new file mode 100644
index 0000000..3c72550
arch/arm/mach-nuc93x/include/mach/regs-ebi.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* arch/arm/mach-nuc93x/include/mach/regs-ebi.h +* +* Copyright (c) 2009 Nuvoton technology corporation. +* +* Wan ZongShun <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation;version 2 of the License. +* +*/ + +#ifndef __ASM_ARCH_REGS_EBI_H +#define __ASM_ARCH_REGS_EBI_H + +/* EBI Control Registers */ + +#define EBI_BA NUC93X_VA_EBI +#define REG_EBICON (EBI_BA + 0x00) +#define REG_ROMCON (EBI_BA + 0x04) +#define REG_SDCONF0 (EBI_BA + 0x08) +#define REG_SDCONF1 (EBI_BA + 0x0C) +#define REG_SDTIME0 (EBI_BA + 0x10) +#define REG_SDTIME1 (EBI_BA + 0x14) +#define REG_EXT0CON (EBI_BA + 0x18) +#define REG_EXT1CON (EBI_BA + 0x1C) +#define REG_EXT2CON (EBI_BA + 0x20) +#define REG_EXT3CON (EBI_BA + 0x24) +#define REG_EXT4CON (EBI_BA + 0x28) +#define REG_CKSKEW (EBI_BA + 0x2C) + +#endif /* __ASM_ARCH_REGS_EBI_H */
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/regs-irq.h
new file mode 100644
index 0000000..2302159
arch/arm/mach-nuc93x/include/mach/regs-irq.h new file +42 -0
42 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/regs-serial.h
new file mode 100644
index 0000000..767a047
arch/arm/mach-nuc93x/include/mach/regs-serial.h new file +52 -0
52 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/regs-timer.h
new file mode 100644
index 0000000..394be96
arch/arm/mach-nuc93x/include/mach/regs-timer.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* arch/arm/mach-nuc93x/include/mach/regs-timer.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* All rights reserved. +* +* Wan ZongShun <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +*/ + +#ifndef __ASM_ARCH_REGS_TIMER_H +#define __ASM_ARCH_REGS_TIMER_H + +/* Timer Registers */ + +#define TMR_BA NUC93X_VA_TIMER +#define REG_TCSR0 (TMR_BA+0x00) +#define REG_TICR0 (TMR_BA+0x08) +#define REG_TDR0 (TMR_BA+0x10) +#define REG_TISR (TMR_BA+0x18) +#define REG_WTCR (TMR_BA+0x1C) + +#endif /* __ASM_ARCH_REGS_TIMER_H */
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/system.h
new file mode 100644
index 0000000..d26bd9a
arch/arm/mach-nuc93x/include/mach/system.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* arch/arm/machnuc93x/include/mach/system.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* All rights reserved. +* +* Wan ZongShun <[email protected]> +* +* Based on arch/arm/mach-s3c2410/include/mach/system.h +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +*/ + +#include <asm/proc-fns.h> + +static void arch_idle (void ) +{ +} + +static void arch_reset (char mode,const char *cmd) +{ +cpu_reset (0 ); +} +
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/timex.h
new file mode 100644
index 0000000..0c719cc
arch/arm/mach-nuc93x/include/mach/timex.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* arch/arm/mach-nuc93x/include/mach/timex.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* All rights reserved. +* +* Wan ZongShun <[email protected]> +* +* Based on arch/arm/mach-s3c2410/include/mach/timex.h +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +*/ + +#ifndef __ASM_ARCH_TIMEX_H +#define __ASM_ARCH_TIMEX_H + +/* CLOCK_TICK_RATE Now, I don't use it. */ + +#define CLOCK_TICK_RATE 27000000 + +#endif /* __ASM_ARCH_TIMEX_H */
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/uncompress.h
new file mode 100644
index 0000000..73082cd
arch/arm/mach-nuc93x/include/mach/uncompress.h new file +50 -0
50 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/include/mach/vmalloc.h
new file mode 100644
index 0000000..98a21b8
arch/arm/mach-nuc93x/include/mach/vmalloc.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* arch/arm/mach-nuc93x/include/mach/vmalloc.h +* +* Copyright (c) 2008 Nuvoton technology corporation +* All rights reserved. +* +* Wan ZongShun <[email protected]> +* +* Based on arch/arm/mach-s3c2410/include/mach/vmalloc.h +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +*/ + +#ifndef __ASM_ARCH_VMALLOC_H +#define __ASM_ARCH_VMALLOC_H + +#define VMALLOC_END (0xE0000000) + +#endif /* __ASM_ARCH_VMALLOC_H */
arch/arm/mach-nuc93x/irq.c new file +66 -0
66 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/mach-nuc93x/mach-nuc932evb.c
new file mode 100644
index 0000000..9f79266
arch/arm/mach-nuc93x/mach-nuc932evb.c new file +45 -0
45 lines not on this page · raw message
arch/arm/mach-nuc93x/nuc932.c new file +65 -0
65 lines not on this page · raw message
arch/arm/mach-nuc93x/nuc932.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* arch/arm/mach-nuc93x/nuc932.h +* +* Copyright (c) 2008 Nuvoton corporation +* +* Header file for NUC93x CPU support +* +* Wan ZongShun <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +*/ + +struct map_desc ; +struct sys_timer ; + +/* core initialisation functions */ + +extern void nuc93x_init_irq (void ); +extern struct sys_timer nuc93x_timer; + +/* extern file from nuc932.c */ + +extern void nuc932_board_init (void ); +extern void nuc932_init_clocks (void ); +extern void nuc932_map_io (void ); +extern void nuc932_init_uartclk (void );
arch/arm/mach-nuc93x/time.c new file +100 -0
100 lines not on this page · raw message
Signature · 1 line
1.5.6.3