diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-06 16:19:54 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-06 16:19:54 -0500 |
commit | e84b2c202771bbd538866207efcb1f7dbab8045b (patch) | |
tree | 00f62ed8f422c587897c7eb6ac6cd8c4dca508ab /arch/arm/mach-shmobile/pm-sh7372.c | |
parent | 4f042cdad40e1566a53b7ae85e72b6945a4b0fde (diff) |
PM / Domains: Make it possible to assign names to generic PM domains
Add a name member pointer to struct generic_pm_domain and use it in
diagnostic messages regarding the domain power-off and power-on
latencies. Update the ARM shmobile SH7372 code to assign names to
the PM domains used by it.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'arch/arm/mach-shmobile/pm-sh7372.c')
-rw-r--r-- | arch/arm/mach-shmobile/pm-sh7372.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index adf1765e69c6..8d9ea8924ed3 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -101,8 +101,8 @@ static int pd_power_down(struct generic_pm_domain *genpd) | |||
101 | } | 101 | } |
102 | 102 | ||
103 | if (!sh7372_pd->no_debug) | 103 | if (!sh7372_pd->no_debug) |
104 | pr_debug("sh7372 power domain down 0x%08x -> PSTR = 0x%08x\n", | 104 | pr_debug("%s: Power off, 0x%08x -> PSTR = 0x%08x\n", |
105 | mask, __raw_readl(PSTR)); | 105 | genpd->name, mask, __raw_readl(PSTR)); |
106 | 106 | ||
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
@@ -133,8 +133,8 @@ static int __pd_power_up(struct sh7372_pm_domain *sh7372_pd, bool do_resume) | |||
133 | ret = -EIO; | 133 | ret = -EIO; |
134 | 134 | ||
135 | if (!sh7372_pd->no_debug) | 135 | if (!sh7372_pd->no_debug) |
136 | pr_debug("sh7372 power domain up 0x%08x -> PSTR = 0x%08x\n", | 136 | pr_debug("%s: Power on, 0x%08x -> PSTR = 0x%08x\n", |
137 | mask, __raw_readl(PSTR)); | 137 | sh7372_pd->genpd.name, mask, __raw_readl(PSTR)); |
138 | 138 | ||
139 | out: | 139 | out: |
140 | if (ret == 0 && sh7372_pd->resume && do_resume) | 140 | if (ret == 0 && sh7372_pd->resume && do_resume) |
@@ -233,18 +233,22 @@ void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd, | |||
233 | } | 233 | } |
234 | 234 | ||
235 | struct sh7372_pm_domain sh7372_a4lc = { | 235 | struct sh7372_pm_domain sh7372_a4lc = { |
236 | .genpd.name = "A4LC", | ||
236 | .bit_shift = 1, | 237 | .bit_shift = 1, |
237 | }; | 238 | }; |
238 | 239 | ||
239 | struct sh7372_pm_domain sh7372_a4mp = { | 240 | struct sh7372_pm_domain sh7372_a4mp = { |
241 | .genpd.name = "A4MP", | ||
240 | .bit_shift = 2, | 242 | .bit_shift = 2, |
241 | }; | 243 | }; |
242 | 244 | ||
243 | struct sh7372_pm_domain sh7372_d4 = { | 245 | struct sh7372_pm_domain sh7372_d4 = { |
246 | .genpd.name = "D4", | ||
244 | .bit_shift = 3, | 247 | .bit_shift = 3, |
245 | }; | 248 | }; |
246 | 249 | ||
247 | struct sh7372_pm_domain sh7372_a4r = { | 250 | struct sh7372_pm_domain sh7372_a4r = { |
251 | .genpd.name = "A4R", | ||
248 | .bit_shift = 5, | 252 | .bit_shift = 5, |
249 | .gov = &sh7372_always_on_gov, | 253 | .gov = &sh7372_always_on_gov, |
250 | .suspend = sh7372_a4r_suspend, | 254 | .suspend = sh7372_a4r_suspend, |
@@ -253,14 +257,17 @@ struct sh7372_pm_domain sh7372_a4r = { | |||
253 | }; | 257 | }; |
254 | 258 | ||
255 | struct sh7372_pm_domain sh7372_a3rv = { | 259 | struct sh7372_pm_domain sh7372_a3rv = { |
260 | .genpd.name = "A3RV", | ||
256 | .bit_shift = 6, | 261 | .bit_shift = 6, |
257 | }; | 262 | }; |
258 | 263 | ||
259 | struct sh7372_pm_domain sh7372_a3ri = { | 264 | struct sh7372_pm_domain sh7372_a3ri = { |
265 | .genpd.name = "A3RI", | ||
260 | .bit_shift = 8, | 266 | .bit_shift = 8, |
261 | }; | 267 | }; |
262 | 268 | ||
263 | struct sh7372_pm_domain sh7372_a3sp = { | 269 | struct sh7372_pm_domain sh7372_a3sp = { |
270 | .genpd.name = "A3SP", | ||
264 | .bit_shift = 11, | 271 | .bit_shift = 11, |
265 | .gov = &sh7372_always_on_gov, | 272 | .gov = &sh7372_always_on_gov, |
266 | .no_debug = true, | 273 | .no_debug = true, |
@@ -275,6 +282,7 @@ static void sh7372_a3sp_init(void) | |||
275 | } | 282 | } |
276 | 283 | ||
277 | struct sh7372_pm_domain sh7372_a3sg = { | 284 | struct sh7372_pm_domain sh7372_a3sg = { |
285 | .genpd.name = "A3SG", | ||
278 | .bit_shift = 13, | 286 | .bit_shift = 13, |
279 | }; | 287 | }; |
280 | 288 | ||