Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328694
b: refs/heads/master
c: 45e5ca5
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Sep 3, 2012
1 parent ceeb24e commit a20b821
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b5674075b7c7ddb0c4da18b1f104e1db774ce82
refs/heads/master: 45e5ca575647ebbca932f34a1ed915ae7a581cbb
9 changes: 2 additions & 7 deletions trunk/arch/arm/mach-shmobile/include/mach/r8a7779.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,9 @@ extern int r8a7779_sysc_power_down(struct r8a7779_pm_ch *r8a7779_ch);
extern int r8a7779_sysc_power_up(struct r8a7779_pm_ch *r8a7779_ch);

#ifdef CONFIG_PM
extern struct r8a7779_pm_domain r8a7779_sh4a;
extern struct r8a7779_pm_domain r8a7779_sgx;
extern struct r8a7779_pm_domain r8a7779_vdp1;
extern struct r8a7779_pm_domain r8a7779_impx3;

extern void r8a7779_init_pm_domain(struct r8a7779_pm_domain *r8a7779_pd);
extern void __init r8a7779_init_pm_domains(void);
#else
#define r8a7779_init_pm_domain(pd) do { } while (0)
static inline void r8a7779_init_pm_domains(void) {}
#endif /* CONFIG_PM */

#endif /* __ASM_R8A7779_H__ */
65 changes: 36 additions & 29 deletions trunk/arch/arm/mach-shmobile/pm-r8a7779.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static bool pd_active_wakeup(struct device *dev)
return true;
}

void r8a7779_init_pm_domain(struct r8a7779_pm_domain *r8a7779_pd)
static void r8a7779_init_pm_domain(struct r8a7779_pm_domain *r8a7779_pd)
{
struct generic_pm_domain *genpd = &r8a7779_pd->genpd;

Expand All @@ -199,37 +199,44 @@ void r8a7779_init_pm_domain(struct r8a7779_pm_domain *r8a7779_pd)
pd_power_up(&r8a7779_pd->genpd);
}

struct r8a7779_pm_domain r8a7779_sh4a = {
.genpd.name = "SH4A",
.ch = {
.chan_offs = 0x80, /* PWRSR1 .. PWRER1 */
.isr_bit = 16, /* SH4A */
}
static struct r8a7779_pm_domain r8a7779_pm_domains[] = {
{
.genpd.name = "SH4A",
.ch = {
.chan_offs = 0x80, /* PWRSR1 .. PWRER1 */
.isr_bit = 16, /* SH4A */
},
},
{
.genpd.name = "SGX",
.ch = {
.chan_offs = 0xc0, /* PWRSR2 .. PWRER2 */
.isr_bit = 20, /* SGX */
},
},
{
.genpd.name = "VDP1",
.ch = {
.chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
.isr_bit = 21, /* VDP */
},
},
{
.genpd.name = "IMPX3",
.ch = {
.chan_offs = 0x140, /* PWRSR4 .. PWRER4 */
.isr_bit = 24, /* IMP */
},
},
};

struct r8a7779_pm_domain r8a7779_sgx = {
.genpd.name = "SGX",
.ch = {
.chan_offs = 0xc0, /* PWRSR2 .. PWRER2 */
.isr_bit = 20, /* SGX */
}
};

struct r8a7779_pm_domain r8a7779_vdp1 = {
.genpd.name = "VDP1",
.ch = {
.chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
.isr_bit = 21, /* VDP */
}
};
void __init r8a7779_init_pm_domains(void)
{
int j;

struct r8a7779_pm_domain r8a7779_impx3 = {
.genpd.name = "IMPX3",
.ch = {
.chan_offs = 0x140, /* PWRSR4 .. PWRER4 */
.isr_bit = 24, /* IMP */
}
};
for (j = 0; j < ARRAY_SIZE(r8a7779_pm_domains); j++)
r8a7779_init_pm_domain(&r8a7779_pm_domains[j]);
}

#endif /* CONFIG_PM */

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/arm/mach-shmobile/setup-r8a7779.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,7 @@ void __init r8a7779_add_standard_devices(void)
#endif
r8a7779_pm_init();

r8a7779_init_pm_domain(&r8a7779_sh4a);
r8a7779_init_pm_domain(&r8a7779_sgx);
r8a7779_init_pm_domain(&r8a7779_vdp1);
r8a7779_init_pm_domain(&r8a7779_impx3);
r8a7779_init_pm_domains();

platform_add_devices(r8a7779_early_devices,
ARRAY_SIZE(r8a7779_early_devices));
Expand Down

0 comments on commit a20b821

Please sign in to comment.