Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | omap_device |
struct | omap_device_pm_latency |
Macros | |
#define | OMAP_DEVICE_STATE_UNKNOWN 0 |
#define | OMAP_DEVICE_STATE_ENABLED 1 |
#define | OMAP_DEVICE_STATE_IDLE 2 |
#define | OMAP_DEVICE_STATE_SHUTDOWN 3 |
#define | OMAP_DEVICE_SUSPENDED BIT(0) |
#define | OMAP_DEVICE_NO_IDLE_ON_SUSPEND BIT(1) |
#define | OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1) |
Variables | |
struct dev_pm_domain | omap_device_pm_domain |
#define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1) |
Definition at line 160 of file omap_device.h.
#define OMAP_DEVICE_NO_IDLE_ON_SUSPEND BIT(1) |
Definition at line 49 of file omap_device.h.
#define OMAP_DEVICE_STATE_ENABLED 1 |
Definition at line 43 of file omap_device.h.
#define OMAP_DEVICE_STATE_IDLE 2 |
Definition at line 44 of file omap_device.h.
#define OMAP_DEVICE_STATE_SHUTDOWN 3 |
Definition at line 45 of file omap_device.h.
#define OMAP_DEVICE_STATE_UNKNOWN 0 |
Definition at line 42 of file omap_device.h.
#define OMAP_DEVICE_SUSPENDED BIT(0) |
Definition at line 48 of file omap_device.h.
int omap_device_align_pm_lat | ( | struct platform_device * | pdev, |
u32 | new_wakeup_lat_limit | ||
) |
omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim : struct omap_device *
When a device's maximum wakeup latency limit changes, call some of the .activate_func or .deactivate_func function pointers in the omap_device's pm_lats array to ensure that the device's maximum wakeup latency is less than or equal to the new latency limit. Intended to be called by OMAP PM code whenever a device's maximum wakeup latency limit changes (e.g., via omap_pm_set_dev_wakeup_lat()). Returns 0 if nothing needs to be done (e.g., if the omap_device is not currently idle, or if the wakeup latency is already current with the new limit) or passes along the return value of _omap_device_deactivate() or _omap_device_activate().
Definition at line 1056 of file omap_device.c.
|
read |
omap_device_alloc - allocate an omap_device : platform_device that will be included in this omap_device : ptr to the single omap_hwmod that backs this omap_device : platform_data ptr to associate with the platform_device : amount of memory pointed to by : pointer to a omap_device_pm_latency array for this device : ARRAY_SIZE() of
Convenience function for allocating an omap_device structure and filling hwmods, resources and pm_latency attributes.
Returns an struct omap_device pointer or ERR_PTR() on error;
Definition at line 536 of file omap_device.c.
int omap_device_assert_hardreset | ( | struct platform_device * | pdev, |
const char * | name | ||
) |
Definition at line 997 of file omap_device.c.
|
read |
omap_device_build - build and register an omap_device with one omap_hwmod : name of the platform_device driver to use : this platform_device's connection ID : ptr to the single omap_hwmod that backs this omap_device : platform_data ptr to associate with the platform_device : amount of memory pointed to by : pointer to a omap_device_pm_latency array for this device : ARRAY_SIZE() of : should the device be registered as an early device or not
Convenience function for building and registering a single omap_device record, which in turn builds and registers a platform_device record. See omap_device_build_ss() for more information. Returns ERR_PTR(-EINVAL) if is NULL; otherwise, passes along the return value of omap_device_build_ss().
Definition at line 666 of file omap_device.c.
|
read |
omap_device_build_ss - build and register an omap_device with multiple hwmods : name of the platform_device driver to use : this platform_device's connection ID : ptr to the single omap_hwmod that backs this omap_device : platform_data ptr to associate with the platform_device : amount of memory pointed to by : pointer to a omap_device_pm_latency array for this device : ARRAY_SIZE() of : should the device be registered as an early device or not
Convenience function for building and registering an omap_device subsystem record. Subsystem records consist of multiple omap_hwmods. This function in turn builds and registers a platform_device record. Returns an ERR_PTR() on error, or passes along the return value of omap_device_register().
Definition at line 699 of file omap_device.c.
int omap_device_deassert_hardreset | ( | struct platform_device * | pdev, |
const char * | name | ||
) |
Definition at line 1024 of file omap_device.c.
void omap_device_delete | ( | struct omap_device * | od | ) |
Definition at line 638 of file omap_device.c.
int omap_device_disable_clocks | ( | struct omap_device * | od | ) |
omap_device_disable_clocks - disable all main and interface clocks : struct omap_device *od
Disable the main functional clock and interface clock for all of the omap_hwmods associated with the omap_device. Returns 0.
Definition at line 1202 of file omap_device.c.
int omap_device_enable | ( | struct platform_device * | pdev | ) |
omap_device_enable - fully activate an omap_device : struct omap_device * to activate
Do whatever is necessary for the hwmods underlying omap_device to be accessible and ready to operate. This generally involves enabling clocks, setting SYSCONFIG registers; and in the future may involve remuxing pins. Device drivers should call this function (through platform_data function pointers) where they would normally enable clocks, etc. Returns -EINVAL if called when the omap_device is already enabled, or passes along the return value of _omap_device_activate().
Definition at line 888 of file omap_device.c.
int omap_device_enable_clocks | ( | struct omap_device * | od | ) |
omap_device_enable_clocks - enable all main and interface clocks : struct omap_device *od
Enable the main functional clock and interface clock for all of the omap_hwmods associated with the omap_device. Returns 0.
Definition at line 1220 of file omap_device.c.
int omap_device_enable_hwmods | ( | struct omap_device * | od | ) |
omap_device_enable_hwmods - call omap_hwmod_enable() on all hwmods : struct omap_device *od
Enable all underlying hwmods. Returns 0.
Definition at line 1167 of file omap_device.c.
omap_device_get_by_hwmod_name() - convert a hwmod name to device pointer. : name of the hwmod device
Returns back a struct device * pointer associated with a hwmod device represented by a hwmod_name
Definition at line 1128 of file omap_device.c.
int omap_device_get_context_loss_count | ( | struct platform_device * | pdev | ) |
omap_device_get_context_loss_count - get lost context count : struct omap_device *
Using the primary hwmod, query the context loss count for this device.
Callers should consider context for this device lost any time this function returns a value different than the value the caller got the last time it called this function.
If any hwmods exist for the omap_device assoiated with , return the context loss counter for that hwmod, otherwise return zero.
Definition at line 429 of file omap_device.c.
|
read |
omap_device_get_pwrdm - return the powerdomain * associated with : struct omap_device *
Return the powerdomain associated with the first underlying omap_hwmod for this omap_device. Intended for use by core OMAP PM code. Returns NULL on error or a struct powerdomain * upon success.
Definition at line 1088 of file omap_device.c.
void __iomem* omap_device_get_rt_va | ( | struct omap_device * | od | ) |
omap_device_get_mpu_rt_va - return the MPU's virtual addr for the hwmod base : struct omap_device *
Return the MPU's virtual address for the base of the hwmod, from the ioremap() that the hwmod code does. Only valid if there is one hwmod associated with this device. Returns NULL if there are zero or more than one hwmods associated with this omap_device; otherwise, passes along the return value from omap_hwmod_get_mpu_rt_va().
Definition at line 1112 of file omap_device.c.
int omap_device_idle | ( | struct platform_device * | pdev | ) |
omap_device_idle - idle an omap_device : struct omap_device * to idle
Idle omap_device by calling as many .deactivate_func() entries in the omap_device's pm_lats table as is possible without exceeding the device's maximum wakeup latency limit, pm_lat_limit. Device drivers should call this function (through platform_data function pointers) where they would normally disable clocks after operations complete, etc.. Returns -EINVAL if the omap_device is not currently enabled, or passes along the return value of _omap_device_deactivate().
Definition at line 928 of file omap_device.c.
int omap_device_idle_hwmods | ( | struct omap_device * | od | ) |
omap_device_idle_hwmods - call omap_hwmod_idle() on all hwmods : struct omap_device *od
Idle all underlying hwmods. Returns 0.
Definition at line 1184 of file omap_device.c.
int omap_device_register | ( | struct platform_device * | pdev | ) |
omap_device_register - register an omap_device with one omap_hwmod : struct omap_device * to register
Register the omap_device structure. This currently just calls platform_device_register() on the underlying platform_device. Returns the return value of platform_device_register().
Definition at line 864 of file omap_device.c.
int omap_device_shutdown | ( | struct platform_device * | pdev | ) |
omap_device_shutdown - shut down an omap_device : struct omap_device * to shut down
Shut down omap_device by calling all .deactivate_func() entries in the omap_device's pm_lats table and then shutting down all of the underlying omap_hwmods. Used when a device is being "removed" or a device driver is being unloaded. Returns -EINVAL if the omap_device is not currently enabled or idle, or passes along the return value of _omap_device_deactivate().
Definition at line 960 of file omap_device.c.
struct dev_pm_domain omap_device_pm_domain |
Definition at line 846 of file omap_device.c.