Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4482437rdb; Fri, 15 Sep 2023 03:49:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3yqulzBPwQH8PPSTTtJitegs/BsoGdDw4vr9blsN67YZGdihQZL3JVYB5fsdvngQ3ZNV9 X-Received: by 2002:a67:bc14:0:b0:450:fcb1:83ec with SMTP id t20-20020a67bc14000000b00450fcb183ecmr1342466vsn.1.1694774979535; Fri, 15 Sep 2023 03:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694774979; cv=none; d=google.com; s=arc-20160816; b=JOBlnZ7tEXCbFLPF2pIrdmCdzI1qADeHvN7/SCLnRUJZdzvIna7DjJ1kCgdGFTJ65J 6NPHyPP5y376jS8rsTcjd48cZ/4A1UYDNqKOtPRKgye446yzuE+KJbj5kSrtRvoObQSe 4mf2kLsCIvy3j/5kjYbwOggU7bcorbR+R9pkoFc3rkxbMF5rY0MxkHooFkqqwn0gWGIU a0IA8K19C11jLQhMNfT2AVNMlCg4zWGez8KISMaVHd/mGwLO/dd/hbaX0IcQQYflcH0v EWlPxwT/73a+ZzOVQgPIUVqRKHCcDpOzP73iz23FmQ1tgjaP5iD91ARuQ0+lry7+u15s OzRg== 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=1KWK94KLa+RXOTyZSYZJIvaS/n+OcRc5XJNe1k7WdNQ=; fh=KOtNjZfRPCjQZphSIMptO02uH7FbEAONyvdGOPNH0yk=; b=QNckfBsueGfHA0ONShUsgYHr+H6lN8tkhJsbzSv6Qe0ojEWVS3er+kNzm7hB8UEcuz dg1GgSFJHtyS3Fp4/7qc2MOkGAKY9/WM4WrBuUXWxPIT8SJ+cZ4bUryHjv47KWrbV4Ef gSnd2OBOFro67IWH8k2voYYVFwoK1DDu24BtaFc5DWldYAExohegBcmqbn8MAUsSCRpe dliRLHtKhuMMzVd6aCNQtyoz9JAVEFUDeXW2U3N1HnMVSBF78EpNmS8kLKZ2GrijmTmb dFxJl0KstA1/cGuPrhTYF29OlG2r7/u3HO/sByhb5F7p6cNom5EwBzRVWxlAODwmpJz0 MHQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ltD7CjS1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id g192-20020a636bc9000000b005656a343704si3040899pgc.121.2023.09.15.03.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 03:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ltD7CjS1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1A36882D937D; Fri, 15 Sep 2023 02:45:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233868AbjIOJoh (ORCPT + 99 others); Fri, 15 Sep 2023 05:44:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233855AbjIOJod (ORCPT ); Fri, 15 Sep 2023 05:44:33 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776072718; Fri, 15 Sep 2023 02:44:06 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-577fb90bbebso1303034a12.1; Fri, 15 Sep 2023 02:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694771046; x=1695375846; darn=vger.kernel.org; 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=1KWK94KLa+RXOTyZSYZJIvaS/n+OcRc5XJNe1k7WdNQ=; b=ltD7CjS1kOSzv1ZOhEspopb4H18jqRlAoBTv49xmlYorR9usWhMA+mzMfBK7smM0r4 0l5Jilqa2hlytdHgqTX8yt94DnIaz1/fhZberge379pwCDOGmmk9a1WqJNurkMEgOqq5 qZjIKdMrmr3L+E6ohA5zB2Trr5bLke8lcj/ka7DVtZZCGccxi9BMeKzC7O0qjJagu45w Vb8J183Bswlw3C16ZW1TdwfD7E51vRoUDiAvGv9oQFonIqB4Rsn5teC0PuAYZE1CoT8M wL1ItNa30i4eShYR7W+4VxRoCZKbG+pVm0eHdJ73qoVr21CVzL19AsbYPLsi2cqg+kh/ e3Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694771046; x=1695375846; 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=1KWK94KLa+RXOTyZSYZJIvaS/n+OcRc5XJNe1k7WdNQ=; b=GHxhSw+mWskbvEkPbQ3M0ADZXhUeDrBiQCnAJbD2zASCLDpEmkeysG5QqmzYMzkMrU NUhu13y2Jg8DP1fkH4BZUf2nAsg6ZeylE0ImNlsaaQT7+ZFRZ2+/qUS05yibvD/BIE2Y bhYVjBqmSFP/nGOVgIJ9PTi928U2yz0S34G9EbYvdulnO4AKuZv5S5mmCaeCBbCqrum7 N046Q//NbBogot2gO/KrieosdTF7WPIgYLwwQjbtc8Bpy1Quou323z3vCdHxISipWPe+ Mu183G/Ho2bndg0ntWbst+0nbtZQ630j97bGRZ9Ug5s8JlSncHkVx68CoIGznMP5XLQl ZdYw== X-Gm-Message-State: AOJu0YxiW5iTz0YlJgXdQqQZGAMRcxG8HySLqdDz01+snpq5JAUEiLF8 MpDxM3CuU760+lZcIwWmrEA= X-Received: by 2002:a05:6a20:5b1a:b0:155:2359:21a2 with SMTP id kl26-20020a056a205b1a00b00155235921a2mr988158pzb.41.1694771045906; Fri, 15 Sep 2023 02:44:05 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e2a6-6d77-d32f-f490-6688-3d32.emome-ip6.hinet.net. [2001:b400:e2a6:6d77:d32f:f490:6688:3d32]) by smtp.gmail.com with ESMTPSA id x4-20020a17090a530400b0025023726fc4sm4432794pjh.26.2023.09.15.02.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 02:44:05 -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 Subject: [PATCH V12 03/23] mmc: core: Announce successful insertion of an SD UHS-II card Date: Fri, 15 Sep 2023 17:43:31 +0800 Message-Id: <20230915094351.11120-4-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230915094351.11120-1-victorshihgli@gmail.com> References: <20230915094351.11120-1-victorshihgli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 02:45:09 -0700 (PDT) From: Ulf Hansson 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 --- Updates in V10: - Modify the commit message. 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 bd761e2858f1..e1760fc66d1e 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -344,7 +344,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