From patchwork Tue May 20 08:00:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4207791 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 3CA8CBEEAB for ; Tue, 20 May 2014 08:02:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45589202D1 for ; Tue, 20 May 2014 08:02:28 +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 60C212020F for ; Tue, 20 May 2014 08:02:27 +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 1Wmexf-0002b8-Kk; Tue, 20 May 2014 07:59:47 +0000 Received: from mail-pd0-x22a.google.com ([2607:f8b0:400e:c02::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WmexE-00028J-ER for linux-arm-kernel@lists.infradead.org; Tue, 20 May 2014 07:59:21 +0000 Received: by mail-pd0-f170.google.com with SMTP id g10so89874pdj.15 for ; Tue, 20 May 2014 00:58:59 -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=cLQk8RtRWvJgx+aqFYC6dh+imJ8mjWWBlLAmXCMclEg=; b=lqwGa8kFDn0xQCK6yw311uVX4/lZBhFv/2MDPQUimC/BGgrXmubevfSjOaf2y/GX6J ZOXK5b5EJ+c3LO3lIUgAp8NrlPTbv5NeqiHFCwkgttNp27uPDc42sRL+CWE1OSG3zi5E 9jqr1ZpG6eXr/vEQ8C09IN3ZE2X6iEqSEy+lXsSLyoPaNOReAWQaZgb/i2q9xyrEQg4/ wWkCv9AW0hRm5zuq6s2VXB/Pdnx4wgwCPVH5zIyCfA50DobxlEIVEmLnzBL+Qak710Sx LnV2GlEFsvfdpoCFymzhYmxeVME9S8wL/BkMB1Ar7qDg6tRmx3kiYBoJD8rrrJMCSIsd dP+A== X-Received: by 10.68.216.101 with SMTP id op5mr49130799pbc.148.1400572739170; Tue, 20 May 2014 00:58:59 -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 qv9sm1661030pbc.71.2014.05.20.00.58.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 May 2014 00:58:57 -0700 (PDT) From: Magnus Damm To: olof@lixom.net Date: Tue, 20 May 2014 17:00:58 +0900 Message-Id: <20140520080058.13851.83767.sendpatchset@w520> In-Reply-To: <20140520075949.13851.42995.sendpatchset@w520> References: <20140520075949.13851.42995.sendpatchset@w520> Subject: [PATCH 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-20140520_005920_520267_305FA51A X-CRM114-Status: GOOD ( 12.25 ) X-Spam-Score: -0.1 (/) Cc: horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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.4 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 Move most 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 --- arch/arm/mach-shmobile/include/mach/pm-rcar.h | 15 --------------- arch/arm/mach-shmobile/include/mach/r8a7779.h | 13 ------------- 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(+), 33 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-05-20 01:13:37.000000000 +0900 @@ -1,9 +1,6 @@ #ifndef __ASM_R8A7779_H__ #define __ASM_R8A7779_H__ -#include -#include - /* HPB-DMA slave IDs */ enum { HPBDMA_SLAVE_DUMMY, @@ -11,16 +8,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); --- 0009/arch/arm/mach-shmobile/pm-r8a7779.c +++ work/arch/arm/mach-shmobile/pm-r8a7779.c 2014-05-20 01:13:51.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-05-20 01:04:34.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-05-20 01:04:52.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-05-20 01:03:32.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 */ --- 0009/arch/arm/mach-shmobile/smp-r8a7779.c +++ work/arch/arm/mach-shmobile/smp-r8a7779.c 2014-05-20 01:05:10.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 --- 0009/arch/arm/mach-shmobile/smp-r8a7790.c +++ work/arch/arm/mach-shmobile/smp-r8a7790.c 2014-05-20 01:05:53.000000000 +0900 @@ -18,9 +18,9 @@ #include #include #include -#include #include #include "common.h" +#include "pm-rcar.h" #define RST 0xe6160000 #define CA15BAR 0x0020