From patchwork Wed Mar 9 07:45:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: R Sricharan X-Patchwork-Id: 620611 X-Patchwork-Delegate: tony@atomide.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 p297jIfs024874 for ; Wed, 9 Mar 2011 07:45:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752181Ab1CIHpR (ORCPT ); Wed, 9 Mar 2011 02:45:17 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:49193 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348Ab1CIHpQ (ORCPT ); Wed, 9 Mar 2011 02:45:16 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p297jA62032291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Mar 2011 01:45:12 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p297j6fm026821; Wed, 9 Mar 2011 13:15:06 +0530 (IST) From: sricharan To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, tony@atomide.com, b-cousson@ti.com, santosh.shilimkar@ti.com Subject: [PATCH] omap2+: mux: Remove the use of IDLE flag. Date: Wed, 9 Mar 2011 13:15:38 +0530 Message-Id: <1299656738-7885-1-git-send-email-r.sricharan@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.6 (demeter1.kernel.org [140.211.167.41]); Wed, 09 Mar 2011 07:45:19 +0000 (UTC) diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 8717370..bb043cb 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -359,7 +359,6 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) struct omap_device_pad *pad = hmux->pads_dynamic[i]; int val = -EINVAL; - pad->flags |= OMAP_DEVICE_PAD_IDLE; val = pad->idle; omap_mux_write(pad->partition, val, pad->mux->reg_offset); @@ -369,25 +368,18 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) } /* Runtime enabling of dynamic pads */ - if ((state == _HWMOD_STATE_ENABLED) && hmux->pads_dynamic) { - int idled = 0; - + if ((state == _HWMOD_STATE_ENABLED) && hmux->pads_dynamic + && hmux->enabled) { for (i = 0; i < hmux->nr_pads_dynamic; i++) { struct omap_device_pad *pad = hmux->pads_dynamic[i]; int val = -EINVAL; - if (!(pad->flags & OMAP_DEVICE_PAD_IDLE)) - continue; - - pad->flags &= ~OMAP_DEVICE_PAD_IDLE; val = pad->enable; omap_mux_write(pad->partition, val, pad->mux->reg_offset); - idled++; } - if (idled) - return; + return; } /* Enabling or disabling of all pads */ @@ -404,7 +396,6 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) pad->name, val); break; case _HWMOD_STATE_DISABLED: - default: /* Use safe mode unless OMAP_DEVICE_PAD_REMUX */ if (flags & OMAP_DEVICE_PAD_REMUX) val = pad->off; @@ -412,6 +403,10 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) val = OMAP_MUX_MODE7; pr_debug("%s: Disabling %s %x\n", __func__, pad->name, val); + break; + default: + /* Nothing to be done */ + break; }; if (val >= 0) { diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 1d5bf42..8920fa4 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h @@ -159,7 +159,6 @@ struct omap_board_mux { u16 value; }; -#define OMAP_DEVICE_PAD_IDLE BIT(7) /* Not needed for board-*.c */ #define OMAP_DEVICE_PAD_REMUX BIT(1) /* Dynamically remux a pad, needs enable, idle and off values */