Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2513069imm; Mon, 24 Sep 2018 05:44:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV60jdi3X/5UfGGW74Obskm2iZPqgDJhsYtWASRBVjP8yJw/HHqGjvT3bQrCqo8UwmIaN72C7 X-Received: by 2002:a17:902:744c:: with SMTP id e12-v6mr7487072plt.186.1537793056861; Mon, 24 Sep 2018 05:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537793056; cv=none; d=google.com; s=arc-20160816; b=m+qpfOKPbS04vfz9lkHuJYML+poH/4n4U9RcNHZeuqu46yXYGiv93XWATEyYHi+6Ql +Pnmo0edTZn/IZlx814+wOM9BOO8G4KAx1c6R+Jps/gKSlpPGOJVdgs5oUtEkaDyoqdn uZEvuV361SBFXwX/aW/QhYOGMakUDJhFe2oMwZBa+B2kDGWhKBDgYtuFp6sLezQCIhMZ NCCCSEZZxp5nUhZ+lNWa2gRUMtf+Ru6glMQ//1bEgaO1Azxa7S9m9zhuoVw5Ja9544yP ZOmwXMbJxBB0vrgpCkmclwBE9LyhcYzTQ+viiE7zdgxFYkYW7UjIidxgRc45jd03+gk+ Saug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=imlppcmoW5v/H/8ERrdCe4Ojf+wKjj15AZvSL7Sdt6s=; b=HOsX63S9NxeglHME3ExHaPhVFEyTKTWvO9NTY2i6kU0KHdgpjECPaVnQRFbOknNKaO oklc1Bt+mExgeUt5z7P7LHpgcYKyaQ6WVIknz3Y6sI9UKm3/Ii7rgsQ44nVPNPgOmlS2 aOMZuXrBGvUtvmkdBzCor7gFeJq+l7AoPt3uiFEEODog2k6oT4jfUZtltIRoQMgf9T67 v5P6jPn4d099F3eoeA4CYWSi5tmlVZgluc9eqsH05Q80C4I1ri4RkGzCb2B7NoKt668n D990WDJ50qxFUJiGRxNI/iVda94QsXoxM40AOktMqqey6NIx++3kmzeCL3O0VB0/e7Cz 5ugQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b190-v6si35967015pfg.94.2018.09.24.05.44.01; Mon, 24 Sep 2018 05:44:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388850AbeIXSnv (ORCPT + 99 others); Mon, 24 Sep 2018 14:43:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59212 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729543AbeIXSnv (ORCPT ); Mon, 24 Sep 2018 14:43:51 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A3C7C109E; Mon, 24 Sep 2018 12:41:52 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Agner , Ulf Hansson , Sasha Levin Subject: [PATCH 4.18 183/235] mmc: sdhci: do not try to use 3.3V signaling if not supported Date: Mon, 24 Sep 2018 13:52:49 +0200 Message-Id: <20180924113122.880446864@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Agner [ Upstream commit 1b5190c2e74c47ebe4bcecf7a072358ad9f1feaa ] For eMMC devices it is valid to only support 1.8V signaling. When vqmmc is set to a fixed 1.8V regulator the stack tries to set 3.3V initially and prints the following warning: mmc1: Switching to 3.3V signalling voltage failed Clear the MMC_SIGNAL_VOLTAGE_330 flag in case 3.3V is signaling is not available. This prevents the stack from even trying to use 3.3V signaling and avoids the above warning. Signed-off-by: Stefan Agner Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3734,14 +3734,21 @@ int sdhci_setup_host(struct sdhci_host * mmc_gpio_get_cd(host->mmc) < 0) mmc->caps |= MMC_CAP_NEEDS_POLL; - /* If vqmmc regulator and no 1.8V signalling, then there's no UHS */ if (!IS_ERR(mmc->supply.vqmmc)) { ret = regulator_enable(mmc->supply.vqmmc); + + /* If vqmmc provides no 1.8V signalling, then there's no UHS */ if (!regulator_is_supported_voltage(mmc->supply.vqmmc, 1700000, 1950000)) host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50); + + /* In eMMC case vqmmc might be a fixed 1.8V regulator */ + if (!regulator_is_supported_voltage(mmc->supply.vqmmc, 2700000, + 3600000)) + host->flags &= ~SDHCI_SIGNALING_330; + if (ret) { pr_warn("%s: Failed to enable vqmmc regulator: %d\n", mmc_hostname(mmc), ret);