diff options
author | Magnus Damm <damm@opensource.se> | 2014-01-15 02:43:08 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-02-23 18:55:46 -0500 |
commit | a6557eb795edcf7832b5278a11842c4ca302f4af (patch) | |
tree | f46f65b333815c8fe013575496bb229b57161668 /arch/arm/mach-shmobile/include/mach | |
parent | 4a51856b42672cfcb7d6fbab22dcf2caba2be5ab (diff) |
ARM: shmobile: Break out R-Car SYSC PM code
Break out the R-Car SYSC power management code from
the r8a7779 SoC code. With this new shared R-Car SYSC
code base it is possible to hook in Generation 2 SoCs
as well.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/pm-rcar.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7779.h | 13 |
2 files changed, 18 insertions, 10 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/pm-rcar.h b/arch/arm/mach-shmobile/include/mach/pm-rcar.h new file mode 100644 index 000000000000..ef3a1ef628f1 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/pm-rcar.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef PM_RCAR_H | ||
2 | #define PM_RCAR_H | ||
3 | |||
4 | struct rcar_sysc_ch { | ||
5 | unsigned long chan_offs; | ||
6 | unsigned int chan_bit; | ||
7 | unsigned int isr_bit; | ||
8 | }; | ||
9 | |||
10 | int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); | ||
11 | int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); | ||
12 | bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); | ||
13 | void __iomem *rcar_sysc_init(phys_addr_t base); | ||
14 | |||
15 | #endif /* PM_RCAR_H */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index b40e13631f6a..88eeceaf1088 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/sh_clk.h> | 4 | #include <linux/sh_clk.h> |
5 | #include <linux/pm_domain.h> | 5 | #include <linux/pm_domain.h> |
6 | #include <mach/pm-rcar.h> | ||
6 | 7 | ||
7 | /* HPB-DMA slave IDs */ | 8 | /* HPB-DMA slave IDs */ |
8 | enum { | 9 | enum { |
@@ -11,18 +12,12 @@ enum { | |||
11 | HPBDMA_SLAVE_SDHI0_RX, | 12 | HPBDMA_SLAVE_SDHI0_RX, |
12 | }; | 13 | }; |
13 | 14 | ||
14 | struct r8a7779_pm_ch { | ||
15 | unsigned long chan_offs; | ||
16 | unsigned int chan_bit; | ||
17 | unsigned int isr_bit; | ||
18 | }; | ||
19 | |||
20 | struct r8a7779_pm_domain { | 15 | struct r8a7779_pm_domain { |
21 | struct generic_pm_domain genpd; | 16 | struct generic_pm_domain genpd; |
22 | struct r8a7779_pm_ch ch; | 17 | struct rcar_sysc_ch ch; |
23 | }; | 18 | }; |
24 | 19 | ||
25 | static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d) | 20 | static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d) |
26 | { | 21 | { |
27 | return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; | 22 | return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; |
28 | } | 23 | } |
@@ -41,8 +36,6 @@ extern void r8a7779_clock_init(void); | |||
41 | extern void r8a7779_pinmux_init(void); | 36 | extern void r8a7779_pinmux_init(void); |
42 | extern void r8a7779_pm_init(void); | 37 | extern void r8a7779_pm_init(void); |
43 | extern void r8a7779_register_twd(void); | 38 | extern void r8a7779_register_twd(void); |
44 | extern int r8a7779_sysc_power_down(struct r8a7779_pm_ch *r8a7779_ch); | ||
45 | extern int r8a7779_sysc_power_up(struct r8a7779_pm_ch *r8a7779_ch); | ||
46 | 39 | ||
47 | #ifdef CONFIG_PM | 40 | #ifdef CONFIG_PM |
48 | extern void __init r8a7779_init_pm_domains(void); | 41 | extern void __init r8a7779_init_pm_domains(void); |