From e5bc9e257a4ef3dabc6b5573215983d663ffcd55 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 7 Nov 2011 18:02:39 +0000 Subject: [PATCH] ARM: w90x900: add common nuc9xx.h Rather than having separate extern declarations in nuc9*.h, provide a common header file containing these definitions. Tested-by: Wan Zongshun Signed-off-by: Russell King --- 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/{nuc910.h => nuc9xx.h} | 11 +++-------- arch/arm/mach-w90x900/time.c | 2 ++ 6 files changed, 10 insertions(+), 32 deletions(-) copy arch/arm/mach-w90x900/{nuc910.h => nuc9xx.h} (72%) diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index 7bf143c443f..b466e2450ba 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c @@ -28,6 +28,8 @@ #include #include +#include "nuc9xx.h" + struct group_irq { unsigned long gpen; unsigned int enabled; diff --git a/arch/arm/mach-w90x900/nuc910.h b/arch/arm/mach-w90x900/nuc910.h index 83e9ba5fc26..b14c71a9e68 100644 --- a/arch/arm/mach-w90x900/nuc910.h +++ b/arch/arm/mach-w90x900/nuc910.h @@ -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 */ diff --git a/arch/arm/mach-w90x900/nuc950.h b/arch/arm/mach-w90x900/nuc950.h index 98a1148bc5a..6e9de3051cd 100644 --- a/arch/arm/mach-w90x900/nuc950.h +++ b/arch/arm/mach-w90x900/nuc950.h @@ -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 */ diff --git a/arch/arm/mach-w90x900/nuc960.h b/arch/arm/mach-w90x900/nuc960.h index f0c07cbe3a8..9f6df9a0028 100644 --- a/arch/arm/mach-w90x900/nuc960.h +++ b/arch/arm/mach-w90x900/nuc960.h @@ -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 */ diff --git a/arch/arm/mach-w90x900/nuc910.h b/arch/arm/mach-w90x900/nuc9xx.h similarity index 72% copy from arch/arm/mach-w90x900/nuc910.h copy to arch/arm/mach-w90x900/nuc9xx.h index 83e9ba5fc26..847c4f3e044 100644 --- a/arch/arm/mach-w90x900/nuc910.h +++ b/arch/arm/mach-w90x900/nuc9xx.h @@ -1,5 +1,7 @@ /* - * arch/arm/mach-w90x900/nuc910.h + * arch/arm/mach-w90x900/nuc9xx.h + * + * Copied from nuc910.h, which had: * * Copyright (c) 2008 Nuvoton corporation * @@ -12,7 +14,6 @@ * published by the Free Software Foundation. * */ - struct map_desc; struct sys_timer; @@ -20,9 +21,3 @@ struct sys_timer; extern void nuc900_init_irq(void); extern struct sys_timer nuc900_timer; - -/* extern file from nuc910.c */ - -extern void nuc910_board_init(void); -extern void nuc910_init_clocks(void); -extern void nuc910_map_io(void); diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c index a2c4e2d0a0d..fa27c498ac0 100644 --- a/arch/arm/mach-w90x900/time.c +++ b/arch/arm/mach-w90x900/time.c @@ -33,6 +33,8 @@ #include #include +#include "nuc9xx.h" + #define RESETINT 0x1f #define PERIOD (0x01 << 27) #define ONESHOT (0x00 << 27) -- 2.11.4.GIT