Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp251622lqc; Thu, 7 Mar 2024 16:59:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWYTKVs9AuE85PPWMAORsNEaIWyRDaBS4VoJFdeQWXAp0yKX9C59JLaUT0B3Sr38BkdA8eSyk7Mgqi08AqTfY44SQt5S+G12huk5CTDHg== X-Google-Smtp-Source: AGHT+IGwV1GFU6vGDBnRIwIGQ5eEvHWkvwNNtNOa98dTTdupdgYSn13GtGRezFKrKF515yCzK0Qg X-Received: by 2002:a05:6a00:27a0:b0:6e4:68fa:7e10 with SMTP id bd32-20020a056a0027a000b006e468fa7e10mr19954324pfb.9.1709859562867; Thu, 07 Mar 2024 16:59:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709859562; cv=pass; d=google.com; s=arc-20160816; b=UwoMQd6wdKgmNuPzutiNGN7dvZCzuO45RXDFgZq4qAejOPrQlGvB+en/UetmFVsBAI oXsZu8LpFiXsN/41FHmsm7pj0vdKBlM1lEcyGV7jX44XztGHjNBxNnfcU63yopaOG83W 3NokGt89/TC+rb2AuDPBVyYsgFMJzlll1qGeasuajG4Tx85bF+CDuDzh80/yPtW2j78z KxgIdYKiIhAcM8SyBlp6AjpUWDLLtDmEz7GSONUAcC9CAfJUzLBJPDTAG9hyNJ0l+rfK J/PaU5Yft6sqPCQpLx5liFMJJSWMtuSmzicPwVsOkxd6gv6J7A775Sh8Vn+W/tzzoW0x AfYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LQl76NpetecJ20TZj5RZix3WNgTwsm8Tbrnifw2uQ88=; fh=nPiSpvN2wrl2mtaHfXP0/ddrOQ6Y7VRxO8F4D5qr5ys=; b=hAkh9YB5UykZwyNA8SFQptsHTvP+DXe6VkycQQBbkF1pydoabXcu3MI28xhS7TUdAV 5dlq/nh8PkQDjLzdTqYk/gR8psEYZUW+1tyzZQ0lIwdH2RGUMIwVq6jWsqSeHe60RbvR Q173vMlemW474eBvgWApQ5EoUeAj3+8wD7DaNtpzFMXKWRH6c75sqHRwTrS6njMjMygA lEjxvOwxPeI3zifW2vq+gpuBvp0SxjcKEfOn/xA/PZG0HBVoctbDANjb//x5/5hJUu7y +iqujSuLUyuAI/8JAym8+BkjEIhViMEHzp+zEpPzs0w8oAWuRfj5Hff0OdOur7aTqlDS Uvcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YP+pqXiW; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-96406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id le8-20020a056a004fc800b006e620ebf26dsi8643686pfb.302.2024.03.07.16.59.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 16:59:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YP+pqXiW; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-96406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96406-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8A73C28355E for ; Fri, 8 Mar 2024 00:59:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A0B125639; Fri, 8 Mar 2024 00:57:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="YP+pqXiW" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 37CBA25625; Fri, 8 Mar 2024 00:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709859478; cv=none; b=tIrn/DtwU6mMSV/mpJirwdwrJ7f2a8ZHK6m/WpchSEdLjVbXx7YCbm4+xcYYczPYZbHQBj5X7g5r00J+Ntcrh3cZO4OfS/Z13hAYHzdl+jyu7YlA7Ab46gv5IuntYlfvaaQ1v6qeB7mcAwTt+xfIdFJTx6nHDPFLhjQE50WVUJM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709859478; c=relaxed/simple; bh=Tptsd0AMzvZ/4E40X6HcdeufjoaiGyAKP4BOAzUEnQU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=anh11Px58xrY96FZclfvl6UWHLyaqXtqZmoG3KBOFa8rb7JJRNT9E5auzRdPLJZyetD+J5hBVThLwAoLrTTr0+L9pA3q5Sz6EJhbJlhiRZDNBqHYI1UgM3j5U42aKMVtDX5EWLjw3SB2msjR3CQdCjWsW3TlUW2LR7qrhCq3lSk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=YP+pqXiW; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4280vkeP024611; Thu, 7 Mar 2024 18:57:46 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1709859466; bh=LQl76NpetecJ20TZj5RZix3WNgTwsm8Tbrnifw2uQ88=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YP+pqXiWY5cdH5zVmz9RTpJbeNiNVy7XTTh8/CodvZ1tGLqv3Wj4/X58NFV/wxFRk K1GsYbblzXTR+hSRemZpknch95nLE4UgoSxMCqeO/3sh4jjRv/iREXlV5S/s9QW61x 7QnyJuYHJpssfT+2PP52sQPiw2FEE9zPt5nUk0Z4= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4280vkoW122498 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 7 Mar 2024 18:57:46 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 7 Mar 2024 18:57:46 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 7 Mar 2024 18:57:47 -0600 Received: from judy-hp.dhcp.ti.com (judy-hp.dhcp.ti.com [128.247.81.105]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4280vkjY055151; Thu, 7 Mar 2024 18:57:46 -0600 From: Judith Mendez To: Ulf Hansson , Adrian Hunter CC: Andrew Davis , , Subject: [PATCH v3 7/7] mmc: sdhci_am654: Fix ITAPDLY for HS400 timing Date: Thu, 7 Mar 2024 18:57:46 -0600 Message-ID: <20240308005746.1059813-8-jm@ti.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240308005746.1059813-1-jm@ti.com> References: <20240308005746.1059813-1-jm@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 While STRB is currently used for DATA and CRC responses, the CMD responses from the device to the host still require ITAPDLY for HS400 timing. Currently what is stored for HS400 is the ITAPDLY from High Speed mode which is incorrect. The ITAPDLY for HS400 speed mode should be the same as ITAPDLY as HS200 timing after tuning is executed. Add the functionality to save ITAPDLY from HS200 tuning and save as HS400 ITAPDLY. Fixes: a161c45f2979 ("mmc: sdhci_am654: Enable DLL only for some speed modes") Signed-off-by: Judith Mendez --- Changelog: v2->v3: - Remove unnecessary variables - Save itapdlyena for HS400 timing --- drivers/mmc/host/sdhci_am654.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index a4eeaf894806..7e73ef897cd9 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -301,6 +301,12 @@ static void sdhci_am654_set_clock(struct sdhci_host *host, unsigned int clock) if (timing > MMC_TIMING_UHS_SDR25 && clock >= CLOCK_TOO_SLOW_HZ) { sdhci_am654_setup_dll(host, clock); sdhci_am654->dll_enable = true; + + if (timing == MMC_TIMING_MMC_HS400) { + sdhci_am654->itap_del_ena[timing] = 0x1; + sdhci_am654->itap_del_sel[timing] = sdhci_am654->itap_del_sel[timing - 1]; + } + sdhci_am654_write_itapdly(sdhci_am654, sdhci_am654->itap_del_sel[timing], sdhci_am654->itap_del_ena[timing]); } else { @@ -531,6 +537,9 @@ static int sdhci_am654_platform_execute_tuning(struct sdhci_host *host, sdhci_am654_write_itapdly(sdhci_am654, itap, sdhci_am654->itap_del_ena[timing]); + /* Save ITAPDLY */ + sdhci_am654->itap_del_sel[timing] = itap; + return 0; } -- 2.43.2