From patchwork Thu Feb 25 17:03:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 387228 Delivered-To: patches@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp477012jap; Thu, 25 Feb 2021 09:04:10 -0800 (PST) X-Received: by 2002:a05:6512:3590:: with SMTP id m16mr2452293lfr.344.1614272650603; Thu, 25 Feb 2021 09:04:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614272650; cv=none; d=google.com; s=arc-20160816; b=sAwIAQKOG7UFbg4Y/Wu6ytRHUUqCmOGB4r64tYfqU1Cl8tqo+pm6GpeS2ssPttHoe9 lxkYjLMS0C2ho+YSbAmfmrGKtH6M8IWUVQc/7OdqLt539Ftozx9lD6V9UM7U0ipOInUv cnuDAgE+A6UUqqxNbOuuy6GU4lDF14uIjtaIHMJWeyJ/h8Tu9ozHwDLU6HzevMAZ1E4r I1OnngGFVeAwZ08j01Ko+z6mjHd504QAo2kXoWqZu3ASu0gbwaCgnyOenpe40Mr+UIUQ PCeM/i3rgUnucV7/dEq0ka5/uA35NAzF1zfoJJ7ZsEo82RBAPgL+HnZ6NqrIJXaUm5mQ briQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ZVkhv4WLhPkQvvBDaC3A5L+BewGJsj7lWC/5+KaE4JA=; b=FfhikA5TylY7L6g/wNALkuFH2GiYOoNMU3QIxB9ziHcukcwmlfTxu3+/lMctsqQMGj pVV1vIl6lYm4iM6mGXPnWDyUeTZnE183xAQ8JEn9iiPEvlm1XSX9qeTDMsszhckucPY1 klehxezCpNTKeW4RgX4vf17ftk6FG8F5KlxP7xWPwRjb4WUUqArB8K8lRgS2MylRReNO A+oOg46IE9sF6/FF3qdCleXAiQz6zex0P60wVZWtgGdZOmBa6FEA6IPx2BCCqHUdCotq oZW+9Sp/lsBkY1EQL0dEYzBN5OeqBLQ/5+TBJcXCGb2M4nRTHgr7cBXGwxB9HossA8QH qHhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=enfH8oFi; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id e9sor1524509lfs.55.2021.02.25.09.04.10 for (Google Transport Security); Thu, 25 Feb 2021 09:04:10 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=enfH8oFi; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZVkhv4WLhPkQvvBDaC3A5L+BewGJsj7lWC/5+KaE4JA=; b=enfH8oFi28/hppzGCOifB4bJ74Bb94E6Vdwi3GjeNdzdskpS8ek8FB//2Rx3r/LI2M 8ngLNnIPsl1aGROSv4rIFHPg8s3mkN30n6yj0PaQ778NMwlmYeIoKJ+BovJTOnzx8NJh GpjkeSCCZ6/UpLIWQgF1y6mA3cjgZwEgpKZy3DXcOokdftd1jlxBL+FRxH58cgfuEzJV bfDXkCpbXdLAztgtCwIqlSQ/3RpU0cOSiBIdD829qkhBN0TUR3lRx78unnA84Uwn4Wr/ z0xWPQgRXOFW4zqUrtbZTGuiUCXtaz2MQUUETBE2p1hq/KZwb/a4CHCzvqhLKaMjVsPU ODLw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZVkhv4WLhPkQvvBDaC3A5L+BewGJsj7lWC/5+KaE4JA=; b=hJNJPp8jPdQnCViSUc7kjeZFNYRenLKBrNNiT0tQgrqGimwx3ErYeS3FArJy+f64E0 h7iGGxjA0/UA2OgWdgJsl9SC8aa3Tzn/iP+UQx/6ATopuSjNhyhEyhqHbmGWubFBpU3T 5WcT+IpGIj4g3oG3xRM6X3brXKIDUaSSj6Dm5BW79cH7Q28mx+M+9BabgmQ/FhS/nQuR IHDq+C3+TK3WBVcqLp5U/Mf9lDBjT/EZ2rRVIb6HEEb9L8EPgkGu3kg1kWPN5nFkWin/ 0WbxClMYDk6E9l+tXwjhtG84iroPyKoNx5kPzc61bgMN0VOObl6HPB8fWDZF/C/yAc1l uUXg== X-Gm-Message-State: AOAM531j/B1mwH2LX9NHNTBx39qnd8DqwwfU2l13n9bXy9ntkmrruzmR TPIMDDNQXrvesc23fWfi+f83B1pb X-Google-Smtp-Source: ABdhPJwBIn7qT2kk2z7x3v+0WSkxq4k+EqeVr0wX0+WBr8fHtR6BnMS1BIclwvkAmlKvish5zY1rvg== X-Received: by 2002:a05:6512:131f:: with SMTP id x31mr2485503lfu.552.1614272650258; Thu, 25 Feb 2021 09:04:10 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-129-234.NA.cust.bahnhof.se. [155.4.129.234]) by smtp.gmail.com with ESMTPSA id b39sm1103749ljf.68.2021.02.25.09.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 09:04:09 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: AKASHI Takahiro , Ben Chuang , greg.tu@genesyslogic.com.tw, Renius Chen , Masami Hiramatsu , Takao Orito , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] mmc: core: Announce successful insertion of an SD UHS-II card Date: Thu, 25 Feb 2021 18:03:51 +0100 Message-Id: <20210225170352.76872-4-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210225170352.76872-1-ulf.hansson@linaro.org> References: <20210225170352.76872-1-ulf.hansson@linaro.org> MIME-Version: 1.0 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 | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index f4851ec8290c..887b0b80ac3f 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 ba407617ed23..76cb024a0868 100644 --- a/drivers/mmc/core/host.h +++ b/drivers/mmc/core/host.h @@ -83,5 +83,10 @@ 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