summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2013-07-29 05:01:50 (GMT)
committerPaul Walmsley <paul@pwsan.com>2013-07-30 11:13:36 (GMT)
commitf66e329d889fce165074f677509d449fc92ff7b9 (patch)
tree4f491601aee180af3f8dec87bdf49393038ca1a3
parent7dedd346941d317b6b313de4746ad0354006e68b (diff)
downloadlinux-fsl-qoriq-f66e329d889fce165074f677509d449fc92ff7b9.tar.xz
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: Rajendra Nayak <rnayak@ti.com> Tested-by: Mark Jackson <mpfj-list@newflow.co.uk> Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r--arch/arm/mach-omap2/omap_device.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 5cc9287..1c82cde 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -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 omap_device *od = to_omap_device(pdev);
+ int i;
if (!od)
return 0;
@@ -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,
* 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->_state == OMAP_DEVICE_STATE_ENABLED) {
dev_warn(dev, "%s: enabled but no driver. Idling\n",