aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-07 18:27:10 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-03 19:44:58 -0400
commit8ae28ecb8726db5904f0f703f100315377b0172b (patch)
treeb6009b63979b0dc5dce9a80e6e36e3ad01aef1d1
parenta62595d359ba8ca0f25b93c06eab84ba97ca516f (diff)
ARM: shmobile: Set PM domain on/off latencies directly
The results of adaptive latency computations in __pm_genpd_poweron() and pm_genpd_poweroff() show that the power on/power off latencies of all power domains in SH7372 are a little below 250 us. Therefore, if 250 us is used as the common initial value of the latency fields in struct generic_pm_domain for all domains, the latency values will never have to change at run time and there won't be any overhead related to re-computation of the corresponding PM QoS data. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
-rw-r--r--arch/arm/mach-shmobile/pm-sh7372.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index 0d722b5b5219..9d055a9f27c8 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -71,6 +71,8 @@
71 71
72#ifdef CONFIG_PM 72#ifdef CONFIG_PM
73 73
74#define PM_DOMAIN_ON_OFF_LATENCY_NS 250000
75
74static int sh7372_a4r_pd_suspend(void) 76static int sh7372_a4r_pd_suspend(void)
75{ 77{
76 sh7372_intcs_suspend(); 78 sh7372_intcs_suspend();
@@ -110,32 +112,46 @@ static int sh7372_a3sp_pd_suspend(void)
110static struct rmobile_pm_domain sh7372_pm_domains[] = { 112static struct rmobile_pm_domain sh7372_pm_domains[] = {
111 { 113 {
112 .genpd.name = "A4LC", 114 .genpd.name = "A4LC",
115 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
116 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
113 .bit_shift = 1, 117 .bit_shift = 1,
114 }, 118 },
115 { 119 {
116 .genpd.name = "A4MP", 120 .genpd.name = "A4MP",
121 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
122 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
117 .bit_shift = 2, 123 .bit_shift = 2,
118 }, 124 },
119 { 125 {
120 .genpd.name = "D4", 126 .genpd.name = "D4",
127 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
128 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
121 .bit_shift = 3, 129 .bit_shift = 3,
122 }, 130 },
123 { 131 {
124 .genpd.name = "A4R", 132 .genpd.name = "A4R",
133 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
134 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
125 .bit_shift = 5, 135 .bit_shift = 5,
126 .suspend = sh7372_a4r_pd_suspend, 136 .suspend = sh7372_a4r_pd_suspend,
127 .resume = sh7372_intcs_resume, 137 .resume = sh7372_intcs_resume,
128 }, 138 },
129 { 139 {
130 .genpd.name = "A3RV", 140 .genpd.name = "A3RV",
141 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
142 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
131 .bit_shift = 6, 143 .bit_shift = 6,
132 }, 144 },
133 { 145 {
134 .genpd.name = "A3RI", 146 .genpd.name = "A3RI",
147 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
148 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
135 .bit_shift = 8, 149 .bit_shift = 8,
136 }, 150 },
137 { 151 {
138 .genpd.name = "A4S", 152 .genpd.name = "A4S",
153 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
154 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
139 .bit_shift = 10, 155 .bit_shift = 10,
140 .gov = &pm_domain_always_on_gov, 156 .gov = &pm_domain_always_on_gov,
141 .no_debug = true, 157 .no_debug = true,
@@ -144,6 +160,8 @@ static struct rmobile_pm_domain sh7372_pm_domains[] = {
144 }, 160 },
145 { 161 {
146 .genpd.name = "A3SP", 162 .genpd.name = "A3SP",
163 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
164 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
147 .bit_shift = 11, 165 .bit_shift = 11,
148 .gov = &pm_domain_always_on_gov, 166 .gov = &pm_domain_always_on_gov,
149 .no_debug = true, 167 .no_debug = true,
@@ -151,6 +169,8 @@ static struct rmobile_pm_domain sh7372_pm_domains[] = {
151 }, 169 },
152 { 170 {
153 .genpd.name = "A3SG", 171 .genpd.name = "A3SG",
172 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
173 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
154 .bit_shift = 13, 174 .bit_shift = 13,
155 }, 175 },
156}; 176};