ARM: w90x900: add common nuc9xx.h
Subsystems (2)
PATCH 1/1 ARM: w90x900: add common nuc9xx.h
Rather than having separate extern declarations in nuc9*.h, provide a common header file containing these definitions.
---
This is a preparatory patch for fixing w90x900 for the restart changes, and is the last patch which is currently in linux-next without any appropriate acks.
arch/arm/mach-w90x900/irq.c | 2 ++ arch/arm/mach-w90x900/nuc910.h | 9 +-------- arch/arm/mach-w90x900/nuc950.h | 9 +-------- arch/arm/mach-w90x900/nuc960.h | 9 +-------- arch/arm/mach-w90x900/nuc9xx.h | 23 +++++++++++++++++++++++ arch/arm/mach-w90x900/time.c | 2 ++ 6 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 arch/arm/mach-w90x900/nuc9xx.h
arch/arm/mach-w90x900/irq.c +2 -0
@@ -28,6 +28,8 @@#include <mach/hardware.h> #include <mach/regs-irq.h> +#include "nuc9xx.h" +struct group_irq {unsigned long gpen;unsigned int enabled;
arch/arm/mach-w90x900/nuc910.h +1 -8
@@ -12,14 +12,7 @@* published by the Free Software Foundation. * */ - -struct map_desc ; -struct sys_timer ; - -/* core initialisation functions */ - -extern void nuc900_init_irq (void ); -extern struct sys_timer nuc900_timer; +#include "nuc9xx.h" /* extern file from nuc910.c */
arch/arm/mach-w90x900/nuc950.h +1 -8
@@ -12,14 +12,7 @@* published by the Free Software Foundation. * */ - -struct map_desc ; -struct sys_timer ; - -/* core initialisation functions */ - -extern void nuc900_init_irq (void ); -extern struct sys_timer nuc900_timer; +#include "nuc9xx.h" /* extern file from nuc950.c */
arch/arm/mach-w90x900/nuc960.h +1 -8
@@ -12,14 +12,7 @@* published by the Free Software Foundation. * */ - -struct map_desc ; -struct sys_timer ; - -/* core initialisation functions */ - -extern void nuc900_init_irq (void ); -extern struct sys_timer nuc900_timer; +#include "nuc9xx.h" /* extern file from nuc960.c */
arch/arm/mach-w90x900/nuc9xx.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* arch/arm/mach-w90x900/nuc9xx.h +* +* Copied from nuc910.h, which had: +* +* Copyright (c) 2008 Nuvoton corporation +* +* Header file for NUC900 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 nuc900_init_irq (void ); +extern struct sys_timer nuc900_timer;
arch/arm/mach-w90x900/time.c +2 -0
@@ -33,6 +33,8 @@#include <mach/map.h> #include <mach/regs-timer.h> +#include "nuc9xx.h" +#define RESETINT 0x1f#define PERIOD (0x01 << 27)#define ONESHOT (0x00 << 27)
Signature · 1 line
1.7.4.4
PATCH 1/1 ARM: w90x900: add common nuc9xx.h
2011/11/19 Russell King - ARM Linux <[email protected]>:
Quoted 4 lines
Rather than having separate extern declarations in nuc9*.h, provide a common header file containing these definitions.
Signed-off-by Russell King <[email protected]>
Quoted 133 lines
---
This is a preparatory patch for fixing w90x900 for the restart changes, and is the last patch which is currently in linux-next without any appropriate acks.?arch/arm/mach-w90x900/irq.c ? ?| ? ?2 ++ ?arch/arm/mach-w90x900/nuc910.h | ? ?9 +-------- ?arch/arm/mach-w90x900/nuc950.h | ? ?9 +-------- ?arch/arm/mach-w90x900/nuc960.h | ? ?9 +-------- ?arch/arm/mach-w90x900/nuc9xx.h | ? 23 +++++++++++++++++++++++ ?arch/arm/mach-w90x900/time.c ? | ? ?2 ++?6 files changed, 30 insertions(+), 24 deletions(-) ?create mode 100644
arch/arm/mach-w90x900/nuc9xx.harch/arm/mach-w90x900/irq.c +0
-0@@ -28,6 +28,8 @@?#include <
mach/hardware.h>
?#include <mach/regs-irq.h>arch/arm/mach-w90x900/irq.c +2
-0+#include "nuc9xx.h" +?struct
group_irq{
? ? ? ?unsigned long ? ? ? ? ? gpen;
? ? ? ?unsigned int ? ? ? ? ? ?enabled;arch/arm/mach-w90x900/nuc910.h +0
-0@@ -12,14 +12,7 @@?* published by the Free Software Foundation.
?*
?*/arch/arm/mach-w90x900/nuc910.h +1
-8- -struct map_desc ; -struct sys_timer ; - -/* core initialisation functions */ - -extern void nuc900_init_irq (void ); -extern struct sys_timer nuc900_timer; +#include "nuc9xx.h" ?/* extern file from
nuc910.c*/arch/arm/mach-w90x900/nuc950.h +0
-0@@ -12,14 +12,7 @@?* published by the Free Software Foundation.
?*
?*/arch/arm/mach-w90x900/nuc950.h +1
-8- -struct map_desc ; -struct sys_timer ; - -/* core initialisation functions */ - -extern void nuc900_init_irq (void ); -extern struct sys_timer nuc900_timer; +#include "nuc9xx.h" ?/* extern file from
nuc950.c*/arch/arm/mach-w90x900/nuc960.h +0
-0@@ -12,14 +12,7 @@?* published by the Free Software Foundation.
?*
?*/arch/arm/mach-w90x900/nuc960.h +1
-8- -struct map_desc ; -struct sys_timer ; - -/* core initialisation functions */ - -extern void nuc900_init_irq (void ); -extern struct sys_timer nuc900_timer; +#include "nuc9xx.h" ?/* extern file from
nuc960.c*/arch/arm/mach-w90x900/nuc9xx.h new file +23
-0@@ -0,0 +1,23 @@ +/* +* arch/arm/mach-w90x900/nuc9xx.h +* +* Copied from nuc910.h, which had: +* +* Copyright (c) 2008 Nuvoton corporation +* +* Header file for NUC900 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 nuc900_init_irq (void ); +extern struct sys_timer nuc900_timer;arch/arm/mach-w90x900/time.c +0
-0@@ -33,6 +33,8 @@?#include <
mach/map.h>
?#include <mach/regs-timer.h>arch/arm/mach-w90x900/time.c +2
-0+#include "nuc9xx.h" +?#define RESETINT ? ? ?
0x1f
?#define PERIOD ? ? ? ? (0x01<< 27)
?#define ONESHOT ? ? ? ? ? ? ? ?(0x00 << 27)
--
1.7.4.4
Signature · 2 lines
Wan ZongShun. www.mcuos.com
PATCH 1/1 ARM: w90x900: add common nuc9xx.h
Quoted 7 lines · Wan ZongShun
2011/11/19 Russell King - ARM Linux <[email protected]>:
Quoted 4 lines
Rather than having separate extern declarations in nuc9*.h, provide a common header file containing these definitions.
Signed-off-by Russell King <[email protected]>Tested-by Wan Zongshun <[email protected]>
Thanks.
Here's the follow-on patch for w90x900 for the restart fixups. Ack?
8<=====
ARM: restart: w90x900: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-w90x900/cpu.c | 16 ++++++++++++++++ arch/arm/mach-w90x900/include/mach/system.h | 17 ----------------- arch/arm/mach-w90x900/mach-nuc910evb.c | 1 + arch/arm/mach-w90x900/mach-nuc950evb.c | 1 + arch/arm/mach-w90x900/mach-nuc960evb.c | 1 + arch/arm/mach-w90x900/nuc9xx.h | 1 + 6 files changed, 20 insertions(+), 17 deletions(-)
arch/arm/mach-w90x900/cpu.c +16 -0
@@ -33,9 +33,11 @@#include <mach/regs-serial.h> #include <mach/regs-clock.h> #include <mach/regs-ebi.h> +#include <mach/regs-timer.h> #include "cpu.h" #include "clock.h" +#include "nuc9xx.h" /* Initial IO mappings */
@@ -222,3 +224,17 @@ void __init nuc900_init_clocks(void)clkdev_add_table (nuc900_clkregs,ARRAY_SIZE (nuc900_clkregs)); } +#define WTCR (TMR_BA + 0x1C) +#define WTCLK (1 << 10) +#define WTE (1 << 7) +#define WTRE (1 << 1) + +void nuc9xx_restart (char mode,const char *cmd) +{ +if (mode =='s' ) { +/* Jump into ROM@address 0 */ +soft_restart (0 ); + }else { +__raw_writel (WTE |WTRE |WTCLK ,WTCR ); + } +}
arch/arm/mach-w90x900/include/mach/system.h +0 -17
@@ -14,28 +14,11 @@* (at your option) any later version. * */ - -#include <linux/io.h> -#include <asm/proc-fns.h> -#include <mach/map.h> -#include <mach/regs-timer.h> - -#define WTCR (TMR_BA + 0x1C) -#define WTCLK (1 << 10) -#define WTE (1 << 7) -#define WTRE (1 << 1) -static void arch_idle (void ) { }static void arch_reset (char mode,const char *cmd) { -if (mode =='s' ) { -/* Jump into ROM@address 0 */ -soft_restart (0 ); - }else { -__raw_writel (WTE |WTRE |WTCLK ,WTCR ); - } }
arch/arm/mach-w90x900/mach-nuc910evb.c +1 -0
@@ -38,4 +38,5 @@ MACHINE_START(W90P910EVB, "W90P910EVB") .init_irq = nuc900_init_irq, .init_machine = nuc910evb_init, .timer = &nuc900_timer, + .restart = nuc9xx_restart,MACHINE_END
arch/arm/mach-w90x900/mach-nuc950evb.c +1 -0
@@ -41,4 +41,5 @@ MACHINE_START(W90P950EVB, "W90P950EVB") .init_irq = nuc900_init_irq, .init_machine = nuc950evb_init, .timer = &nuc900_timer, + .restart = nuc9xx_restart,MACHINE_END
arch/arm/mach-w90x900/mach-nuc960evb.c +1 -0
@@ -38,4 +38,5 @@ MACHINE_START(W90N960EVB, "W90N960EVB") .init_irq = nuc900_init_irq, .init_machine = nuc960evb_init, .timer = &nuc900_timer, + .restart = nuc9xx_restart,MACHINE_END
arch/arm/mach-w90x900/nuc9xx.h +1 -0
@@ -21,3 +21,4 @@ struct sys_timer;extern void nuc900_init_irq (void );extern struct sys_timer nuc900_timer; +extern void nuc9xx_restart (char ,const char *);
Signature · 1 line
1.7.4.4
PATCH 1/1 ARM: w90x900: add common nuc9xx.h
2011/11/25 Russell King - ARM Linux <[email protected]>:
Quoted 13 lines · Wan ZongShun
Quoted 7 lines
2011/11/19 Russell King - ARM Linux <[email protected]>:
Quoted 4 lines
Rather than having separate extern declarations in nuc9*.h, provide a common header file containing these definitions.
Signed-off-by Russell King <[email protected]>Tested-by Wan Zongshun <[email protected]>Thanks.
Here's the follow-on patch for w90x900 for the restart fixups. ?Ack?
Quoted 7 lines
8<=====
ARM: restart: w90x900: use new restart hookHook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
Thanks!
Quoted 120 lines
---
?arch/arm/mach-w90x900/cpu.c ? ? ? ? ? ? ? ? | ? 16 ++++++++++++++++ ?arch/arm/mach-w90x900/include/mach/system.h | ? 17 ----------------- ?arch/arm/mach-w90x900/mach-nuc910evb.c ? ? ?| ? ?1 + ?arch/arm/mach-w90x900/mach-nuc950evb.c ? ? ?| ? ?1 + ?arch/arm/mach-w90x900/mach-nuc960evb.c ? ? ?| ? ?1 + ?arch/arm/mach-w90x900/nuc9xx.h ? ? ? ? ? ? ?| ? ?1 +?6 files changed, 20 insertions(+), 17 deletions(-)
arch/arm/mach-w90x900/cpu.c +0
-0@@ -33,9 +33,11 @@?#include <
mach/regs-serial.h>
?#include <mach/regs-clock.h>
?#include <mach/regs-ebi.h>
+#include <mach/regs-timer.h>?#include "
cpu.h"
?#include "clock.h"
+#include "nuc9xx.h"?/* Initial IO mappings */
arch/arm/mach-w90x900/cpu.c +14
-0@@ -222,3 +224,17 @@ void __init nuc900_init_clocks(void) ? ? ? ?clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs)); ?} +#define ? ? ? ?WTCR ? ?(TMR_BA + 0x1C) +#define ? ? ? ?WTCLK ? (1 << 10) +#define ? ? ? ?WTE ? ? (1 << 7) +#define ? ? ? ?WTRE ? ?(1 << 1) + +void nuc9xx_restart (char mode,const char *cmd) +{ + ? ? ? if (mode == 's') { + ? ? ? ? ? ? ? /* Jump into ROM at address 0 */ + ? ? ? ? ? ? ? soft_restart(0); + ? ? ? } else { + ? ? ? ? ? ? ? __raw_writel(WTE | WTRE | WTCLK, WTCR); + ? ? ? } +}arch/arm/mach-w90x900/include/mach/system.h +0
-0@@ -14,28 +14,11 @@?* (at your option) any later version.
?*
?*/arch/arm/mach-w90x900/include/mach/system.h +0
-11- -#include <linux/io.h> -#include <asm/proc-fns.h> -#include <mach/map.h> -#include <mach/regs-timer.h> - -#define ? ? ? ?WTCR ? ?(TMR_BA + 0x1C) -#define ? ? ? ?WTCLK ? (1 << 10) -#define ? ? ? ?WTE ? ? (1 << 7) -#define ? ? ? ?WTRE ? ?(1 << 1) -?static void
arch_idle(void)
?{
?}?static void
arch_reset(char mode, const char *cmd)?{
- ? ? ? if (mode == 's') {
- ? ? ? ? ? ? ? /* Jump into ROM at address 0 */
- ? ? ? ? ? ? ?soft_restart(0);
- ? ? ? } else {
- ? ? ? ? ? ? ?__raw_writel(WTE | WTRE | WTCLK, WTCR);
- ? ? ? }
?}arch/arm/mach-w90x900/mach-nuc910evb.c +1
-0@@ -38,4 +38,5 @@ MACHINE_START(W90P910EVB, "W90P910EVB") ? ? ? ?.init_irq ? ? ? = nuc900_init_irq, ? ? ? ?.init_machine ? = nuc910evb_init, ? ? ? ?.timer ? ? ? ? ?= &nuc900_timer, + ? ? ? .restart ? ? ? ?= nuc9xx_restart,?MACHINE_END
arch/arm/mach-w90x900/mach-nuc950evb.c +1
-0@@ -41,4 +41,5 @@ MACHINE_START(W90P950EVB, "W90P950EVB") ? ? ? ?.init_irq ? ? ? = nuc900_init_irq, ? ? ? ?.init_machine ? = nuc950evb_init, ? ? ? ?.timer ? ? ? ? ?= &nuc900_timer, + ? ? ? .restart ? ? ? ?= nuc9xx_restart,?MACHINE_END
arch/arm/mach-w90x900/mach-nuc960evb.c +1
-0@@ -38,4 +38,5 @@ MACHINE_START(W90N960EVB, "W90N960EVB") ? ? ? ?.init_irq ? ? ? = nuc900_init_irq, ? ? ? ?.init_machine ? = nuc960evb_init, ? ? ? ?.timer ? ? ? ? ?= &nuc900_timer, + ? ? ? .restart ? ? ? ?= nuc9xx_restart,?MACHINE_END
arch/arm/mach-w90x900/nuc9xx.h +1
-1@@ -21,3 +21,4 @@ struct sys_timer; ?extern void nuc900_init_irq(void); ?extern struct sys_timer nuc900_timer; +extern void nuc9xx_restart (char ,const char *); --1.7.4.4
Signature · 2 lines
Wan ZongShun. www.mcuos.com