Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184641
b: refs/heads/master
c: 9799aca
h: refs/heads/master
i:
  184639: 15577a5
v: v3
  • Loading branch information
Kevin Hilman authored and Paul Walmsley committed Jan 27, 2010
1 parent 58a5b27 commit 27f730a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0271d65f9ac511d2e3e1fdbcd7418a5a7df0769
refs/heads/master: 9799aca2032ad53418ff4bc0d1a6f2cb4f79b6c0
4 changes: 4 additions & 0 deletions trunk/arch/arm/plat-omap/include/plat/omap_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,15 @@ int omap_device_enable_clocks(struct omap_device *od);
*/
struct omap_device_pm_latency {
u32 deactivate_lat;
u32 deactivate_lat_worst;
int (*deactivate_func)(struct omap_device *od);
u32 activate_lat;
u32 activate_lat_worst;
int (*activate_func)(struct omap_device *od);
u32 flags;
};

#define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1)

/* Get omap_device pointer from platform_device pointer */
#define to_omap_device(x) container_of((x), struct omap_device, pdev)
Expand Down
41 changes: 33 additions & 8 deletions trunk/arch/arm/plat-omap/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,22 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
"%llu nsec\n", od->pdev.name, od->pm_lat_level,
act_lat);

WARN(act_lat > odpl->activate_lat, "omap_device: %s.%d: "
"activate step %d took longer than expected (%llu > %d)\n",
od->pdev.name, od->pdev.id, od->pm_lat_level,
act_lat, odpl->activate_lat);
if (act_lat > odpl->activate_lat) {
odpl->activate_lat_worst = act_lat;
if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
odpl->activate_lat = act_lat;
pr_warning("omap_device: %s.%d: new worst case "
"activate latency %d: %llu\n",
od->pdev.name, od->pdev.id,
od->pm_lat_level, act_lat);
} else
pr_warning("omap_device: %s.%d: activate "
"latency %d higher than exptected. "
"(%llu > %d)\n",
od->pdev.name, od->pdev.id,
od->pm_lat_level, act_lat,
odpl->activate_lat);
}

od->dev_wakeup_lat -= odpl->activate_lat;
}
Expand Down Expand Up @@ -204,10 +216,23 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
"%llu nsec\n", od->pdev.name, od->pm_lat_level,
deact_lat);

WARN(deact_lat > odpl->deactivate_lat, "omap_device: %s.%d: "
"deactivate step %d took longer than expected "
"(%llu > %d)\n", od->pdev.name, od->pdev.id,
od->pm_lat_level, deact_lat, odpl->deactivate_lat);
if (deact_lat > odpl->deactivate_lat) {
odpl->deactivate_lat_worst = deact_lat;
if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
odpl->deactivate_lat = deact_lat;
pr_warning("omap_device: %s.%d: new worst case "
"deactivate latency %d: %llu\n",
od->pdev.name, od->pdev.id,
od->pm_lat_level, deact_lat);
} else
pr_warning("omap_device: %s.%d: deactivate "
"latency %d higher than exptected. "
"(%llu > %d)\n",
od->pdev.name, od->pdev.id,
od->pm_lat_level, deact_lat,
odpl->deactivate_lat);
}


od->dev_wakeup_lat += odpl->activate_lat;

Expand Down

0 comments on commit 27f730a

Please sign in to comment.