Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2426401imu; Sun, 18 Nov 2018 23:47:48 -0800 (PST) X-Google-Smtp-Source: AJdET5fI68gFrR/m0Y0eQ1wBMWJ9Rpre+p2q031o/dkiXFHIJdW05Ig8viUyS3JcpxZ4OyDLRdvm X-Received: by 2002:a62:824c:: with SMTP id w73mr21811737pfd.150.1542613668748; Sun, 18 Nov 2018 23:47:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542613668; cv=none; d=google.com; s=arc-20160816; b=wfD1sTc597TeMWvzNK4N2pp/ERRBwXlnOcDVXbOeseooQlX6ydY2lOI/Ptpp92hp5D 5d1WN+Z4QuyA58hvStGABwGgn9ZihQxocma+y0P36EfGKTya8GCdopqTLXxJI08/LIzZ T1uEE8mixZzFtdb20R7qCLEWRc33h7nHzE8nl+a9vetfQkOtX9upW5m28Bx7fwaRIVos L6m8WLXpsi7Sw3AODUnpGXIis1e0qcOe8mXZDM/aW7unjRXDH830h6TFgg5f0liHM6aD Su0vdDTtU0M82rVVCroduIQp6mnJQLtDVUA1OrWGZrWUQOMuXW6WJBu0yZlXPQArvt8G LPSw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=vFUr96kGwfrBtl3cG3/UrZ3TEQ3pWsHhQdL1WzQH3rg=; b=I8s7Lkxl8yq3zkGTtYCM3tChgPNjgk5r4I01vU8cVZEDnk25v88gHmtqfU2foyq9RC NGKRJCaN0IG5a9Fv9xGCgvJfL0keaJB/pCVSXgy8yu8mg8jSZIZ96q/upuq4SGYhEw0p R9uMk2q5LPyhUvt7/LW2GcRLbHnndvXhlv1A2QYUCytqX7dYWtKDF5Omy9kCk8deYxMo Nxjofvej4f4JdW0M3qCdMJhqd6jxJEdBu4OGZrYap/WOg3hMa0gPxanTjD6mT6KVbLUj tqZnsQOnRb1OsCccKuVwS8iMifGXN+mqEiphDbVVzI8qTNDYTKxZaZjteSg2MRuvYxLm BqBg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si40331664plp.132.2018.11.18.23.47.33; Sun, 18 Nov 2018 23:47:48 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726479AbeKSSJp (ORCPT + 99 others); Mon, 19 Nov 2018 13:09:45 -0500 Received: from mga05.intel.com ([192.55.52.43]:58654 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726256AbeKSSJp (ORCPT ); Mon, 19 Nov 2018 13:09:45 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2018 23:46:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,251,1539673200"; d="scan'208";a="107430677" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.130]) ([10.237.72.130]) by fmsmga004.fm.intel.com with ESMTP; 18 Nov 2018 23:46:55 -0800 Subject: Re: [PATCH v2 3/3] mmc: sdhci-pci: only install voltage switch method when useful To: Anisse Astier Cc: Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181022134026.GB18413@jaya> <20181023100729.28864-4-anisse@astier.eu> <20181116165850.GB5894@jaya> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <94fa0484-c532-683f-3a3f-fd9f4b263d16@intel.com> Date: Mon, 19 Nov 2018 09:45:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181116165850.GB5894@jaya> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/11/18 6:58 PM, Anisse Astier wrote: > Hi Adrian, > > On Tue, Oct 23, 2018 at 12:07:29PM +0200, Anisse Astier wrote: >> If there's no ACPI DSM for voltage switch, it will just cause a lot of >> debug info down the line, we only need one at startup. >> >> Signed-off-by: Anisse Astier >> --- >> drivers/mmc/host/sdhci-pci-core.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c >> index f2c1fb339d66..95fdbb883c7e 100644 >> --- a/drivers/mmc/host/sdhci-pci-core.c >> +++ b/drivers/mmc/host/sdhci-pci-core.c >> @@ -723,6 +723,7 @@ static const struct dmi_system_id board_no_1_8v[] = { >> static void byt_probe_slot(struct sdhci_pci_slot *slot) >> { >> struct mmc_host_ops *ops = &slot->host->mmc_host_ops; >> + struct intel_host *intel_host = sdhci_pci_priv(slot); >> >> byt_read_dsm(slot); >> >> @@ -733,6 +734,16 @@ static void byt_probe_slot(struct sdhci_pci_slot *slot) >> mmc_hostname(slot->host->mmc)); >> slot->host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; >> } >> + /* Check if we have the appropriate voltage switch DSM methods */ >> + if (!(intel_host->dsm_fns & (1 << INTEL_DSM_V18_SWITCH)) && >> + !(intel_host->dsm_fns & (1 << INTEL_DSM_V33_SWITCH))) { >> + /* No voltage switching supported at all, there's no >> + * point in installing the callback: return. >> + */ >> + pr_debug("%s: No voltage switching ACPI DSM helper\n", >> + mmc_hostname(slot->host->mmc)); >> + return; >> + } >> ops->start_signal_voltage_switch = intel_start_signal_voltage_switch; >> } >> >> -- >> 2.17.2 >> > > What do you think of picking this last patch ? Or maybe you had > different cleanups in mind when you said you wanted to rework this ? Voltage switches are relatively rare, and dynamic debug allows control over exactly which debug messages display, so I am not sure this patch is needed.