From patchwork Wed Jan 23 16:37:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2026021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 2F73D3FE4F for ; Wed, 23 Jan 2013 16:41:10 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Ty3LA-0002QY-TZ; Wed, 23 Jan 2013 16:38:20 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Ty3Kr-0002LV-UK for linux-arm-kernel@lists.infradead.org; Wed, 23 Jan 2013 16:38:02 +0000 Received: from axis700.grange (dslb-178-006-250-035.pools.arcor-ip.net [178.6.250.35]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0LdPLa-1Ugm0L2NxC-00ikbZ; Wed, 23 Jan 2013 17:38:00 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 3987340BC5; Wed, 23 Jan 2013 17:37:58 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1Ty3Kn-0000lG-QA; Wed, 23 Jan 2013 17:37:57 +0100 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Subject: [PATCH v3 6/8] ARM: shmobile: use GPIO SD-card detection on armadillo800eva Date: Wed, 23 Jan 2013 17:37:49 +0100 Message-Id: <1358959071-2873-7-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1358959071-2873-1-git-send-email-g.liakhovetski@gmx.de> References: <1358959071-2873-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:DUGGuIQGX0bMhhaTdg7BL+282G+vSNb8W5XYR/Kk/U4 Ld8JnL/Wys+ZM1GJkB31ttO7pXrSMLWdfjlWH/wZqdKU4qQFLo RfNe7qHxK1itmJu0UcPDZvWfAVTh1W5NzX2cA0hu52EnRQVl/F 8Idoj7S4SADpbXTd/0fEl971Xo2bJnlsOCEoEcHvSVh7zQd+y1 6F53b3KnQqFHMYKEOzooSeICGolfRLwBCbGNbbJJhetgXiQ28a 0EefAqseKrq/JgQzDNdyy6FfJiODAVfXTjcqkMvu9u9GcYR+XD 0vGJl8Seg2DGeN8NXmaOgyARzZJkUMduFgb36B334Vm4PlM3Md 1xFpbs1YUtxwK9tQJhaZePlFn+9a1JwvlBHEbz2Fkmmzl+5DYy ApV6yp7Nr9yoA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130123_113802_234310_ECCAFE36 X-CRM114-Status: GOOD ( 11.08 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.9 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (g.liakhovetski[at]gmx.de) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Linus Walleij , Magnus Damm , Simon Horman , Laurent Pinchart , Guennadi Liakhovetski , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Switch SDHI0 and SDHI1 SD-card interfaces on armadillo800eva to using GPIO card detection, which provides maximum power saving and automatically selects IRQ or polling mode, depending on the CD GPIO capability. Signed-off-by: Guennadi Liakhovetski --- arch/arm/mach-shmobile/board-armadillo800eva.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index e657a7a..1cf1157 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -580,10 +580,10 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] = static struct sh_mobile_sdhi_info sdhi0_info = { .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, - .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |\ - MMC_CAP_NEEDS_POLL, + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, - .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, + .cd_gpio = GPIO_PORT167, }; static struct resource sdhi0_resources[] = { @@ -624,7 +624,9 @@ static struct sh_mobile_sdhi_info sdhi1_info = { .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, - .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, + /* Port72 cannot generate IRQs, will be used in polling mode. */ + .cd_gpio = GPIO_PORT72, }; static struct resource sdhi1_resources[] = {