From patchwork Mon Nov 23 17:33:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 62232 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nANHY0Yf032224 for ; Mon, 23 Nov 2009 17:34:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753306AbZKWRdm (ORCPT ); Mon, 23 Nov 2009 12:33:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752996AbZKWRdl (ORCPT ); Mon, 23 Nov 2009 12:33:41 -0500 Received: from mail-pz0-f171.google.com ([209.85.222.171]:46131 "EHLO mail-pz0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752786AbZKWRdk (ORCPT ); Mon, 23 Nov 2009 12:33:40 -0500 Received: by mail-pz0-f171.google.com with SMTP id 1so4102157pzk.33 for ; Mon, 23 Nov 2009 09:33:46 -0800 (PST) Received: by 10.115.101.30 with SMTP id d30mr9568791wam.175.1258997626662; Mon, 23 Nov 2009 09:33:46 -0800 (PST) Received: from localhost ([216.254.16.51]) by mx.google.com with ESMTPS id 22sm3187302pzk.14.2009.11.23.09.33.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 09:33:46 -0800 (PST) From: Kevin Hilman To: linux-omap@vger.kernel.org Subject: [PATCH 2/3] OMAP: omap_device: track latency in nanoseconds Date: Mon, 23 Nov 2009 09:33:41 -0800 Message-Id: <1258997622-13923-2-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.5.1 In-Reply-To: <1258997622-13923-1-git-send-email-khilman@deeprootsystems.com> References: <1258997622-13923-1-git-send-email-khilman@deeprootsystems.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index c504780..3b2f3a6 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 @@ * @pm_lats: ptr to an omap_device_pm_latency table * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats * @pm_lat_level: array index of the last odpl entry executed - -1 if never - * @dev_wakeup_lat: dev wakeup latency in microseconds - * @_dev_wakeup_lat_limit: dev wakeup latency limit in usec - set by OMAP PM + * @dev_wakeup_lat: dev wakeup latency in nanoseconds + * @_dev_wakeup_lat_limit: dev wakeup latency limit in nsec - set by OMAP PM * @_state: one of OMAP_DEVICE_STATE_* (see above) * @flags: device flags * diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 722f2c8..7bf665c 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) read_persistent_clock(&b); c = timespec_sub(b, a); - act_lat = timespec_to_ns(&c) / NSEC_PER_USEC; + act_lat = timespec_to_ns(&c); pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time " - "%llu usec\n", od->pdev.name, od->pm_lat_level, + "%llu nsec\n", od->pdev.name, od->pm_lat_level, act_lat); 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) read_persistent_clock(&b); c = timespec_sub(b, a); - deact_lat = timespec_to_ns(&c) / NSEC_PER_USEC; + deact_lat = timespec_to_ns(&c); pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time " - "%llu usec\n", od->pdev.name, od->pm_lat_level, + "%llu nsec\n", od->pdev.name, od->pm_lat_level, deact_lat); WARN(deact_lat > odpl->deactivate_lat, "omap_device: %s.%d: "