Commit f66e329d authored by Rajendra Nayak's avatar Rajendra Nayak Committed by Paul Walmsley

ARM: OMAP2+: Avoid idling memory controllers with no drivers

Memory controllers in OMAP (like GPMC and EMIF) have the hwmods marked with
HWMOD_INIT_NO_IDLE and are left in enabled state post initial setup.

Even if they have drivers missing, avoid idling them as part of
omap_device_late_idle()
Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
Tested-by: default avatarMark Jackson <mpfj-list@newflow.co.uk>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 7dedd346
...@@ -842,6 +842,7 @@ static int __init omap_device_late_idle(struct device *dev, void *data) ...@@ -842,6 +842,7 @@ static int __init omap_device_late_idle(struct device *dev, void *data)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct omap_device *od = to_omap_device(pdev); struct omap_device *od = to_omap_device(pdev);
int i;
if (!od) if (!od)
return 0; return 0;
...@@ -850,6 +851,15 @@ static int __init omap_device_late_idle(struct device *dev, void *data) ...@@ -850,6 +851,15 @@ static int __init omap_device_late_idle(struct device *dev, void *data)
* If omap_device state is enabled, but has no driver bound, * If omap_device state is enabled, but has no driver bound,
* idle it. * idle it.
*/ */
/*
* Some devices (like memory controllers) are always kept
* enabled, and should not be idled even with no drivers.
*/
for (i = 0; i < od->hwmods_cnt; i++)
if (od->hwmods[i]->flags & HWMOD_INIT_NO_IDLE)
return 0;
if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) { if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) {
if (od->_state == OMAP_DEVICE_STATE_ENABLED) { if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
dev_warn(dev, "%s: enabled but no driver. Idling\n", dev_warn(dev, "%s: enabled but no driver. Idling\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment