From patchwork Mon Jan 28 14:08:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Rudholm X-Patchwork-Id: 14308 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7D58F23F8C for ; Mon, 28 Jan 2013 14:09:37 +0000 (UTC) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by fiordland.canonical.com (Postfix) with ESMTP id 3032DA181B1 for ; Mon, 28 Jan 2013 14:09:37 +0000 (UTC) Received: by mail-vb0-f43.google.com with SMTP id fr13so1872985vbb.30 for ; Mon, 28 Jan 2013 06:09:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:mime-version:content-type:x-gm-message-state; bh=eikANNjROKuY3xtMAF8n3agfZiptCdXRT8TRq07+HJ0=; b=nIS7fKWWOeODx77vPZGI2wOvEgVHNc1EIYvZXif8E4kw4Bs+0n2oqYhjai54vZZjI/ b7KRt0Q3aNvrBeDjWcyMmymlq2RKGt+4wOcVNbIhfK9g4ev49JXBlU77owJKVRjTPeUM Yyzcoh1fAVZ0OAQFtrOMDdbe5CLSIrM+MhfG4JBGqn6NMk5oMIH2p+ZiTwbGeGP8cFpE 5t/DTKLwruzF1aYHDE04wN2PRamrJJLmXTgyAiub+EuR4rdcZ1ZpGD2Vf5bVz6AtoLro YMu0EUhmcZL4ynTETjUFJzbJtcytKu3QPseDbD5ARPcRQ9TLVKgfdYS0nQzP5pdsxEpW U+Vg== X-Received: by 10.220.238.139 with SMTP id ks11mr14661129vcb.49.1359382176661; Mon, 28 Jan 2013 06:09:36 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp86539veb; Mon, 28 Jan 2013 06:09:36 -0800 (PST) X-Received: by 10.14.214.67 with SMTP id b43mr51710113eep.33.1359382174614; Mon, 28 Jan 2013 06:09:34 -0800 (PST) Received: from eu1sys200aog101.obsmtp.com (eu1sys200aog101.obsmtp.com [207.126.144.111]) by mx.google.com with SMTP id k5si16726190eed.87.2013.01.28.06.09.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Jan 2013 06:09:34 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.111 is neither permitted nor denied by best guess record for domain of johan.rudholm@stericsson.com) client-ip=207.126.144.111; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.111 is neither permitted nor denied by best guess record for domain of johan.rudholm@stericsson.com) smtp.mail=johan.rudholm@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKUQaGjXTmbbILK82GufX9IxWfbknjD+OG@postini.com; Mon, 28 Jan 2013 14:09:34 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7DC96190; Mon, 28 Jan 2013 14:08:40 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 87ADA4A01; Mon, 28 Jan 2013 14:08:40 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id B4EFEA807E; Mon, 28 Jan 2013 15:08:34 +0100 (CET) Received: from steludxu1610.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 28 Jan 2013 15:08:39 +0100 From: Johan Rudholm To: , Chris Ball Cc: Per Forlin , Ulf Hansson , Fredrik Soderstedt , Kevin Liu , Philip Rakity , Daniel Drake , Aaron , Subhash Jadavani , Sujit Reddy Thumma , Wei WANG , Johan Rudholm Subject: [PATCH v6 1/5] mmc: sd: Simplify by using mmc_host_uhs Date: Mon, 28 Jan 2013 15:08:24 +0100 Message-ID: <1359382108-958-2-git-send-email-johan.rudholm@stericsson.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1359382108-958-1-git-send-email-johan.rudholm@stericsson.com> References: <1359382108-958-1-git-send-email-johan.rudholm@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnyYaB41o32lZ/nR/stN7o03g4eH4Mgf+V5OHDzsPhZBHKL18ikWlguRW5co2zhx4+brigf Signed-off-by: Johan Rudholm --- drivers/mmc/core/sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 74972c2..9373639 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -444,8 +444,7 @@ static void sd_update_bus_speed_mode(struct mmc_card *card) * If the host doesn't support any of the UHS-I modes, fallback on * default speed. */ - if (!(card->host->caps & (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | - MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_DDR50))) { + if (!mmc_host_uhs(card->host)) { card->sd_bus_speed = 0; return; } @@ -736,8 +735,7 @@ int mmc_sd_get_cid(struct mmc_host *host, u32 ocr, u32 *cid, u32 *rocr) * If the host supports one of UHS-I modes, request the card * to switch to 1.8V signaling level. */ - if (host->caps & (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | - MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_DDR50)) + if (mmc_host_uhs(host)) ocr |= SD_OCR_S18R; /*