Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10699947rwp; Fri, 21 Jul 2023 03:40:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOfMThfzob3+DD1KCfVxsUQxus33+bdQOOAgqWQo9WbPJs3TzZnl8EMc2Oi/fAo9qo3LLZ X-Received: by 2002:a17:903:228c:b0:1b7:f546:44d7 with SMTP id b12-20020a170903228c00b001b7f54644d7mr1479223plh.17.1689936023978; Fri, 21 Jul 2023 03:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689936023; cv=none; d=google.com; s=arc-20160816; b=loOzj065f8zf49qX1hnX2bYZ5XHhaDC1n9Kt1AmsV/ROWtnhB4kMKbmvi2ZTd516CD Fce/3l0s9Ns6JqY3obJ1FZhhzoLvQo0gBRjojpnzUKMflTuVpXeEOihuKuuIn4Cq43CZ 6C+OG6aKloVO/E3YCLt37RGAEKZ/nd81kUW48rWIQ6IM86JWBVl21coiOqUb9FyFEYwK KymkLgG+tseHuchJtW89bs0iBoNnl0S1ASvF87XIhlZwPuQko30W5XzCPeJ8929SIcC+ FiT3Xu92+VqMwWGEqtc+xPJ69Pxe9hLHD3/w15uA0W5LYnZUJhFCXylVpGoDGPEKx/Qa 9qcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jJ8DcJM/gQcNcmge5eNzfgTQuzYieEw8t1k7Fnf/hL0=; fh=IdOKLbzSTgr3/ykGm3LNiKbg2m3TpPK9ImH/wLIY8fQ=; b=y78foQuatGVc5zMV8GFC+ll/QDg0supN1tRYVvnKspyqmm/zrzy74fQfacAwroIm3H cBByH5SfmpBhtw751UjVi5xLNaEOoOSvsctMK90z41XDA/1uREPqyeB3n1h4p06XLuR2 VS/4KtR4JeBZkPtXi4yIfVXO7x1B2QFmKyAx2Qgn+PWtGBqTv2Gm7uWju9uDP45BZ7od 2yAnMZzsG9OWGyxEBfTF/KT9bLD06kiqqoHpJyMMO7tVVXlhhZvGx2ShEzlc9qFmMAc+ 3dHp30eXjeZDhAdL9sARJmFja5kVQBM/vJRjOqtvbeEpNEAFmvpujPb9MXeWRszR/qZA xbXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="eIXIAWI/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903024700b001b9be3b94dfsi2923285plh.268.2023.07.21.03.40.11; Fri, 21 Jul 2023 03:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="eIXIAWI/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231679AbjGUKPA (ORCPT + 99 others); Fri, 21 Jul 2023 06:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjGUKOX (ORCPT ); Fri, 21 Jul 2023 06:14:23 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEDAD2D45; Fri, 21 Jul 2023 03:14:19 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6687096c6ddso1203063b3a.0; Fri, 21 Jul 2023 03:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689934459; x=1690539259; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jJ8DcJM/gQcNcmge5eNzfgTQuzYieEw8t1k7Fnf/hL0=; b=eIXIAWI/0V2HFJmAXjWQNxaYVBql75dBqdASBbo7yBuPkDSb2dw8+v7VqflmFFvzx7 j4qvvwVH0/Ql1HpTK2Fq8tr2KHpLDc8GU/qWua4FFtkJzNExFJHqIjhhqL006lhJbEkn gFcEvjrPmbvflP9AOnUMCQ5Jkm8Jz8ep3RsuBy5IKN9z8Ncgwlkz+ptDPNDfe1iJt/7F N2QHfRi7mqeInFCL28CIrkD5hqjF+ec1YUVX48o1sFxC2rK+iisaPDoIFlJM5Tru/Hvx uQElFvKGFNz1pTT/v0RUPEpVu0cJzd8uOGbqQ+nvABgTMArL6eJ9UWpGBE6NORPfEbL2 xyIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689934459; x=1690539259; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jJ8DcJM/gQcNcmge5eNzfgTQuzYieEw8t1k7Fnf/hL0=; b=KxgqvjOpTZG40W1rapmbOxlNt3WdTqM2KFBDDOKN3OQNodXVcmcIkuj1FcIqPLztFx P+9zW7NE2yDOmAQnEW9lpqXZ74JZv8C+G4nSlTv5gXNO0t5ULfGQ1lPDlfHaSRhJGb05 UvJBdmDm5oYZdAVVVxUYlE+cxfOdATpl8dLLsnDuc5X2MZ6SufI7u+ywDnkXLT9crx4m ASbKQ4g5fUEGZKp8hOMAkmvPocfM6JyO5HAzSaui03MmSZj27wlvllFHiZ+CZXeuhL0k iK4T5fjrREPCaBQV2t/0bRP6JrrzMwW5xEzV+pOfe0lZ3WoG3GMuz5l+61NjEKlSNSCm O4WQ== X-Gm-Message-State: ABy/qLaw6eq0Emvr+p0/QRLrTEA1x6b4rncrRhFIf1DI7sZyT92ddIs8 +kgQmzx9qRgvf6MUnVQjzrk= X-Received: by 2002:a05:6a20:96d3:b0:133:b0d5:b3fc with SMTP id hq19-20020a056a2096d300b00133b0d5b3fcmr1130751pzc.7.1689934459212; Fri, 21 Jul 2023 03:14:19 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e23e-6b0d-6c46-3684-497a-06ee.emome-ip6.hinet.net. [2001:b400:e23e:6b0d:6c46:3684:497a:6ee]) by smtp.gmail.com with ESMTPSA id y1-20020a170902b48100b001b86492d724sm3050719plr.223.2023.07.21.03.14.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 03:14:18 -0700 (PDT) From: Victor Shih To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, benchuanggli@gmail.com, HL.Liu@genesyslogic.com.tw, Greg.tu@genesyslogic.com.tw, takahiro.akashi@linaro.org, dlunev@chromium.org, Victor Shih , Victor Shih Subject: [PATCH V9 03/23] mmc: core: Announce successful insertion of an SD UHS-II card Date: Fri, 21 Jul 2023 18:13:29 +0800 Message-Id: <20230721101349.12387-4-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230721101349.12387-1-victorshihgli@gmail.com> References: <20230721101349.12387-1-victorshihgli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Victor Shih Update in previous version: To inform the users about SD UHS-II cards, let's extend the print at card insertion with a "UHS-II" substring. Within this change, it seems reasonable to convert from using "ultra high speed" into "UHS-I speed", for the UHS-I type, as it should makes it more clear. Note that, the new print for UHS-II cards doesn't include the actual selected speed mode. Instead, this is going to be added from subsequent change. Signed-off-by: Ulf Hansson Signed-off-by: Victor Shih --- Updates in V7: - Drop MMC_TIMING_SD_UHS2 in favor of MMC_TIMING_UHS2_SPEED_A in mmc_card_uhs2 function. Updates in V4: - Make mmc_card_uhs2() take struct mmc_host* as in-param. --- drivers/mmc/core/bus.c | 4 +++- drivers/mmc/core/host.h | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index cf32cf135781..d9a3b3d38d8b 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -341,7 +341,9 @@ int mmc_add_card(struct mmc_card *card) if (mmc_card_hs(card)) speed_mode = "high speed "; else if (mmc_card_uhs(card)) - speed_mode = "ultra high speed "; + speed_mode = "UHS-I speed "; + else if (mmc_card_uhs2(card->host)) + speed_mode = "UHS-II speed "; else if (mmc_card_ddr52(card)) speed_mode = "high speed DDR "; else if (mmc_card_hs200(card)) diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h index 48c4952512a5..9f6e5e31dfea 100644 --- a/drivers/mmc/core/host.h +++ b/drivers/mmc/core/host.h @@ -89,5 +89,12 @@ static inline bool mmc_card_sd_express(struct mmc_host *host) host->ios.timing == MMC_TIMING_SD_EXP_1_2V; } +static inline bool mmc_card_uhs2(struct mmc_host *host) +{ + return host->ios.timing == MMC_TIMING_UHS2_SPEED_A || + host->ios.timing == MMC_TIMING_UHS2_SPEED_A_HD || + host->ios.timing == MMC_TIMING_UHS2_SPEED_B || + host->ios.timing == MMC_TIMING_UHS2_SPEED_B_HD; +} #endif -- 2.25.1