From patchwork Thu Sep 23 00:30:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalliguddi, Hema" X-Patchwork-Id: 199522 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8MExpXi008567 for ; Wed, 22 Sep 2010 14:59:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754912Ab0IVO7u (ORCPT ); Wed, 22 Sep 2010 10:59:50 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:46047 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218Ab0IVO7t (ORCPT ); Wed, 22 Sep 2010 10:59:49 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8MExiWA028914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Sep 2010 09:59:47 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8MExew7019679; Wed, 22 Sep 2010 20:29:41 +0530 (IST) From: Hema HK To: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org Cc: Hema HK , "Basak, Partha" , Felipe Balbi , Tony Lindgren , Kevin Hilman , "Cousson, Benoit" , Paul Walmsley Subject: [PATCH 7/9 v3] OMAP: Hwmod api changes Date: Wed, 22 Sep 2010 20:30:16 -0400 Message-Id: <1285201816-26516-1-git-send-email-hemahk@ti.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Sep 2010 14:59:51 +0000 (UTC) Index: linux-omap-pm/arch/arm/mach-omap2/omap_hwmod.c =================================================================== --- linux-omap-pm.orig/arch/arm/mach-omap2/omap_hwmod.c +++ linux-omap-pm/arch/arm/mach-omap2/omap_hwmod.c @@ -654,12 +654,6 @@ static void _sysc_enable(struct omap_hwm _set_master_standbymode(oh, idlemode, &v); } - if (sf & SYSC_HAS_AUTOIDLE) { - idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ? - 0 : 1; - _set_module_autoidle(oh, idlemode, &v); - } - /* XXX OCP ENAWAKEUP bit? */ /* @@ -672,6 +666,19 @@ static void _sysc_enable(struct omap_hwm _set_clockactivity(oh, oh->class->sysc->clockact, &v); _write_sysconfig(v, oh); + + /* + * Set the auto idle bit only after setting the smartidle bit + * as this is requirement for some modules like USBOTG + * setting this will not have any impact on the other modues. + */ + + if (sf & SYSC_HAS_AUTOIDLE) { + idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ? + 0 : 1; + _set_module_autoidle(oh, idlemode, &v); + } + _write_sysconfig(v, oh); } /**