From patchwork Thu May 1 06:33:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 886869 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32A59746E for ; Thu, 1 May 2025 06:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081225; cv=none; b=HXsXNN0L613+Rpj8oJvvC7oBiPEM41ItmKF1sYLikvSDdsIgA649zkTQcI4XTetd9TmFWQgN0rd4sqLsNiiVp5rVZVVqG68fZJYzmRfjZnnoF4KQ9HobNpKXjgsoYk53bwW617MR8Q2eli9kRYRV/PY6KEgjkRQzghMHpSmj71o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081225; c=relaxed/simple; bh=LuB8JJJYhv13Sgyr1tEG1cx9hRSs2IETfzpggh65D5o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rf5hJKc+ykLWg5dOlDETkqZWwDlhottDEWm89iGxvRbcsxXnacKcI+DrfeFGfto/KviivN6Vy3+e8ivB4g6haLUuYSjDle7U42F8SBOpg8sFmCc5L1xPzi//fefEbHJTM+bPoCHX4owvczWgXwiPejav3H1/AHnlg6JWi62JX9k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=PZOLGFkv; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="PZOLGFkv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=+OS5yhiLM7ssv8cgCBmUWDXFs7PxiNO8czKRFFUJzcQ=; b=PZOLGF kvdrlGASN8EI3oIuTXIzs+ePJwxNmhOkKmo/BOQJFw+mK8LITtZQ/csCw0RiLaA8 cXeMoCEOr39nRKSgju8WgKlGPQEhH/5/YCzdGnObEvNC12Pf0rdAW/nFM9iilEqG 4/6M4AJRc7hZm2lJMepEsCJBp720uVewN6wC6AdykblIcyAOZf5FkHXEz/KmjNQW yLDBriaxZHDO6EsCiUEuFXPvZyeapX+CmQAjbCu/KOgMBp8GxZJPGfPENSqe5YZY J1Y+bxe+Xgl6H/SPBw2MEbeK9FwAX9hB7/6eU313fs6S6R3s7L7G8LYnk40L2r1I IMs2dutvvCzhbKxg== Received: (qmail 958427 invoked from network); 1 May 2025 08:33:40 +0200 Received: by mail.zeus03.de with UTF8SMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 1 May 2025 08:33:40 +0200 X-UD-Smtp-Session: l3s3148p1@1UfcNg00PuAujnsd From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Subject: [PATCH 1/4] mmc: rename mmc_host_cmd23() to mmc_host_can_cmd23() Date: Thu, 1 May 2025 08:33:26 +0200 Message-ID: <20250501063325.7262-7-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> References: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang --- drivers/mmc/core/block.c | 2 +- drivers/mmc/core/host.h | 2 +- drivers/mmc/core/mmc.c | 2 +- drivers/mmc/core/mmc_test.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 63320cc441c1..f9ad45476552 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2618,7 +2618,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, */ md->read_only = mmc_blk_readonly(card); - if (mmc_host_cmd23(card->host)) { + if (mmc_host_can_cmd23(card->host)) { if ((mmc_card_mmc(card) && card->csd.mmca_vsn >= CSD_SPEC_VER_3) || (mmc_card_sd(card) && !mmc_card_ult_capacity(card) && diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h index 48c4952512a5..c8515cb86192 100644 --- a/drivers/mmc/core/host.h +++ b/drivers/mmc/core/host.h @@ -39,7 +39,7 @@ static inline void mmc_retune_recheck(struct mmc_host *host) host->retune_now = 1; } -static inline int mmc_host_cmd23(struct mmc_host *host) +static inline int mmc_host_can_cmd23(struct mmc_host *host) { return host->caps & MMC_CAP_CMD23; } diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index e499835b05a9..c2b92b508438 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -578,7 +578,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) * RPMB regions are defined in multiples of 128K. */ card->ext_csd.raw_rpmb_size_mult = ext_csd[EXT_CSD_RPMB_MULT]; - if (ext_csd[EXT_CSD_RPMB_MULT] && mmc_host_cmd23(card->host)) { + if (ext_csd[EXT_CSD_RPMB_MULT] && mmc_host_can_cmd23(card->host)) { mmc_part_add(card, ext_csd[EXT_CSD_RPMB_MULT] << 17, EXT_CSD_PART_CONFIG_ACC_RPMB, "rpmb", 0, false, diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c index be2d2895b4c4..80e5d87a5e50 100644 --- a/drivers/mmc/core/mmc_test.c +++ b/drivers/mmc/core/mmc_test.c @@ -191,7 +191,7 @@ static void mmc_test_prepare_sbc(struct mmc_test_card *test, { struct mmc_card *card = test->card; - if (!mrq->sbc || !mmc_host_cmd23(card->host) || + if (!mrq->sbc || !mmc_host_can_cmd23(card->host) || !mmc_test_card_cmd23(card) || !mmc_op_multi(mrq->cmd->opcode) || (card->quirks & MMC_QUIRK_BLK_NO_CMD23)) { mrq->sbc = NULL; @@ -2390,7 +2390,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test, 512, write); if (use_sbc && t->blocks > 1 && !mrq->sbc) { - ret = mmc_host_cmd23(host) ? + ret = mmc_host_can_cmd23(host) ? RESULT_UNSUP_CARD : RESULT_UNSUP_HOST; goto out_free; From patchwork Thu May 1 06:33:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 886870 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 129EF267AF1 for ; Thu, 1 May 2025 06:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081225; cv=none; b=nzLxF1nKu3p7xMSQoBSCYL0Zlh+lD7lHZXOSU2pD/1FXmoMOFCM0H6jEgvUh+bXLJS/DHknf+KOSBgmBh9Sopzjq0pv6v4llsPQFfHqVy3vRwKMHvg3HTtcJ5XYz8dqaPAJDbiaPrl7gfGiqeeXFzX8U4mqO6F/DVaWxT4uO1l4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081225; c=relaxed/simple; bh=ecbACzPy39p95R97CpSCacApIs0icmXCsDH9drxjUY8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tP6zVqnUYtUtjkpZG8ZPuIbrNhLITEuhLSp5JoqQG0J9zpeDO7qHJkJEG73c6Eo4p/wUkLPYLcxmHjVK6EI+QGi/DPdYrEOqaFXcIQe2oWsAa/ufDfjq7Ls20SmAsQuVVlZ3WUYIFjmB09jEfY+uIpoki33wYxhIHCS1HSugSJM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=Asnybxg9; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="Asnybxg9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=2NUkxT3gMNLMshJrCeUCzjstWuAyu9X7YPevdt1nbRg=; b=Asnybx g9vnY/67VHlxM77nFvk++zYtmqN2Uq8fj3YTHxX3uz+LASBz4873PezOJSnY4J1v imxlemK/rJBrmR9XuJehoo5+SDb2R5g4QEW/w0ZzrFRu8RVlM02pIaWn+yqTASQL j3Q3MDcBx/iaYww5sEaod2nTB8nAElu1+IengZ7rxcB6SziBBJOtHNFzqaiVOapD OIJgehYDNw4iZEVrdvI4MOoIqLnZ5bHhDffjblD5pRkOBjMCVoEh3gQAcqWF2xaB MR6dNJVJhP99x6U0e5LOlMEPCigIMyn/YwzGQ66MCicyYP39bcAOmp+fmOy92Gq1 Vb/ez9qm2x0BUolg== Received: (qmail 958453 invoked from network); 1 May 2025 08:33:41 +0200 Received: by mail.zeus03.de with UTF8SMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 1 May 2025 08:33:41 +0200 X-UD-Smtp-Session: l3s3148p1@quTqNg00SuAujnsd From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Subject: [PATCH 2/4] mmc: rename mmc_host_done_complete() to mmc_host_can_done_complete() Date: Thu, 1 May 2025 08:33:27 +0200 Message-ID: <20250501063325.7262-8-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> References: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang --- drivers/mmc/core/block.c | 6 +++--- drivers/mmc/core/host.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index f9ad45476552..585c2b274d98 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2278,7 +2278,7 @@ void mmc_blk_mq_recovery(struct mmc_queue *mq) static void mmc_blk_mq_complete_prev_req(struct mmc_queue *mq, struct request **prev_req) { - if (mmc_host_done_complete(mq->card->host)) + if (mmc_host_can_done_complete(mq->card->host)) return; mutex_lock(&mq->complete_lock); @@ -2317,7 +2317,7 @@ static void mmc_blk_mq_req_done(struct mmc_request *mrq) struct mmc_host *host = mq->card->host; unsigned long flags; - if (!mmc_host_done_complete(host)) { + if (!mmc_host_can_done_complete(host)) { bool waiting; /* @@ -2430,7 +2430,7 @@ static int mmc_blk_mq_issue_rw_rq(struct mmc_queue *mq, mq->rw_wait = false; /* Release re-tuning here where there is no synchronization required */ - if (err || mmc_host_done_complete(host)) + if (err || mmc_host_can_done_complete(host)) mmc_retune_release(host); out_post_req: diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h index c8515cb86192..00ca88389ef9 100644 --- a/drivers/mmc/core/host.h +++ b/drivers/mmc/core/host.h @@ -44,7 +44,7 @@ static inline int mmc_host_can_cmd23(struct mmc_host *host) return host->caps & MMC_CAP_CMD23; } -static inline bool mmc_host_done_complete(struct mmc_host *host) +static inline bool mmc_host_can_done_complete(struct mmc_host *host) { return host->caps & MMC_CAP_DONE_COMPLETE; } From patchwork Thu May 1 06:33:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 886595 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E02D1267F53 for ; Thu, 1 May 2025 06:33:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081225; cv=none; b=Y4ko+wPCFLuHq84CehDWIbXS6vZTLu5W77o9sGnet65V3YeV2IZ8el5nHY+5EG539oP9SLlTJq0BNW8aIE+qouMjrV9hNPL77GGzL5qQZdvbiYRo0HKqc2Myur+LgUfS2ShTS39/p3uRXgU/hH14NVpkRWgkMIcmWNWHPEUAb6E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081225; c=relaxed/simple; bh=Kux+D10H2xVO7KgjxHpD1/TLY3kK6HIETOTjYkCSiXc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oRtaejhRiuLwWo9YmLnoxh934IV+LqPWYtML6g46qdejW0nYIczFUZU2HDDXa4DvPNr4rHO/uiKgJGuJfkaEyKKgJeWvRhcLWVR/FS9uIdVeA67d9jJ/o7Eo7AHkeQ4g8PQqErDs2d1ct3kiuWMz79uDY7x3YXQ5qg5ILSqA3is= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=Bj3W5sqs; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="Bj3W5sqs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=EyZiMS5Buw/s+8rzr2+sLRbPIJwuHcJ9z9Hfq+4pFlU=; b=Bj3W5s qsI5KsL89q/vziUBg48H1MFKf1M5GrYPAsvMklKn+bofb48adNZzLgcgEC4KAvYK duVK7oOwGbxLOStM83lPKEEjTW9U6nEDDLtWc+frLRtgDeJ7nUNCAt6sDpxA77Sg LbEirDCQv9ysBNqc2LP3z3Ats0cJSb751Z2JgnjBnHqdUVzUA0dnY4gMSVab2YNq iNHaahcSQmw4DcXJk5w9IMFzlnoIeYn1oG0BXBm9h/Jvjg6LzkMd96l9aKPGEMee NgxfLOzX/RkmoGvpXzL0+gUe9jIGFgbqPjq3NSxqj7cBhRSExx5HXMHzXwv8A3qx gV0n2P4XmapFCT2w== Received: (qmail 958480 invoked from network); 1 May 2025 08:33:41 +0200 Received: by mail.zeus03.de with UTF8SMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 1 May 2025 08:33:41 +0200 X-UD-Smtp-Session: l3s3148p1@fLn3Ng00UuAujnsd From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Subject: [PATCH 3/4] mmc: rename mmc_host_uhs() to mmc_host_can_uhs() Date: Thu, 1 May 2025 08:33:28 +0200 Message-ID: <20250501063325.7262-9-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> References: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang --- drivers/mmc/core/host.h | 2 +- drivers/mmc/core/sd.c | 8 ++++---- drivers/mmc/core/sdio.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h index 00ca88389ef9..c112191cad6a 100644 --- a/drivers/mmc/core/host.h +++ b/drivers/mmc/core/host.h @@ -54,7 +54,7 @@ static inline int mmc_boot_partition_access(struct mmc_host *host) return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC); } -static inline int mmc_host_uhs(struct mmc_host *host) +static inline int mmc_host_can_uhs(struct mmc_host *host) { return host->caps & (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 08ab076fe2f9..ec02067f03c5 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -455,7 +455,7 @@ static void sd_update_bus_speed_mode(struct mmc_card *card) * If the host doesn't support any of the UHS-I modes, fallback on * default speed. */ - if (!mmc_host_uhs(card->host)) { + if (!mmc_host_can_uhs(card->host)) { card->sd_bus_speed = 0; return; } @@ -867,7 +867,7 @@ int mmc_sd_get_cid(struct mmc_host *host, u32 ocr, u32 *cid, u32 *rocr) * to switch to 1.8V signaling level. If the card has failed * repeatedly to switch however, skip this. */ - if (retries && mmc_host_uhs(host)) + if (retries && mmc_host_can_uhs(host)) ocr |= SD_OCR_S18R; /* @@ -1509,7 +1509,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, * signaling. Detect that situation and try to initialize a UHS-I (1.8V) * transfer mode. */ - if (!v18_fixup_failed && !mmc_host_is_spi(host) && mmc_host_uhs(host) && + if (!v18_fixup_failed && !mmc_host_is_spi(host) && mmc_host_can_uhs(host) && mmc_sd_card_using_v18(card) && host->ios.signal_voltage != MMC_SIGNAL_VOLTAGE_180) { if (mmc_host_set_uhs_voltage(host) || @@ -1524,7 +1524,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, } /* Initialization sequence for UHS-I cards */ - if (rocr & SD_ROCR_S18A && mmc_host_uhs(host)) { + if (rocr & SD_ROCR_S18A && mmc_host_can_uhs(host)) { err = mmc_sd_init_uhs_card(card); if (err) goto free_card; diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 4b19b8a16b09..0f753367aec1 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -198,7 +198,7 @@ static int sdio_read_cccr(struct mmc_card *card, u32 ocr) if (ret) goto out; - if (mmc_host_uhs(card->host)) { + if (mmc_host_can_uhs(card->host)) { if (data & SDIO_UHS_DDR50) card->sw_caps.sd3_bus_mode |= SD_MODE_UHS_DDR50 | SD_MODE_UHS_SDR50 @@ -527,7 +527,7 @@ static int sdio_set_bus_speed_mode(struct mmc_card *card) * If the host doesn't support any of the UHS-I modes, fallback on * default speed. */ - if (!mmc_host_uhs(card->host)) + if (!mmc_host_can_uhs(card->host)) return 0; bus_speed = SDIO_SPEED_SDR12; @@ -669,7 +669,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, WARN_ON(!host->claimed); /* to query card if 1.8V signalling is supported */ - if (mmc_host_uhs(host)) + if (mmc_host_can_uhs(host)) ocr |= R4_18V_PRESENT; try_again: From patchwork Thu May 1 06:33:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 886868 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1D1E25A623 for ; Thu, 1 May 2025 06:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081226; cv=none; b=iglF6bbq+vF3rwoaeTQ6h2OcQOif4bxA52JgijdkIXMKCqCi2u8d57RUX/H4FeOyY8hiaTPJMq6WK78bR0M2iGSykEteRaqY15BjC35kxEmDAWn5ciBfaH3RwgB3tV+ldk5CkShx6gQTQbyC6P3rjRz2QBfig9lhwadzO9/B2MQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746081226; c=relaxed/simple; bh=XfXUt4Zl6R5fpJBOyggy99HXvsMF0WIFYMom86ZOcHQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nCAxpffkR0PxsVlsl3Gi9H4PHKmt/0mVHxGt7yABbAuqdhc5mCScIqHxpCOkdu5q67/S3uNyjy12er574Lhuait43rKjHqY7ImVYOv7wU/N7d6CwcsXKhfoFnujCIT8amRX2oh6q7V06drEiIpyKDkiaYH98e79/TZlf3EIwhr0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=k1c/MKxE; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="k1c/MKxE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=1ZwejgDjHKdWmk57jMLZSxxGSA4Ke16d1wLzbg5E4nQ=; b=k1c/MK xEDBFutEQJOhpHD6L5zJPVq/8IRv2+XkVGbqgfkFmr7bVCAXUm1xF5TqKIK7U5aW zbzzEHdL56IDohOTvkNnlreIFVAZtCFxzFQ7b0nPF2AJslKAaNKRFN6GvKLw8sfe Yr8VjDEyRYigpODl7BzQPlgb/SrjwMn7Pt8O7RQB8BabcArWl/DdqXBhzFTlWtrM EImpCUpzTxYEgnWqoo4DXS5n6NGR1/zodUeiASwqxy0dW2n50w6m7F/q8zKOq7kt HMwg1MrqXyK5qyiIjN5dmYG1w+XpIVXtY49qf6iz5e6kQdjZfflKMf2m4lLmcSd7 Hr67/KH34052zSHQ== Received: (qmail 958508 invoked from network); 1 May 2025 08:33:42 +0200 Received: by mail.zeus03.de with UTF8SMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 1 May 2025 08:33:42 +0200 X-UD-Smtp-Session: l3s3148p1@Jq8CNw00YuAujnsd From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Subject: [PATCH 4/4] mmc: rename mmc_boot_partition_access() to mmc_host_can_access_boot() Date: Thu, 1 May 2025 08:33:29 +0200 Message-ID: <20250501063325.7262-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> References: <20250501063325.7262-6-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers and reword it slightly. Signed-off-by: Wolfram Sang --- drivers/mmc/core/host.h | 2 +- drivers/mmc/core/mmc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h index c112191cad6a..5941d68ff989 100644 --- a/drivers/mmc/core/host.h +++ b/drivers/mmc/core/host.h @@ -49,7 +49,7 @@ static inline bool mmc_host_can_done_complete(struct mmc_host *host) return host->caps & MMC_CAP_DONE_COMPLETE; } -static inline int mmc_boot_partition_access(struct mmc_host *host) +static inline int mmc_host_can_access_boot(struct mmc_host *host) { return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC); } diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index c2b92b508438..5be9b42d5057 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -459,7 +459,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) * There are two boot regions of equal size, defined in * multiples of 128K. */ - if (ext_csd[EXT_CSD_BOOT_MULT] && mmc_boot_partition_access(card->host)) { + if (ext_csd[EXT_CSD_BOOT_MULT] && mmc_host_can_access_boot(card->host)) { for (idx = 0; idx < MMC_NUM_BOOT_PARTITION; idx++) { part_size = ext_csd[EXT_CSD_BOOT_MULT] << 17; mmc_part_add(card, part_size,