Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp506583imm; Thu, 5 Jul 2018 04:17:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfZ32o7Cn0aUI7rppafeZbuLgKn0hZg4aeLItsYKpZCQP/8DD5oFZA5eXW26HizzeJyKXZI X-Received: by 2002:a17:902:8308:: with SMTP id bd8-v6mr5782853plb.329.1530789474296; Thu, 05 Jul 2018 04:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530789474; cv=none; d=google.com; s=arc-20160816; b=mR+psI2B0QAqhbsWEy4/QSnHWyakjFKL/5ch7FNUMFf5jmrrtwKu8lhlWjnUqs7kHz KQDAnPIQYmuAv/zjaaR33lWXcJn7ttC0M42Ae/39iDUwLRK0tPpP/3UZEKpsJzoDiwwY OLFTkZysMARhB5xj8b2PUSNQUrneuZsxmjv60Mp2dqt40PwB+lBXs6MHPfkC4JUOcF13 oaC9oNyk7nFBX43AdJwfWQAqfK8DFcYJp0AulXxlR6ZCJwayHWm8Cd3SvuAbDzc9F8vl uJ8oInqurFh7T0UWKA1RSutWZ3PmY6eDWvtta1WotVY8TcFWtzXaI0Wf2dsL8xBnQvBH GjWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=h6rXoiLaLikbA++QuZcMI60eDsm7+fNmkAnZkb+3c7w=; b=VWP24s4/TU3ZmdgUUshMxG+FpooUrOmYECmQ4NgQCiFGmPQL9dT7juPa07pNK335E7 jXUw3i4OA3Lx7ZZY0fo9fg+Ze2odjztN5Bv45qUKuG9igoo1NQ5VuWR5LjZG/ywxxhT0 WgW0VxKFj9z1NgWh/4MmVI0LtUi0KqfkcdWdbw0xGdKLMtJU6xz+oepv1g0iuRRhY0YX KR5odolSkCxG86mqFCT91vHH1s5xkLFfX5UHUNeKOEuFjF3w2rW658WAkG1vILOJrSbi XMnHYfJf/YsHiHzxyjc+3okPXbrj7yKFqW0h0fuZug53m/0qZTHHYODVJnv/wkj9jgeV Lrmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=hXRbOCwQ; 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 t4-v6si5775090plb.313.2018.07.05.04.17.39; Thu, 05 Jul 2018 04:17:54 -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=@agner.ch header.s=dkim header.b=hXRbOCwQ; 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 S1753845AbeGELQe (ORCPT + 99 others); Thu, 5 Jul 2018 07:16:34 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:38110 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753634AbeGELQc (ORCPT ); Thu, 5 Jul 2018 07:16:32 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 0CA595C1B73; Thu, 5 Jul 2018 13:16:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1530789391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h6rXoiLaLikbA++QuZcMI60eDsm7+fNmkAnZkb+3c7w=; b=hXRbOCwQ0x/1nuGByjKugog4/WHkQETOyNJB30eaen/WvNfbHtb96NzJGuPlvCA1Uqcg+I TMdN3mWWkF3Sf46GRkR7KYoTZyUyV7mgQ0ADRyZU7Kqgf+USGYsxvqEN3TYL7wZc9KqJAs 58YI7v4yMWU6aX5b4hquEaHgTZhMPHY= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Thu, 05 Jul 2018 13:16:31 +0200 From: Stefan Agner To: "A.s. Dong" Cc: adrian.hunter@intel.com, ulf.hansson@linaro.org, Fabio Estevam , Bough Chen , michael@amarulasolutions.com, rmk+kernel@armlinux.org.uk, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mmc: sdhci-esdhc-imx: get rid of support_vsel In-Reply-To: References: <20180628081331.13051-1-stefan@agner.ch> <20180628081331.13051-2-stefan@agner.ch> Message-ID: <318c0d9a93679df5abddeeef499f95c4@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.4 X-Spamd-Result: default: False [-3.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_RCPT(0.00)[kernel]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[9]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; ASN(0.00)[asn:29691, ipnet:2a02:418::/29, country:CH]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[99.99%]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.07.2018 04:52, A.s. Dong wrote: >> -----Original Message----- >> From: Stefan Agner [mailto:stefan@agner.ch] >> Sent: Thursday, June 28, 2018 4:13 PM >> To: adrian.hunter@intel.com; ulf.hansson@linaro.org >> Cc: Fabio Estevam ; Bough Chen >> ; A.s. Dong ; >> michael@amarulasolutions.com; rmk+kernel@armlinux.org.uk; linux- >> mmc@vger.kernel.org; linux-kernel@vger.kernel.org; Stefan Agner >> >> Subject: [PATCH 1/3] mmc: sdhci-esdhc-imx: get rid of support_vsel >> >> The field support_vsel is currently only used in the device tree case. Get rid >> of it. No change in behavior. >> > > I'm not sure if it's quite necessary to remove it as it's used to bypass > 100Mhz above pad settings look up which is meaningless if user claims > no 1-8 v support. > > If you remove it, probably you still need better check the quirk for > Pad state look up. There should be really no change in behavior, just simplifying code: If no-1-8-v is set, SDHCI_QUIRK2_NO_1_8_V will be set in any case. If no-1-8-v is not set, SDHCI_QUIRK2_NO_1_8_V will be set depending on whether pinctrl states are available This has been the case before and after this change. -- Stefan > > Regards > Dong Aisheng > >> Signed-off-by: Stefan Agner >> --- >> drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++------ >> include/linux/platform_data/mmc-esdhc-imx.h | 2 -- >> 2 files changed, 2 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci- >> esdhc-imx.c >> index 6f444731754d..20a420b765b3 100644 >> --- a/drivers/mmc/host/sdhci-esdhc-imx.c >> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c >> @@ -1145,18 +1145,14 @@ sdhci_esdhc_imx_probe_dt(struct >> platform_device *pdev, >> &boarddata->tuning_start_tap); >> >> if (of_find_property(np, "no-1-8-v", NULL)) >> - boarddata->support_vsel = false; >> - else >> - boarddata->support_vsel = true; >> + host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; >> >> if (of_property_read_u32(np, "fsl,delay-line", &boarddata- >> >delay_line)) >> boarddata->delay_line = 0; >> >> mmc_of_parse_voltage(np, &host->ocr_mask); >> >> - /* sdr50 and sdr104 need work on 1.8v signal voltage */ >> - if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data) && >> - !IS_ERR(imx_data->pins_default)) { >> + if (esdhc_is_usdhc(imx_data) && !IS_ERR(imx_data->pins_default)) >> { >> imx_data->pins_100mhz = pinctrl_lookup_state(imx_data- >> >pinctrl, >> >> ESDHC_PINCTRL_STATE_100MHZ); >> imx_data->pins_200mhz = pinctrl_lookup_state(imx_data- >> >pinctrl, >> diff --git a/include/linux/platform_data/mmc-esdhc-imx.h >> b/include/linux/platform_data/mmc-esdhc-imx.h >> index 7daa78a2f342..640dec8b5b0c 100644 >> --- a/include/linux/platform_data/mmc-esdhc-imx.h >> +++ b/include/linux/platform_data/mmc-esdhc-imx.h >> @@ -34,7 +34,6 @@ enum cd_types { >> * @cd_gpio: gpio for card_detect interrupt >> * @wp_type: type of write_protect method (see wp_types enum above) >> * @cd_type: type of card_detect method (see cd_types enum above) >> - * @support_vsel: indicate it supports 1.8v switching >> */ >> >> struct esdhc_platform_data { >> @@ -43,7 +42,6 @@ struct esdhc_platform_data { >> enum wp_types wp_type; >> enum cd_types cd_type; >> int max_bus_width; >> - bool support_vsel; >> unsigned int delay_line; >> unsigned int tuning_step; /* The delay cell steps in tuning >> procedure */ >> unsigned int tuning_start_tap; /* The start delay cell point in tuning >> procedure */ >> -- >> 2.18.0