From patchwork Fri Jan 25 23:35:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2048501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 4517E3FD1A for ; Fri, 25 Jan 2013 23:40:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tysp9-00074q-Bo; Fri, 25 Jan 2013 23:36:43 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tysok-0006zk-5T for linux-arm-kernel@lists.infradead.org; Fri, 25 Jan 2013 23:36:20 +0000 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MCqF1-1U6tI41rkp-009gTn; Sat, 26 Jan 2013 00:36:15 +0100 From: Arnd Bergmann To: Viresh Kumar Subject: [PATCH 02/13] ARM: spear: unify mach/generic.h and mach/irqs.h Date: Fri, 25 Jan 2013 23:35:45 +0000 Message-Id: <1359156956-32404-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1359156956-32404-1-git-send-email-arnd@arndb.de> References: <1359156956-32404-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:c8IbWHGLZrigkfJMxXq7Y7r7xVIgZCidiBbAj6N7Sgo V+tyneo4H5kpG81SFIVBhZ+jCspio8SPhhDx1WmRzDYC2OMEqC Nl0sHnq49ZkbxdBOOvZgTgbh240ZBMp0YN5qiRTH2sNN2ZkKMM 7hbwLvXxMJ6bXXBTpkeQxJwRn5AnLFT3tBYk+0nIDbd9UQ+C9A 1EPOtrL/BMWnaB6Tb7tH3qEqjOD4JvxOs2/tMCD7x8dOpKML4p LZFK74KkKY7pKYHj3hBJp5+Sr6maQ1NMWZ8rMAlxK/RLNOuA4h My4ofEmkXCPJ3KFsRz975lLBEeEMUUccuKbwJ0Udp5onEzBAYw GNxNiDXKqDxe3lX4ICiq/rG7wlLhym7X6oh0Ly6Qu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130125_183618_535756_B3CE6DE7 X-CRM114-Status: GOOD ( 14.69 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: spear-devel@list.st.com, Arnd Bergmann , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org These are indeed easy to combine, as there are no conflicting definitions in generic.h, and irqs.h will be obsolete once we enable SPARSE_IRQ. Signed-off-by: Arnd Bergmann --- arch/arm/mach-spear13xx/include/mach/generic.h | 21 +++++++---- arch/arm/mach-spear13xx/include/mach/irqs.h | 23 +++++++++--- arch/arm/mach-spear3xx/include/mach/generic.h | 42 ++++++++++++++++------ arch/arm/mach-spear3xx/include/mach/irqs.h | 24 ++++++++++--- arch/arm/mach-spear3xx/spear320.c | 1 + arch/arm/mach-spear3xx/spear3xx.c | 2 ++ arch/arm/mach-spear6xx/include/mach/generic.h | 48 ++++++++++++++++++++++---- arch/arm/mach-spear6xx/include/mach/irqs.h | 22 ++++++++---- 8 files changed, 146 insertions(+), 37 deletions(-) diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h index c33f4d9..58c15c6 100644 --- a/arch/arm/mach-spear13xx/include/mach/generic.h +++ b/arch/arm/mach-spear13xx/include/mach/generic.h @@ -1,9 +1,8 @@ /* - * arch/arm/mach-spear13xx/include/mach/generic.h + * spear machine family generic header file * - * spear13xx machine family generic header file - * - * Copyright (C) 2012 ST Microelectronics + * Copyright (C) 2009-2012 ST Microelectronics + * Rajeev Kumar * Viresh Kumar * * This file is licensed under the terms of the GNU General Public @@ -15,23 +14,31 @@ #define __MACH_GENERIC_H #include +#include +#include #include -/* Add spear13xx structure declarations here */ extern struct sys_timer spear13xx_timer; +extern struct sys_timer spear3xx_timer; extern struct pl022_ssp_controller pl022_plat_data; +extern struct pl08x_platform_data pl080_plat_data; extern struct dw_dma_platform_data dmac_plat_data; extern struct dw_dma_slave cf_dma_priv; extern struct dw_dma_slave nand_read_dma_priv; extern struct dw_dma_slave nand_write_dma_priv; +bool dw_dma_filter(struct dma_chan *chan, void *slave); -/* Add spear13xx family function declarations here */ void __init spear_setup_of_timer(void); +void __init spear3xx_clk_init(void); +void __init spear3xx_map_io(void); +void __init spear3xx_dt_init_irq(void); +void __init spear6xx_clk_init(void); void __init spear13xx_map_io(void); void __init spear13xx_dt_init_irq(void); void __init spear13xx_l2x0_init(void); -bool dw_dma_filter(struct dma_chan *chan, void *slave); + void spear_restart(char, const char *); + void spear13xx_secondary_startup(void); void __cpuinit spear13xx_cpu_die(unsigned int cpu); diff --git a/arch/arm/mach-spear13xx/include/mach/irqs.h b/arch/arm/mach-spear13xx/include/mach/irqs.h index 271a62b..92da0a8 100644 --- a/arch/arm/mach-spear13xx/include/mach/irqs.h +++ b/arch/arm/mach-spear13xx/include/mach/irqs.h @@ -1,9 +1,8 @@ /* - * arch/arm/mach-spear13xx/include/mach/irqs.h + * IRQ helper macros for spear machine family * - * IRQ helper macros for spear13xx machine family - * - * Copyright (C) 2012 ST Microelectronics + * Copyright (C) 2009-2012 ST Microelectronics + * Rajeev Kumar * Viresh Kumar * * This file is licensed under the terms of the GNU General Public @@ -14,7 +13,23 @@ #ifndef __MACH_IRQS_H #define __MACH_IRQS_H +#ifdef CONFIG_ARCH_SPEAR3XX +#define NR_IRQS 256 +#endif + +#ifdef CONFIG_ARCH_SPEAR6XX +/* IRQ definitions */ +/* VIC 1 */ +#define IRQ_VIC_END 64 + +/* GPIO pins virtual irqs */ +#define VIRTUAL_IRQS 24 +#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) +#endif + +#ifdef CONFIG_ARCH_SPEAR13XX #define IRQ_GIC_END 160 #define NR_IRQS IRQ_GIC_END +#endif #endif /* __MACH_IRQS_H */ diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index ce19113..58c15c6 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h @@ -1,10 +1,9 @@ /* - * arch/arm/mach-spear3xx/generic.h + * spear machine family generic header file * - * SPEAr3XX machine family generic header file - * - * Copyright (C) 2009 ST Microelectronics - * Viresh Kumar + * Copyright (C) 2009-2012 ST Microelectronics + * Rajeev Kumar + * Viresh Kumar * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any @@ -14,24 +13,47 @@ #ifndef __MACH_GENERIC_H #define __MACH_GENERIC_H +#include #include #include -#include -#include #include -#include -/* Add spear3xx family device structure declarations here */ +extern struct sys_timer spear13xx_timer; extern struct sys_timer spear3xx_timer; extern struct pl022_ssp_controller pl022_plat_data; extern struct pl08x_platform_data pl080_plat_data; +extern struct dw_dma_platform_data dmac_plat_data; +extern struct dw_dma_slave cf_dma_priv; +extern struct dw_dma_slave nand_read_dma_priv; +extern struct dw_dma_slave nand_write_dma_priv; +bool dw_dma_filter(struct dma_chan *chan, void *slave); -/* Add spear3xx family function declarations here */ void __init spear_setup_of_timer(void); void __init spear3xx_clk_init(void); void __init spear3xx_map_io(void); void __init spear3xx_dt_init_irq(void); +void __init spear6xx_clk_init(void); +void __init spear13xx_map_io(void); +void __init spear13xx_dt_init_irq(void); +void __init spear13xx_l2x0_init(void); void spear_restart(char, const char *); +void spear13xx_secondary_startup(void); +void __cpuinit spear13xx_cpu_die(unsigned int cpu); + +extern struct smp_operations spear13xx_smp_ops; + +#ifdef CONFIG_MACH_SPEAR1310 +void __init spear1310_clk_init(void); +#else +static inline void spear1310_clk_init(void) {} +#endif + +#ifdef CONFIG_MACH_SPEAR1340 +void __init spear1340_clk_init(void); +#else +static inline void spear1340_clk_init(void) {} +#endif + #endif /* __MACH_GENERIC_H */ diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h index f95e5b2..92da0a8 100644 --- a/arch/arm/mach-spear3xx/include/mach/irqs.h +++ b/arch/arm/mach-spear3xx/include/mach/irqs.h @@ -1,9 +1,8 @@ /* - * arch/arm/mach-spear3xx/include/mach/irqs.h + * IRQ helper macros for spear machine family * - * IRQ helper macros for SPEAr3xx machine family - * - * Copyright (C) 2009 ST Microelectronics + * Copyright (C) 2009-2012 ST Microelectronics + * Rajeev Kumar * Viresh Kumar * * This file is licensed under the terms of the GNU General Public @@ -14,6 +13,23 @@ #ifndef __MACH_IRQS_H #define __MACH_IRQS_H +#ifdef CONFIG_ARCH_SPEAR3XX #define NR_IRQS 256 +#endif + +#ifdef CONFIG_ARCH_SPEAR6XX +/* IRQ definitions */ +/* VIC 1 */ +#define IRQ_VIC_END 64 + +/* GPIO pins virtual irqs */ +#define VIRTUAL_IRQS 24 +#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) +#endif + +#ifdef CONFIG_ARCH_SPEAR13XX +#define IRQ_GIC_END 160 +#define NR_IRQS IRQ_GIC_END +#endif #endif /* __MACH_IRQS_H */ diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c index 66e3a0c..bd46f3c 100644 --- a/arch/arm/mach-spear3xx/spear320.c +++ b/arch/arm/mach-spear3xx/spear320.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c index 38fe95d..56a9c26 100644 --- a/arch/arm/mach-spear3xx/spear3xx.c +++ b/arch/arm/mach-spear3xx/spear3xx.c @@ -17,9 +17,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h index 65514b1..58c15c6 100644 --- a/arch/arm/mach-spear6xx/include/mach/generic.h +++ b/arch/arm/mach-spear6xx/include/mach/generic.h @@ -1,10 +1,9 @@ /* - * arch/arm/mach-spear6xx/include/mach/generic.h + * spear machine family generic header file * - * SPEAr6XX machine family specific generic header file - * - * Copyright (C) 2009 ST Microelectronics - * Rajeev Kumar + * Copyright (C) 2009-2012 ST Microelectronics + * Rajeev Kumar + * Viresh Kumar * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any @@ -14,10 +13,47 @@ #ifndef __MACH_GENERIC_H #define __MACH_GENERIC_H +#include +#include #include +#include + +extern struct sys_timer spear13xx_timer; +extern struct sys_timer spear3xx_timer; +extern struct pl022_ssp_controller pl022_plat_data; +extern struct pl08x_platform_data pl080_plat_data; +extern struct dw_dma_platform_data dmac_plat_data; +extern struct dw_dma_slave cf_dma_priv; +extern struct dw_dma_slave nand_read_dma_priv; +extern struct dw_dma_slave nand_write_dma_priv; +bool dw_dma_filter(struct dma_chan *chan, void *slave); void __init spear_setup_of_timer(void); -void spear_restart(char, const char *); +void __init spear3xx_clk_init(void); +void __init spear3xx_map_io(void); +void __init spear3xx_dt_init_irq(void); void __init spear6xx_clk_init(void); +void __init spear13xx_map_io(void); +void __init spear13xx_dt_init_irq(void); +void __init spear13xx_l2x0_init(void); + +void spear_restart(char, const char *); + +void spear13xx_secondary_startup(void); +void __cpuinit spear13xx_cpu_die(unsigned int cpu); + +extern struct smp_operations spear13xx_smp_ops; + +#ifdef CONFIG_MACH_SPEAR1310 +void __init spear1310_clk_init(void); +#else +static inline void spear1310_clk_init(void) {} +#endif + +#ifdef CONFIG_MACH_SPEAR1340 +void __init spear1340_clk_init(void); +#else +static inline void spear1340_clk_init(void) {} +#endif #endif /* __MACH_GENERIC_H */ diff --git a/arch/arm/mach-spear6xx/include/mach/irqs.h b/arch/arm/mach-spear6xx/include/mach/irqs.h index 37a5c41..92da0a8 100644 --- a/arch/arm/mach-spear6xx/include/mach/irqs.h +++ b/arch/arm/mach-spear6xx/include/mach/irqs.h @@ -1,10 +1,9 @@ /* - * arch/arm/mach-spear6xx/include/mach/irqs.h + * IRQ helper macros for spear machine family * - * IRQ helper macros for SPEAr6xx machine family - * - * Copyright (C) 2009 ST Microelectronics - * Rajeev Kumar + * Copyright (C) 2009-2012 ST Microelectronics + * Rajeev Kumar + * Viresh Kumar * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any @@ -14,6 +13,11 @@ #ifndef __MACH_IRQS_H #define __MACH_IRQS_H +#ifdef CONFIG_ARCH_SPEAR3XX +#define NR_IRQS 256 +#endif + +#ifdef CONFIG_ARCH_SPEAR6XX /* IRQ definitions */ /* VIC 1 */ #define IRQ_VIC_END 64 @@ -21,5 +25,11 @@ /* GPIO pins virtual irqs */ #define VIRTUAL_IRQS 24 #define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) +#endif + +#ifdef CONFIG_ARCH_SPEAR13XX +#define IRQ_GIC_END 160 +#define NR_IRQS IRQ_GIC_END +#endif -#endif /* __MACH_IRQS_H */ +#endif /* __MACH_IRQS_H */