From patchwork Tue Aug 31 11:01:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lai Jason X-Patchwork-Id: 504656 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp2662914jai; Tue, 31 Aug 2021 04:02:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySoqOJYlnZxRGv4coTtxgxIwtxexKjzqPGlpHam+FxdFQX/lJlY30SGbtER/g1wGFvEfqu X-Received: by 2002:a5e:a601:: with SMTP id q1mr22100390ioi.51.1630407722483; Tue, 31 Aug 2021 04:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630407722; cv=none; d=google.com; s=arc-20160816; b=htBzVcyBcBGBtDknLmS9dOkz1Oh0LKZRCDhyjoMn6MOWKfEOMlPXtxLkFE0zAPQCbK K1JU7QChLAr0JSmQMd3w4C7KREVgFf9stVZHxX6aQniLWcYAz1vCCMkEMiHnfo2P/wkP C812sfeF1WWJ1l5K3AT+IrwhjDOxKWZt3HV9uLAA6F6Vef9orylVJMGpXGvyOxeI4RHP DvgYCMc48ByfJffUeaQramETYgzeOrF2KPl2zgiHiYw5pUpAzm1UoqfO7rTcMXrTy8dc d6Ns5/AmFplpMkIfdDJYjXGfptsAzPJtEPSMe3yzuqKHmDlw1+iugdhuXHSuodiHRepM 38Zw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=J7ZX5cWq/OCrI2PmtgCFKZxObJ0fq4sVzKxoaxZ4qkM=; b=xn3jsCJ2XJvPyiWOjXbCffD7IpnVkk6uefonEkjow3wRYS+ObnyZ++0ZUDe9eCHSgi fOxVLLPnc3j/BXjQDlmH7Up0UUXPZrtOYjHNoOs5aB+Nj0g5P9/xOyKyUCDMWNAMvpnU C2eFWH6WXgbe7U4KbOLq+r/anpD0VjOcpmAcYyApboKeDe6/0hHExkqcd0iiyA95AdBR nQMAavbwjfZ2CCxs9jpPA4RzbAY/o1pM2Osfy0xCkbPe2ZNl/XDVkgHLx7Br/UGl4JQg UVFvBxB87Mx1gr1xM/w6eCt9iwidX1aso+wSOX7Jg9lExne7xF41MCp1eI7YnKzhfpv9 bCHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fm+zE4KE; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 132si11043040jaf.20.2021.08.31.04.02.02; Tue, 31 Aug 2021 04:02:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fm+zE4KE; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-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 S241148AbhHaLC4 (ORCPT + 3 others); Tue, 31 Aug 2021 07:02:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbhHaLCz (ORCPT ); Tue, 31 Aug 2021 07:02:55 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49AE0C061575 for ; Tue, 31 Aug 2021 04:02:00 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id w7so15127324pgk.13 for ; Tue, 31 Aug 2021 04:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J7ZX5cWq/OCrI2PmtgCFKZxObJ0fq4sVzKxoaxZ4qkM=; b=fm+zE4KE1BdrQqK4f7m5nRZ6LSOroWDywcddzD650TFEJr0mA1x4lZsD2R7vfkbK/J LQVQyKixt8ZWBbyWuHeJ9knnSDam3kiubwDPWYozIG8+MLJJ2LVEwGpQ70jUHzxoMcIe d4Q/pYIRg30OBdTxZjzIhx2L7kggkjEgq67DdZotj48bJB+P6VfeVFWES49RkKd1Bbkp OZp4Ov6H3mEQ14ogrcwHjtTyy0hjP7YywSJr2/rN83WI9ORbKufbA6cKXEsLb/MYWwd1 adz587T5tQwuqHKwnapePuLM8x322i0IYPtWmy0n2qJ/WG6shR7xuf9bSXp8LBBz7HEn zoLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J7ZX5cWq/OCrI2PmtgCFKZxObJ0fq4sVzKxoaxZ4qkM=; b=qJahVxy/aOUr48dytLSsO2KusNWbGa3boxXHBNE3HENZtu1WyXiI5nYCo3HkkyIKXw +vzXZFMbpmRcV+gsknsb8Phbtg1V04VajRPmnMQ3OE2qA8ncQyKDqnYaWa5ISsFXPJgR +DeOrWlMgILVh7beSWmLOJQWxs2P5YjHls2NqBG0vdsVXW9U5kEA6EJwYa7hHNm1t3iV wQEtGAjoH2aPIHGst8v9LR7MiT+e2v9yG/CMFZoGdUuqueErDVgUHd9ntO6fK1jS/Rce rTMY8fvRSqhHMlNOZMM9I2X2D2AVd/xVwweWdsBv2B49sNNY1BdQDIkWEvJEBOvd9drc GL/Q== X-Gm-Message-State: AOAM533Td31Hza6Fj0R0SnBBQeMYIZWU7/u4tyuTPzYUf2CaLeVsKea5 HIxrOoFq+DWwWGRvNnbH0ubrqHc1Qp/Lhw== X-Received: by 2002:a63:f94c:: with SMTP id q12mr25892581pgk.171.1630407719853; Tue, 31 Aug 2021 04:01:59 -0700 (PDT) Received: from localhost.localdomain (60-251-58-169.HINET-IP.hinet.net. [60.251.58.169]) by smtp.gmail.com with ESMTPSA id i20sm5952653pfa.185.2021.08.31.04.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 04:01:59 -0700 (PDT) From: Jason Lai To: ulf.hansson@linaro.org, takahiro.akashi@linaro.org, adrian.hunter@intel.com Cc: Jason Lai , linux-mmc@vger.kernel.org, ben.chuang@genesyslogic.com.tw, greg.tu@genesyslogic.com.tw Subject: [PATCH 3/7] mmc: core: Announce successful insertion of an SD Date: Tue, 31 Aug 2021 19:01:55 +0800 Message-Id: <20210831110155.50616-1-jasonlai.genesyslogic@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Jason Lai 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 --- drivers/mmc/core/bus.c | 4 +++- drivers/mmc/core/host.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.32.0 diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 27ba3c749..8fd46b5f5 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -353,7 +353,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)) + 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 ba407617e..c243d3096 100644 --- a/drivers/mmc/core/host.h +++ b/drivers/mmc/core/host.h @@ -83,5 +83,9 @@ 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_card *card) +{ + return card->host->ios.timing == MMC_TIMING_SD_UHS2; +} #endif