Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git] / arch / arm / plat-omap / omap_device.c
index 54fe0a2..2ed7201 100644 (file)
 #define USE_WAKEUP_LAT                 0
 #define IGNORE_WAKEUP_LAT              1
 
-/* XXX this should be moved into a separate file */
-#if defined(CONFIG_ARCH_OMAP2420)
-# define OMAP_32KSYNCT_BASE            0x48004000
-#elif defined(CONFIG_ARCH_OMAP2430)
-# define OMAP_32KSYNCT_BASE            0x49020000
-#elif defined(CONFIG_ARCH_OMAP3430)
-# define OMAP_32KSYNCT_BASE            0x48320000
-#else
-# error Unknown OMAP device
-#endif
 
 /* Private functions */
 
@@ -134,18 +124,18 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
                    (od->dev_wakeup_lat <= od->_dev_wakeup_lat_limit))
                        break;
 
-               getnstimeofday(&a);
+               read_persistent_clock(&a);
 
                /* XXX check return code */
                odpl->activate_func(od);
 
-               getnstimeofday(&b);
+               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: "
@@ -190,18 +180,18 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
                     od->_dev_wakeup_lat_limit))
                        break;
 
-               getnstimeofday(&a);
+               read_persistent_clock(&a);
 
                /* XXX check return code */
                odpl->deactivate_func(od);
 
-               getnstimeofday(&b);
+               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: "