aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-12-08 18:34:26 -0500
committerpaul <paul@twilight.(none)>2009-12-11 19:00:44 -0500
commit0d93d8bb7f52190d76e9dba7f4561aabefaff34a (patch)
tree93aa385996af88300fe873c384364f2f876b5544 /arch/arm
parentd048ec7ab48254c505e1cee49441345ce12129fd (diff)
OMAP: omap_device: track latency in nanoseconds
Rather than having to do a usecs = nsecs / NSECS_PER_USEC to track latency in usecs, just track it in nanoseconds. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h4
-rw-r--r--arch/arm/plat-omap/omap_device.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index d93924699a1b..dc1fac1d805c 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -50,8 +50,8 @@
50 * @pm_lats: ptr to an omap_device_pm_latency table 50 * @pm_lats: ptr to an omap_device_pm_latency table
51 * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats 51 * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats
52 * @pm_lat_level: array index of the last odpl entry executed - -1 if never 52 * @pm_lat_level: array index of the last odpl entry executed - -1 if never
53 * @dev_wakeup_lat: dev wakeup latency in microseconds 53 * @dev_wakeup_lat: dev wakeup latency in nanoseconds
54 * @_dev_wakeup_lat_limit: dev wakeup latency limit in usec - set by OMAP PM 54 * @_dev_wakeup_lat_limit: dev wakeup latency limit in nsec - set by OMAP PM
55 * @_state: one of OMAP_DEVICE_STATE_* (see above) 55 * @_state: one of OMAP_DEVICE_STATE_* (see above)
56 * @flags: device flags 56 * @flags: device flags
57 * 57 *
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 51c9d560a0cd..1e5648d3e3d8 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -142,10 +142,10 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
142 read_persistent_clock(&b); 142 read_persistent_clock(&b);
143 143
144 c = timespec_sub(b, a); 144 c = timespec_sub(b, a);
145 act_lat = timespec_to_ns(&c) / NSEC_PER_USEC; 145 act_lat = timespec_to_ns(&c);
146 146
147 pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time " 147 pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time "
148 "%llu usec\n", od->pdev.name, od->pm_lat_level, 148 "%llu nsec\n", od->pdev.name, od->pm_lat_level,
149 act_lat); 149 act_lat);
150 150
151 WARN(act_lat > odpl->activate_lat, "omap_device: %s.%d: " 151 WARN(act_lat > odpl->activate_lat, "omap_device: %s.%d: "
@@ -198,10 +198,10 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
198 read_persistent_clock(&b); 198 read_persistent_clock(&b);
199 199
200 c = timespec_sub(b, a); 200 c = timespec_sub(b, a);
201 deact_lat = timespec_to_ns(&c) / NSEC_PER_USEC; 201 deact_lat = timespec_to_ns(&c);
202 202
203 pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time " 203 pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time "
204 "%llu usec\n", od->pdev.name, od->pm_lat_level, 204 "%llu nsec\n", od->pdev.name, od->pm_lat_level,
205 deact_lat); 205 deact_lat);
206 206
207 WARN(deact_lat > odpl->deactivate_lat, "omap_device: %s.%d: " 207 WARN(deact_lat > odpl->deactivate_lat, "omap_device: %s.%d: "