Commit 7b567407 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ARM: shmobile: Move r8a7740's PM domain objects to a table

Instead of giving a name to every r8a7740's PM domain object, put
them all into a table and use rmobile_init_domains(), introduced by a
previous patch, for initializing them all altogether.  Also, use
pm_genpd_add_subdomain_names() for adding A3SP as a subdomain of A4S.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
parent e7e59a4b
...@@ -607,9 +607,9 @@ enum { ...@@ -607,9 +607,9 @@ enum {
}; };
#ifdef CONFIG_PM #ifdef CONFIG_PM
extern struct rmobile_pm_domain r8a7740_pd_a4s; extern void __init r8a7740_init_pm_domains(void);
extern struct rmobile_pm_domain r8a7740_pd_a3sp; #else
extern struct rmobile_pm_domain r8a7740_pd_a4lc; static inline void r8a7740_init_pm_domains(void) {}
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
#endif /* __ASM_R8A7740_H__ */ #endif /* __ASM_R8A7740_H__ */
...@@ -21,14 +21,6 @@ static int r8a7740_pd_a4s_suspend(void) ...@@ -21,14 +21,6 @@ static int r8a7740_pd_a4s_suspend(void)
return -EBUSY; return -EBUSY;
} }
struct rmobile_pm_domain r8a7740_pd_a4s = {
.genpd.name = "A4S",
.bit_shift = 10,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
.suspend = r8a7740_pd_a4s_suspend,
};
static int r8a7740_pd_a3sp_suspend(void) static int r8a7740_pd_a3sp_suspend(void)
{ {
/* /*
...@@ -38,17 +30,31 @@ static int r8a7740_pd_a3sp_suspend(void) ...@@ -38,17 +30,31 @@ static int r8a7740_pd_a3sp_suspend(void)
return console_suspend_enabled ? 0 : -EBUSY; return console_suspend_enabled ? 0 : -EBUSY;
} }
struct rmobile_pm_domain r8a7740_pd_a3sp = { static struct rmobile_pm_domain r8a7740_pm_domains[] = {
.genpd.name = "A3SP", {
.bit_shift = 11, .genpd.name = "A4S",
.gov = &pm_domain_always_on_gov, .bit_shift = 10,
.no_debug = true, .gov = &pm_domain_always_on_gov,
.suspend = r8a7740_pd_a3sp_suspend, .no_debug = true,
.suspend = r8a7740_pd_a4s_suspend,
},
{
.genpd.name = "A3SP",
.bit_shift = 11,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
.suspend = r8a7740_pd_a3sp_suspend,
},
{
.genpd.name = "A4LC",
.bit_shift = 1,
},
}; };
struct rmobile_pm_domain r8a7740_pd_a4lc = { void __init r8a7740_init_pm_domains(void)
.genpd.name = "A4LC", {
.bit_shift = 1, rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains));
}; pm_genpd_add_subdomain_names("A4S", "A3SP");
}
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
...@@ -673,12 +673,7 @@ void __init r8a7740_add_standard_devices(void) ...@@ -673,12 +673,7 @@ void __init r8a7740_add_standard_devices(void)
r8a7740_i2c_workaround(&i2c0_device); r8a7740_i2c_workaround(&i2c0_device);
r8a7740_i2c_workaround(&i2c1_device); r8a7740_i2c_workaround(&i2c1_device);
/* PM domain */ r8a7740_init_pm_domains();
rmobile_init_pm_domain(&r8a7740_pd_a4s);
rmobile_init_pm_domain(&r8a7740_pd_a3sp);
rmobile_init_pm_domain(&r8a7740_pd_a4lc);
pm_genpd_add_subdomain_names("A4S", "A3SP");
/* add devices */ /* add devices */
platform_add_devices(r8a7740_early_devices, platform_add_devices(r8a7740_early_devices,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment