From patchwork Thu Aug 5 07:22:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 117226 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o757MACC027934 for ; Thu, 5 Aug 2010 07:22:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759830Ab0HEHWJ (ORCPT ); Thu, 5 Aug 2010 03:22:09 -0400 Received: from smtp.nokia.com ([192.100.105.134]:17485 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758296Ab0HEHWI (ORCPT ); Thu, 5 Aug 2010 03:22:08 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o757LZgC002374; Thu, 5 Aug 2010 02:22:03 -0500 Received: from vaepf101.NOE.Nokia.com ([10.160.244.86]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 5 Aug 2010 10:21:55 +0300 Received: from [172.21.40.78] ([172.21.40.78]) by vaepf101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 5 Aug 2010 10:21:55 +0300 Message-ID: <4C5A669D.9070202@nokia.com> Date: Thu, 05 Aug 2010 10:22:05 +0300 From: Adrian Hunter User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Tony Lindgren CC: linux-omap Mailing List , "Lavinen Jarkko (Nokia-M/Helsinki)" Subject: [PATCH] omap: hsmmc: Do not mux the slot if non default muxing is already done X-OriginalArrivalTime: 05 Aug 2010 07:21:55.0640 (UTC) FILETIME=[E2359380:01CB346E] X-Nokia-AV: Clean 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 (demeter.kernel.org [140.211.167.41]); Thu, 05 Aug 2010 07:22:11 +0000 (UTC) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 2dbb265..c6329eb 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -608,6 +608,9 @@ static inline void omap_hsmmc_reset(void) {} static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, int controller_nr) { + if (mmc_controller->slots[0].nomux) + return; + if ((mmc_controller->slots[0].switch_pin > 0) && \ (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 1ef54b0..e1ec467 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -267,6 +267,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) mmc->slots[0].switch_pin = c->gpio_cd; mmc->slots[0].gpio_wp = c->gpio_wp; + mmc->slots[0].nomux = c->nomux; mmc->slots[0].remux = c->remux; if (c->cover_only) diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index 36f0ba8..56d65cc 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h @@ -16,6 +16,7 @@ struct omap2_hsmmc_info { bool power_saving; /* Try to sleep or power off when possible */ bool no_off; /* power_saving and power is not to go off */ bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */ + bool nomux; /* No default muxing for this slot */ int gpio_cd; /* or -EINVAL */ int gpio_wp; /* or -EINVAL */ char *name; /* or NULL for default */