From patchwork Mon Sep 29 06:51:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 4993971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 39AC5BEEA6 for ; Mon, 29 Sep 2014 06:55:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 588DA20220 for ; Mon, 29 Sep 2014 06:55:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69274201F2 for ; Mon, 29 Sep 2014 06:55:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XYUpP-0002vo-UV; Mon, 29 Sep 2014 06:52:59 +0000 Received: from smtp07.smtpout.orange.fr ([80.12.242.129] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XYUoy-0002lX-MB for linux-arm-kernel@lists.infradead.org; Mon, 29 Sep 2014 06:52:34 +0000 Received: from localhost.localdomain ([109.222.214.181]) by mwinf5d13 with ME id wus51o0043vPsiM03us9f6; Mon, 29 Sep 2014 08:52:10 +0200 X-ME-Helo: localhost.localdomain X-ME-Date: Mon, 29 Sep 2014 08:52:10 +0200 X-ME-IP: 109.222.214.181 From: Robert Jarzmik To: Daniel Mack , Arnd Bergmann , Haojian Zhuang Subject: [PATCH v1 2/4] arm: pxa: move init functions into generic.h Date: Mon, 29 Sep 2014 08:51:46 +0200 Message-Id: <1411973508-14301-2-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411973508-14301-1-git-send-email-robert.jarzmik@free.fr> References: <1411973508-14301-1-git-send-email-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140928_235233_055248_372AE129 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) Cc: Robert Jarzmik , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to have a unique .c file for all pxa variants device-tree definitions, all the initialization functions for MACHINE_START and DT_MACHINE_START have been put together into generic.h. The alternative would have been one pxaXXX-dt.c file per variant. The move is necessary because each include/mach/pxaXXX.h includes the variant register descriptions which intersects and conflicts one with each other. The change is a preparation for pxa-dt.c to support multiple pxa, ie. pxa3xx and pxa27x. The machine files including mach/pxaXXX.h all include generic.h, which guarantees no regression should be introduced. Signed-off-by: Robert Jarzmik --- arch/arm/mach-pxa/generic.h | 26 ++++++++++++++++++++------ arch/arm/mach-pxa/include/mach/pxa25x.h | 8 -------- arch/arm/mach-pxa/include/mach/pxa27x.h | 4 ---- arch/arm/mach-pxa/include/mach/pxa3xx.h | 5 ----- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index 8963984..d962ca6 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h @@ -13,11 +13,11 @@ struct irq_data; -extern void pxa_timer_init(void); - -extern void __init pxa_map_io(void); - extern unsigned int get_clk_frequency_khz(int info); +extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, + unsigned int)); +extern void __init pxa_map_io(void); +extern void pxa_timer_init(void); #define SET_BANK(__nr,__start,__size) \ mi->bank[__nr].start = (__start), \ @@ -26,13 +26,23 @@ extern unsigned int get_clk_frequency_khz(int info); #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) #ifdef CONFIG_PXA25x +#define pxa25x_handle_irq icip_handle_irq extern unsigned pxa25x_get_clk_frequency_khz(int); +extern void __init pxa25x_init_irq(void); +extern void __init pxa25x_map_io(void); +#ifdef CONFIG_CPU_PXA26x +extern void __init pxa26x_init_irq(void); +#endif #else #define pxa25x_get_clk_frequency_khz(x) (0) #endif #ifdef CONFIG_PXA27x -extern unsigned pxa27x_get_clk_frequency_khz(int); +#define pxa27x_handle_irq ichp_handle_irq +extern void __init pxa27x_dt_init_irq(void); +extern unsigned pxa27x_get_clk_frequency_khz(int); +extern void __init pxa27x_init_irq(void); +extern void __init pxa27x_map_io(void); #else #define pxa27x_get_clk_frequency_khz(x) (0) #endif @@ -44,7 +54,11 @@ static inline void pxa2xx_clear_reset_status(unsigned int mask) {} #endif #ifdef CONFIG_PXA3xx -extern unsigned pxa3xx_get_clk_frequency_khz(int); +#define pxa3xx_handle_irq ichp_handle_irq +extern void __init pxa3xx_dt_init_irq(void); +extern unsigned pxa3xx_get_clk_frequency_khz(int); +extern void __init pxa3xx_init_irq(void); +extern void __init pxa3xx_map_io(void); #else #define pxa3xx_get_clk_frequency_khz(x) (0) #endif diff --git a/arch/arm/mach-pxa/include/mach/pxa25x.h b/arch/arm/mach-pxa/include/mach/pxa25x.h index 3ac0baa..5a34175 100644 --- a/arch/arm/mach-pxa/include/mach/pxa25x.h +++ b/arch/arm/mach-pxa/include/mach/pxa25x.h @@ -6,12 +6,4 @@ #include #include -extern void __init pxa25x_map_io(void); -extern void __init pxa25x_init_irq(void); -#ifdef CONFIG_CPU_PXA26x -extern void __init pxa26x_init_irq(void); -#endif - -#define pxa25x_handle_irq icip_handle_irq - #endif /* __MACH_PXA25x_H */ diff --git a/arch/arm/mach-pxa/include/mach/pxa27x.h b/arch/arm/mach-pxa/include/mach/pxa27x.h index 7cff640..599b925 100644 --- a/arch/arm/mach-pxa/include/mach/pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/pxa27x.h @@ -19,11 +19,7 @@ #define ARB_CORE_PARK (1<<24) /* Be parked with core when idle */ #define ARB_LOCK_FLAG (1<<23) /* Only Locking masters gain access to the bus */ -extern void __init pxa27x_map_io(void); -extern void __init pxa27x_init_irq(void); extern int __init pxa27x_set_pwrmode(unsigned int mode); extern void pxa27x_cpu_pm_enter(suspend_state_t state); -#define pxa27x_handle_irq ichp_handle_irq - #endif /* __MACH_PXA27x_H */ diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx.h b/arch/arm/mach-pxa/include/mach/pxa3xx.h index 6dd7fa1..b4143fb 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx.h @@ -5,9 +5,4 @@ #include #include -extern void __init pxa3xx_map_io(void); -extern void __init pxa3xx_init_irq(void); - -#define pxa3xx_handle_irq ichp_handle_irq - #endif /* __MACH_PXA3XX_H */