From nobody Mon Nov 29 16:02:11 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2556218C882F; Mon, 29 Nov 2021 16:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2qqR5jjmz3GkT; Mon, 29 Nov 2021 16:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4D0C25690; Mon, 29 Nov 2021 16:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ATG2Bru092067; Mon, 29 Nov 2021 16:02:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATG2B05092066; Mon, 29 Nov 2021 16:02:11 GMT (envelope-from git) Date: Mon, 29 Nov 2021 16:02:11 GMT Message-Id: <202111291602.1ATG2B05092066@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 8661e085fb95 - main - mmc: Fix HS200/HS400 capability check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8661e085fb953855dbc7059f21a64a05ae61b22c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638201731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=097eBlGYz4PplnUp6IgUgC3hGi5jys1Jo//RfJ/gqrU=; b=fUbnx1UXNfdT8d1SCa9lAoa5g7wbm35VHJswY7Br+gJ+nz2q9NKQYi4kjck6bzr4P8qQh5 E3TKSncDZqv4YecLBspy2Vq+Gr8VLbrPQIYviDqYMOul5JraWOMbMfCqLx2sZRTTmtv7T5 pI5g4qjz0mnAU/U2cSE31l2k0tmNJsNO07PmtHSVPCWrFwz0dft47jxyzg1xkTyEYdbg9x Z+zln7dJ/f5FSWtjAs3Dug9fRVFW2p5NRtcSwgCYtUG+ssWFXCRxpulXKZXogZJP/XcGDx tZtKVlX5ZkdVXzzIcqEn9pMUeluZ1swOg3lO2UQ8tIdNcQlgWcm5twDiEZRKfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638201731; a=rsa-sha256; cv=none; b=ygp9YohmZHl/caBVmfz24Bc4I49xFV3bj8C9uidlPlSO+Cahn0DBInjmIprHYpWKV5qFgk hCHdu1eO28lyDUwpvH+6qQM5HMUv9iKsKvKQnhGKGERRaByUKdfbLjc/Z3bu2GcvEz5bdR BZKJ6e4b5Crxjcfz9uOhALXdv3QvN7mLwFUdAvT9aLHQ0nyaodbpp2/w44QrE9pU5/E9Ue pRR1YQFaWfDkfZwxHi1CWP10++cMk5en9b6OajLLLpCUEeXT4RERCgzvcUcBUbhHd+0fKA tbckTSbAMuVkAgs0tPJg1THdKQnFaKSivAZJJ8XeuUeahdkhbVHh9c+6vEoKnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=8661e085fb953855dbc7059f21a64a05ae61b22c commit 8661e085fb953855dbc7059f21a64a05ae61b22c Author: Kornel Duleba AuthorDate: 2021-11-28 11:24:07 +0000 Commit: Marcin Wojtas CommitDate: 2021-11-29 16:02:01 +0000 mmc: Fix HS200/HS400 capability check HS200 and HS400 speeds can be enabled either with 1.2, or 1.8V signaling voltage. Because of that we have four cabability flags: MMC_CAP_MMC_HS200_120, MMC_CAP_MMC_HS200_180, MMC_CAP_MMC_HS400_120, MMC_CAP_MMC_HS400_180. MMC logic only enables HS200/HS400 mode if both flags are set for the corresponding speed. Fix that by being more permissive in host timing cap check. Reviewed by: manu, mw MFC after: 2 weeks Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D33130 --- sys/dev/mmc/mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 1fc25e372f2b..9c73dfd57ce0 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -1543,9 +1543,11 @@ mmc_host_timing(device_t dev, enum mmc_bus_timing timing) case bus_timing_mmc_ddr52: return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_DDR52)); case bus_timing_mmc_hs200: - return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200)); + return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200_120) || + HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200_180)); case bus_timing_mmc_hs400: - return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400)); + return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400_120) || + HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400_180)); case bus_timing_mmc_hs400es: return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400 | MMC_CAP_MMC_ENH_STROBE));