From patchwork Tue Jun 17 07:47:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4364741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C44829F36A for ; Tue, 17 Jun 2014 07:50:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB09520279 for ; Tue, 17 Jun 2014 07:50:58 +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 DDD7C2020A for ; Tue, 17 Jun 2014 07:50:57 +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 1Wwo78-00048C-SL; Tue, 17 Jun 2014 07:47:30 +0000 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wwo5o-0003JH-0l for linux-arm-kernel@lists.infradead.org; Tue, 17 Jun 2014 07:46:10 +0000 Received: by mail-pd0-f173.google.com with SMTP id r10so5285196pdi.18 for ; Tue, 17 Jun 2014 00:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=cw5FRirzJ6QEODVIKTVdCdZesEtnf9CDaQfVd+DVrts=; b=SBAZokc5vGuCE91OvCWW6yem9y5/aNSN1l49zZ9aimqTBlElqviqEiDUTIlo1twMOz lgs2J3Beloq12JWVkWl2NF2G4EdDOdfCqBbpNs7BuyHewwFy7Pyh8trnphJM3Rrii3qz dUPfYQpDBkHfK5PVQXgmvr5sClL5c2CAHSIxT4YvrT24dxeClcJzQ/SDfU1Bpp5vGv69 HREbpoM97da/vfk5QG7LfrOb5JYUy+xb1FxIk/3YU3+V7hD2JuEqttZZC+Mrd+jC7QCQ 99yLpAazankkunJ7jIr5PR+RfZQ4xKO6QSXAWG4XXiUocQTsYd6no2EgqLpGOTV6ZGeE Vvng== X-Received: by 10.68.136.99 with SMTP id pz3mr30579828pbb.150.1402991146819; Tue, 17 Jun 2014 00:45:46 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id bc4sm22531618pbb.2.2014.06.17.00.45.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jun 2014 00:45:46 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Tue, 17 Jun 2014 16:47:53 +0900 Message-Id: <20140617074753.30008.57290.sendpatchset@w520> In-Reply-To: <20140617074658.30008.53021.sendpatchset@w520> References: <20140617074658.30008.53021.sendpatchset@w520> Subject: [PATCH v2 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140617_004608_174360_16042FC9 X-CRM114-Status: GOOD ( 12.17 ) X-Spam-Score: -0.8 (/) Cc: arnd@arndb.de, Magnus Damm , horms@verge.net.au, geert@linux-m68k.org, olof@lixom.net, 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Magnus Damm Change location of pm-rcar.h so it can be used as #include "pm-rcar.h" instead of the old style #include . Also clean up the r8a7779 case to move some unused header file cruft into a C file. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven Acked-by: Arnd Bergmann --- Changes since V1: - rebased to v3.16-rc1 arch/arm/mach-shmobile/include/mach/pm-rcar.h | 15 --------------- arch/arm/mach-shmobile/include/mach/r8a7779.h | 12 ------------ arch/arm/mach-shmobile/pm-r8a7779.c | 13 ++++++++++++- arch/arm/mach-shmobile/pm-r8a7790.c | 2 +- arch/arm/mach-shmobile/pm-rcar.c | 2 +- arch/arm/mach-shmobile/pm-rcar.h | 15 +++++++++++++++ arch/arm/mach-shmobile/smp-r8a7779.c | 2 +- arch/arm/mach-shmobile/smp-r8a7790.c | 2 +- 8 files changed, 31 insertions(+), 32 deletions(-) --- 0001/arch/arm/mach-shmobile/include/mach/pm-rcar.h +++ /dev/null 2013-06-03 21:41:10.638032047 +0900 @@ -1,15 +0,0 @@ -#ifndef PM_RCAR_H -#define PM_RCAR_H - -struct rcar_sysc_ch { - unsigned long chan_offs; - unsigned int chan_bit; - unsigned int isr_bit; -}; - -int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); -int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); -bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); -void __iomem *rcar_sysc_init(phys_addr_t base); - -#endif /* PM_RCAR_H */ --- 0001/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ work/arch/arm/mach-shmobile/include/mach/r8a7779.h 2014-06-17 16:13:54.000000000 +0900 @@ -2,8 +2,6 @@ #define __ASM_R8A7779_H__ #include -#include -#include /* HPB-DMA slave IDs */ enum { @@ -12,16 +10,6 @@ enum { HPBDMA_SLAVE_SDHI0_RX, }; -struct r8a7779_pm_domain { - struct generic_pm_domain genpd; - struct rcar_sysc_ch ch; -}; - -static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d) -{ - return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; -} - extern void r8a7779_init_delay(void); extern void r8a7779_init_irq_extpin(int irlm); extern void r8a7779_init_irq_extpin_dt(int irlm); --- 0006/arch/arm/mach-shmobile/pm-r8a7779.c +++ work/arch/arm/mach-shmobile/pm-r8a7779.c 2014-06-17 16:10:26.000000000 +0900 @@ -13,20 +13,31 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include "common.h" +#include "pm-rcar.h" /* SYSC */ #define SYSCIER 0x0c #define SYSCIMR 0x10 +struct r8a7779_pm_domain { + struct generic_pm_domain genpd; + struct rcar_sysc_ch ch; +}; + +static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d) +{ + return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; +} + #if defined(CONFIG_PM) || defined(CONFIG_SMP) static void __init r8a7779_sysc_init(void) --- 0001/arch/arm/mach-shmobile/pm-r8a7790.c +++ work/arch/arm/mach-shmobile/pm-r8a7790.c 2014-06-17 16:10:26.000000000 +0900 @@ -12,8 +12,8 @@ #include #include -#include #include +#include "pm-rcar.h" /* SYSC */ #define SYSCIER 0x0c --- 0001/arch/arm/mach-shmobile/pm-rcar.c +++ work/arch/arm/mach-shmobile/pm-rcar.c 2014-06-17 16:10:26.000000000 +0900 @@ -13,7 +13,7 @@ #include #include #include -#include +#include "pm-rcar.h" /* SYSC */ #define SYSCSR 0x00 --- /dev/null +++ work/arch/arm/mach-shmobile/pm-rcar.h 2014-06-17 16:10:26.000000000 +0900 @@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs; + unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */ --- 0006/arch/arm/mach-shmobile/smp-r8a7779.c +++ work/arch/arm/mach-shmobile/smp-r8a7779.c 2014-06-17 16:10:26.000000000 +0900 @@ -23,13 +23,13 @@ #include #include #include -#include #include #include #include #include #include #include "common.h" +#include "pm-rcar.h" #define AVECR IOMEM(0xfe700040) #define R8A7779_SCU_BASE 0xf0000000 --- 0006/arch/arm/mach-shmobile/smp-r8a7790.c +++ work/arch/arm/mach-shmobile/smp-r8a7790.c 2014-06-17 16:10:26.000000000 +0900 @@ -18,9 +18,9 @@ #include #include #include -#include #include #include "common.h" +#include "pm-rcar.h" #define RST 0xe6160000 #define CA15BAR 0x0020