From patchwork Wed Jan 16 17:08:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1992231 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 E433A3FDD1 for ; Wed, 16 Jan 2013 17:13:16 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TvWUV-0001k5-98; Wed, 16 Jan 2013 17:09:32 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TvWTP-0001OH-Dm for linux-arm-kernel@lists.infradead.org; Wed, 16 Jan 2013 17:08:25 +0000 Received: from axis700.grange (dslb-178-006-255-053.pools.arcor-ip.net [178.6.255.53]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MV5B7-1TS2LH3UwH-00YU0D; Wed, 16 Jan 2013 18:08:19 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id D715840BB8; Wed, 16 Jan 2013 18:08:17 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1TvWTJ-0006pF-MH; Wed, 16 Jan 2013 18:08:17 +0100 From: Guennadi Liakhovetski To: Linus Walleij Subject: [PATCH 6/8] ARM: shmobile: use GPIO SD-card detection on armadillo800eva Date: Wed, 16 Jan 2013 18:08:15 +0100 Message-Id: <1358356097-26180-7-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1358356097-26180-1-git-send-email-g.liakhovetski@gmx.de> References: <1358356097-26180-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:A5JUFM/s2IujUfgkruHaBda4HShmURdExfcurEU1GCe vxVGoeT8wJTuZuc9BMqq5BmtglA/UWC6lFGLPjFTEUL+/qvCzp 6+0c8x/+P+vdufYqLEkbY1SNo2x/sUrxQZI5/xyyXIItnr9GB+ VsvbSeZeyDY1JcU6dL2ACaUShDxxIcrEccBpm79UHDLDk5SAwe 0gLwHaOB00aM5NuXCv17Kf2IngHco4N6atoFrcTZvhjMmobhsv wkEKBJZQKMRifAzjbAqDSOAEFLlCFBWqio5QsdoQptx/U5UQ17 hhryUl/11Ky7tzfWafVhK5OhRZG1daZCCeDPIDTnD8UoMAic0U EGmIr6Bd4vP4GmVQsrvjow+JrmcxWZDXIUs3V6BedDR7pQwiFu EViinhZxXEhSA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130116_120824_034453_7A2A2489 X-CRM114-Status: GOOD ( 11.07 ) 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.10 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: Simon Horman , Magnus Damm , Laurent Pinchart , linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.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[] = {