Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp854693rdb; Mon, 29 Jan 2024 23:51:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHd9Ve9woMkQ3J5cK+l2XZZfpC7CS6c7+d5rYoK43F+Mqvh4rwz66owPu1c0FHw+9hQL0lI X-Received: by 2002:a05:622a:4cc:b0:42a:52c4:7e09 with SMTP id q12-20020a05622a04cc00b0042a52c47e09mr6589646qtx.120.1706601112128; Mon, 29 Jan 2024 23:51:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706601112; cv=pass; d=google.com; s=arc-20160816; b=Us255bZlhqa4Qm5huZyt4SRyV4aOZhzaSMuew/3UZQTUGOvnC8r0x2xIRt4ztxT7cD QlWipvCpXPjKK8vl9S/rgVf1kRql7sXx6a5X0hVdSyVYQlIsFfzFq03w1yizY33Xmq9r vcuWDJ/0ARd0EPFBXIQzXrWe/4a3eQuwc2Hoao/GIcmC0ibg3CYKqV+F91sdXWiFGys2 5wTUjQ1qcy+jtNBh6qScKTIWAAygzrjpqtSwraYi9niFyRSuhTMbzbvh4Q38y8aShtxP 99vYHmEcnxFmXRTkguIYDKkdzVtA/zqdvOz/hK+au7e0n1AUkFNUtRX95ADoKPJDTf9R s83g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=iEqlR+fJyGnaEM9aDQpCcAkAZfZ+490su0Pu8FiSISU=; fh=FsMayzYdCvBTiGKhygPi3nBr+lFfbAn5GbO6SqUqN6Q=; b=s+VxtwB9akN+3x4VPJyosU/8cNn/OGorlHQqM+YxxKU/iNp+6Ln6YHLn6pDhFolZbf KAyN+z10d/ms1vkrlGw4TZlOqZABJLmC7Unurqb8a8Kc3/uxR7SyGPtkxg52q7zrmPnK 6DWM97ivqHnNP2j6cioqRytI/XpVkpjFhKfVGOWSGMeuHzU9Emx0KDiVkJhU8N0jZjXr Y8+cJbNCRXPiXx7Q+IncWmFOlro7lQfOT63b+S2IGFU7XC9niZQ1KszUmN+PR2bW6cTE RycMO+/yyja8Poe7UNzXy3DK8aCxPkbhj1qvmnhOso+u6b0JhnTlvKBrww2A1Wg4g5Yz V1zA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=lTO7k4HK; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-44071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44071-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s18-20020a05622a1a9200b0042aa083583csi4613387qtc.189.2024.01.29.23.51.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 23:51:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=lTO7k4HK; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-44071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44071-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DFB061C23ACE for ; Tue, 30 Jan 2024 07:51:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03DD455C3D; Tue, 30 Jan 2024 07:51:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="lTO7k4HK" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 384F85475D for ; Tue, 30 Jan 2024 07:51:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706601107; cv=none; b=Iz+ww4nsGdANoabdkZQlKFzRuWW+i1xdhXoGIi1Li9rTR+Fs7VTkXdSk1Hd28BEHElKs6c26Ey322OqHCyTLXsgBKoo/R27c75Sx5xx3OXu45UqS46GyX8dA5Oz1ge70FZq6VEH2OEsXkCxaFYpoIqxiH/OAnNjsyzkofK9XLkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706601107; c=relaxed/simple; bh=N1ix6n0OUSNUPPVa8QYErwWyocB1DYBMbthnSeb6xVI=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=CryDTUbcMlcOKUUUxlQpaOAgh3cChLIya0O6bchcgjKf32lFDyvYnZYIbTswEmnNdIFpfh/G5/07VypIjuPngjB+qV5i3DoEZWjc2kliEXO7yflyjqvaFKjxxa+whEYocsbd2pOCdisFtZK635srz1yGJQqsI29Oypjc6JD5pxc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=lTO7k4HK; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a358ec50b7cso372117566b.0 for ; Mon, 29 Jan 2024 23:51:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706601103; x=1707205903; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iEqlR+fJyGnaEM9aDQpCcAkAZfZ+490su0Pu8FiSISU=; b=lTO7k4HKo9grtbliGalco5W98VXWPk5WZY5h6xAx3IsclcIwiGR8GYXlfHggLONHcn pytj0reyeZIQ0E1B0ECry2aX2TxAW7CaWWoQxhYuNEjqfg3L2ZJVW06XD8FzQEMmYKp0 jYMO4QhfVOv+Bzw1knDLKsKfKPYxK9T9d9cUadBSLFR0fS3xsUquFs9obqvKohIFXttP DInibpYrctXJM+po+ux/ObmANur9Q8owZmjLcYs3XujYffpns0d47mHM6/aZFt+jxCJU +gFCY1Cqw6OsC2WkyaIa7mthUxHudIvKk8f8gKLdkULLovxRZk2m8bW6vIn6hFGTXMyh PPHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706601103; x=1707205903; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iEqlR+fJyGnaEM9aDQpCcAkAZfZ+490su0Pu8FiSISU=; b=mu6w7eunRDcOhjNEKJ2DRnZwShMUzUak8DAJ/bwlXT5zx/d2/nokIgt2dgNXyqdJNf 6JiXp680PyO223W1sFhGHawNH00JrUJN9FHNS3B4RlaBMGfK/Q4lbn0ipRTDtzg4iav/ Epab6yZsTXAwH0N/whQ4OUq5aXQlOCw18+OOg+jEuebx7Y4eV14iGgaPE4LwcIylNrOT 6o2qqBqA0ljG9jATjmp0w8/j96GF4ljgR2JnSCZ7498jrj4dU4sAq8STZKCWPoygJ25W P7ljR81aQ9w8pTIrCFtehT6MyF2SZNoUJhJRRvmvXg78KAq3vKLa7y6Ntlo1A/8qfbj4 Elgg== X-Gm-Message-State: AOJu0Yxj+T7nMHUwAzu4jKKru6r098RgoLxirW0spv14rEH7rGVpliRj +b2BqTSNQBbiF24UK8DYm0+PrFtJpvf4ta48556SFQmoJ3oCdlXlc3p4Yx7aE0c= X-Received: by 2002:a17:906:1296:b0:a31:6534:1da with SMTP id k22-20020a170906129600b00a31653401damr627464ejb.36.1706601103511; Mon, 29 Jan 2024 23:51:43 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id vb1-20020a170907d04100b00a34c07816e3sm4785771ejc.73.2024.01.29.23.51.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jan 2024 23:51:43 -0800 (PST) Message-ID: <7c4f6031-ac7b-407c-a223-e7b65ef8baa7@tuxon.dev> Date: Tue, 30 Jan 2024 09:51:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] mmc: renesas_sdhi: Fix change point of data handling Content-Language: en-US To: Wolfram Sang , ulf.hansson@linaro.org, takeshi.saito.xv@renesas.com, masaharu.hayakawa.ry@renesas.com, yoshihiro.shimoda.uh@renesas.com, linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea References: <20240117110646.1317843-1-claudiu.beznea.uj@bp.renesas.com> <345bc392-cf28-479a-9453-5bc89f635759@tuxon.dev> From: claudiu beznea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 30.01.2024 09:26, Wolfram Sang wrote: > Hi Claudiu, > >> My understanding was the other way around from this statement found in >> RZ/G3S hw manual: >> >> "If all of the TAP [i] is OK, the sampling clock position is selected by >> identifying the change point of data. > > Yes, it is easy to misunderstand. It should add "and avoid it" or > something. I got an internal diagram which makes it more clear. I just > asked if I can share it with you. > >>> I also have a chapter named like this. If you check the diagram, change >>> point is between TAP2 and 3, so the suggested TAP to use is 6 or 7. As >>> far away as possible from the change point. >> >> My understanding was different here as of the following hw manual statement: >> >> "As the width of the input data is 1 (UI), select TAP6 or TAP7 which is >> >> *the median* of next TAP3 from TAP3" >> >> I understand from this that the median value should be considered here. > > Sorry, can't follow you here. "Select TAP6 or TAP7" is clear to me. But > it doesn't really matter why it was misleading... > >>> However, with some SD cards, I also see the EIO error you see. So, there >>> might be room to improve TAP selection when all TAPs are good. I need to >>> check if this is really is the same case for the SD cards in question. >> >> Maybe better would be to change this condition: >> >> if (cmpngu_data != cmpngd_data) >> set_bit(i, priv->smpcmp); >> >> like this: >> if (cmpngu_data == cmpngd_data) >> set_bit(i, priv->smpcmp); >> >> ? >> >> I need to check it, though. > > But isn't it equal to the current code then? (Except for one thing: the From my debugging session I remember the SMPCMP was not zero and this lead to my failure. I'm not sure (and I don't remember from my debugging session) if CMPNGU and CMPNGD are identical after the change point of the input data (CMPNGU != CMPNGD) has been signaled by the controller. I need to check it. > smpcmp bit is only set when there is no cmd error. I need to double > check but I think I like that.) > > Happy hacking, > > Wolfram >