Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331294
b: refs/heads/master
c: 8bb9fde
h: refs/heads/master
v: v3
  • Loading branch information
Omar Ramirez Luna authored and Paul Walmsley committed Sep 23, 2012
1 parent bc26f71 commit 07a2c5a
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9e49024edba46463479d2830b3f36bcceb60ea9
refs/heads/master: 8bb9fde2396b6cd205f404ef6d2aa46eb5b0af26
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 @@ -118,6 +118,10 @@ int omap_device_get_context_loss_count(struct platform_device *pdev);

/* Other */

int omap_device_assert_hardreset(struct platform_device *pdev,
const char *name);
int omap_device_deassert_hardreset(struct platform_device *pdev,
const char *name);
int omap_device_idle_hwmods(struct omap_device *od);
int omap_device_enable_hwmods(struct omap_device *od);

Expand Down
55 changes: 55 additions & 0 deletions trunk/arch/arm/plat-omap/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,61 @@ int omap_device_shutdown(struct platform_device *pdev)
return ret;
}

/**
* omap_device_assert_hardreset - set a device's hardreset line
* @pdev: struct platform_device * to reset
* @name: const char * name of the reset line
*
* Set the hardreset line identified by @name on the IP blocks
* associated with the hwmods backing the platform_device @pdev. All
* of the hwmods associated with @pdev must have the same hardreset
* line linked to them for this to work. Passes along the return value
* of omap_hwmod_assert_hardreset() in the event of any failure, or
* returns 0 upon success.
*/
int omap_device_assert_hardreset(struct platform_device *pdev, const char *name)
{
struct omap_device *od = to_omap_device(pdev);
int ret = 0;
int i;

for (i = 0; i < od->hwmods_cnt; i++) {
ret = omap_hwmod_assert_hardreset(od->hwmods[i], name);
if (ret)
break;
}

return ret;
}

/**
* omap_device_deassert_hardreset - release a device's hardreset line
* @pdev: struct platform_device * to reset
* @name: const char * name of the reset line
*
* Release the hardreset line identified by @name on the IP blocks
* associated with the hwmods backing the platform_device @pdev. All
* of the hwmods associated with @pdev must have the same hardreset
* line linked to them for this to work. Passes along the return
* value of omap_hwmod_deassert_hardreset() in the event of any
* failure, or returns 0 upon success.
*/
int omap_device_deassert_hardreset(struct platform_device *pdev,
const char *name)
{
struct omap_device *od = to_omap_device(pdev);
int ret = 0;
int i;

for (i = 0; i < od->hwmods_cnt; i++) {
ret = omap_hwmod_deassert_hardreset(od->hwmods[i], name);
if (ret)
break;
}

return ret;
}

/**
* omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim
* @od: struct omap_device *
Expand Down

0 comments on commit 07a2c5a

Please sign in to comment.