Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp616961imm; Thu, 5 Jul 2018 06:12:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe2JhWjxmgqWn5tkh91zOc5/daf16ArNjKJATHeGY3L9YJQs2QpVnlSTyJTXWvMMmtKG8Xv X-Received: by 2002:a62:675b:: with SMTP id b88-v6mr6498607pfc.24.1530796331551; Thu, 05 Jul 2018 06:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530796331; cv=none; d=google.com; s=arc-20160816; b=Z2P7EV6GljOxT9Qz2yUD7Oia6pgXC85fncviV5eIjhRcnvQWpu4t0sqrtQc86V22Ph ShZFGqBgM1MPiQNQtVs0S51D6uJqvzccz/ZPG80DUalppB+b41AMCmix86QC4wF7oSm0 /t8SrrZxakskK+vQqrE3pUy1tevcdkmv0jSqrc5sGcI1uEbyuxs330s2lFdYjF9cZ6ys BCaU1/7jesWHe15KpMt5GgCdYq5Sivzhm4kZY7PNILr6vSXTE0TqSrPER4lb7/wgKD1p k4BzF8KrGOp3SmA3kA8g3Q5CgfA8S9jK3AZqY8slgJENMBpymJxzhxYRiOexTZ8d6f9/ Qz+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=bY83nIQM5ZIls4Ebyoe6EPsn0kQlVqHVRRPsriDcF6Y=; b=XtZEo25ibFWFuiq5vCdaKXjQuuC2i7Uzkf4TpdtQ1KjchZpslECNxWI0lC2DH80h4/ /dvZRquJOoVWNVm/yn++xmoTyL6JYYu/tYQXoKSqg3B7lxW21FInDFLIU1nKjUwq6bAv /6A8hEnnBx70mV9M5/p8RImRzAnhJzI4vNTArX6wUs6Q+qtP4kcZTQXL0svRUlBvaWC+ 4lOH++wYlgDlkQ3rBz5Y6bcvfrdPQ4GKw4AMXClvtR2WdlkBhB4ruf9lBieu4PMIKEiq rjIBfBlfo0xVvDONdo/h12kWmRy6TwtZDAjYE3oHzZeN0X7BRDz3h59g+dno4En5uM1b RnVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hzDw14IZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t66-v6si5401240pgt.538.2018.07.05.06.11.57; Thu, 05 Jul 2018 06:12:11 -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; dkim=pass header.i=@linaro.org header.s=google header.b=hzDw14IZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754663AbeGENKV (ORCPT + 99 others); Thu, 5 Jul 2018 09:10:21 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:50939 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754615AbeGENKJ (ORCPT ); Thu, 5 Jul 2018 09:10:09 -0400 Received: by mail-it0-f67.google.com with SMTP id u4-v6so11900743itg.0 for ; Thu, 05 Jul 2018 06:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bY83nIQM5ZIls4Ebyoe6EPsn0kQlVqHVRRPsriDcF6Y=; b=hzDw14IZRJ2EKByRvmsDMCqDPxzEH6muzzZcxtg/dFvGRMTwbBsQd53nlwu4sbKd0M tlqzaga8h/LAB0F1GZ+1EheoA5lB+GC8evgOFva7ljf3WiM9VkwySk8hGUpU32naXaSe 1kyD1ZDXL8nGxC3YkRRq6u8dgC4GgesKbgEig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bY83nIQM5ZIls4Ebyoe6EPsn0kQlVqHVRRPsriDcF6Y=; b=L6Ad3mqsqsC1rAX1nOwcx/l8dx4Ua7/LuUBffgadlIHJQ88neJO6dRqBBtEHQazyeM vmgkNIFpDzckk49GHIB58OZWjjpJrPA+h484qub09f0Ux3O2GYJDH0tHPOzXIl7Mpmly kGKdclyUbwVJ5dlJwiBORX0L2wnteWFHBAalUfl4Ri2L4QXgOba3f+wv9elDCJX7Lqjg pu34jAeXVCifkjoLgsCTgANIE6rPS7dHB+XujVtuN7DZaQkbv27X1rrMmd0mj0CGj4Hi EL2EBgiCdbXNlTq27DfdokpTSDBoh2wPByfY0fCw8AymyP3a6kUVaxSb2RT/y5P8aXWz yfHw== X-Gm-Message-State: APt69E25sXgH/GKEFfrKcNoMxkLSxa3NkiPIRT2zsf3OjhvXUFtzApz9 Ha+evBCFjxqBifuDGeF6ZWTkyEldhzFGqAC/CyfK0Q== X-Received: by 2002:a24:69cb:: with SMTP id e194-v6mr5169884itc.102.1530796208538; Thu, 05 Jul 2018 06:10:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:818f:0:0:0:0:0 with HTTP; Thu, 5 Jul 2018 06:10:08 -0700 (PDT) In-Reply-To: <20180705121819.7157-1-stefan@agner.ch> References: <20180705121819.7157-1-stefan@agner.ch> From: Ulf Hansson Date: Thu, 5 Jul 2018 15:10:08 +0200 Message-ID: Subject: Re: [PATCH] mmc: sdhci: do not try to use 3.3V signaling if not supported To: Stefan Agner Cc: Adrian Hunter , marcel@ziswiler.com, "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5 July 2018 at 14:18, Stefan Agner wrote: > 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 Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/sdhci.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index 1c828e0e9905..a7b5602ef6f7 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -3734,14 +3734,21 @@ int sdhci_setup_host(struct sdhci_host *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); > -- > 2.18.0 >