From mboxrd@z Thu Jan 1 00:00:00 1970 From: Magnus Damm Date: Tue, 20 May 2014 07:59:00 +0000 Subject: [PATCH 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case Message-Id: <20140520080058.13851.83767.sendpatchset@w520> List-Id: References: <20140520075949.13851.42995.sendpatchset@w520> In-Reply-To: <20140520075949.13851.42995.sendpatchset@w520> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org 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