Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp631436iog; Wed, 29 Jun 2022 07:13:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uUvig3rXfmJZjnQfeeL3MmtYmynidqXOUGTS+z/ttKo1u6AagOhhkOIdei1+R7Ys6jqAVy X-Received: by 2002:a63:6dca:0:b0:40c:aac5:a671 with SMTP id i193-20020a636dca000000b0040caac5a671mr3252582pgc.198.1656512016231; Wed, 29 Jun 2022 07:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656512016; cv=none; d=google.com; s=arc-20160816; b=rQuVaTupCwxFI7a1jzVRST2TuhxIcCret9QA0RWLsz38R833UgxkD2qLHrNOrWI5m0 Q0bmQkVY9yxxhdsuESs5dLaWjan2/zvbsfiYec25wy1LMIeALqUfscIq2R9H12a9ts1y v9cyJ+tvgDsi6Kq0PRS8LJIWtWVdLiHEwlurVe7g35EYDFYXEhBhULOfrugw/cxpjtUG CH0azvqvbZCml/JNsqkVRyuWi3Y2E6wN4xAg6j4IwQvga+gvashd9K35znmaCtBxNLjP ZSe9Ku+uSYu7kctpjJkvj+YhMKtShVevoRxsJWqmtOeXYPx+UiHDxBgKEySonyGcVGJB Pxug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=q4IDYnA9mxoplu3bplri3eeAY5ZA7+1eLbTSPgMevoI=; b=BoTOM3bgrxUbPLHIdefyYA0qSzTN3r91AnGYicf0biofY8yMY24CSnpEtI5BiNhXu7 ODtqKiTTsVgjb/P86CuOkfS76tOsOJZLxSQXzOaqfet1SBOYV6D/3bBYZE8V3l9jGw3k yho5tOhmf3y+WVy6tfQ8ScAqIObJ6AggPQQqdECZL5sS0JqnklYmdazQ0QKvSpVojFZr 3uJPgBKb+mopHLVjvQ4inaxatXGHYrFjkHqiqNvIGPebmtCXSH9Qh0YfqdWLpxi1sMHd VQgY1Yp4FWbjCgujSoPVkpewdJfNKr4VL8ciEnvS5RuleUnw+e7JYbl8eh3uHF/phD4S FctA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=aRJCyz0z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 143-20020a630095000000b0040de553ebecsi13195685pga.616.2022.06.29.07.13.19; Wed, 29 Jun 2022 07:13:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=aRJCyz0z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233643AbiF2OFj (ORCPT + 99 others); Wed, 29 Jun 2022 10:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233548AbiF2OFg (ORCPT ); Wed, 29 Jun 2022 10:05:36 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C82AA25E84; Wed, 29 Jun 2022 07:05:33 -0700 (PDT) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 18A3683E68; Wed, 29 Jun 2022 16:05:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1656511531; bh=q4IDYnA9mxoplu3bplri3eeAY5ZA7+1eLbTSPgMevoI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=aRJCyz0zDIey+e3ztF33FIuC3qX94K+rn93BEyCItkZvrX56uTpLdUEDZh9E7IXxr ++lZEHPnp/PdqPOF0Ss9iehlxcMAmkFI8934idqKKA9agj/6ercFLwnQp2n6RTFeW9 pR3BSz2mhCv3aWRcRiylJA9m72RClfkP9028MNlr7MX+F6vkD1oYdtGfny1ukRgl0l zKgNiU3N7OBOjUWVAG7ED2iPPKM0zJPgU27vsuQNsfVLlcHu76S47WuK9JnD0lSUPr oAygKVccoGfq3cvDBBQIETE7LqLRwBobKmdBWUQ+b6FsSFrUpKhEXh0CpYsjQ8UMYU kRN/ulW6ar7iA== Message-ID: <80c524c3-8c31-346d-2691-48f93fa6001f@denx.de> Date: Wed, 29 Jun 2022 16:05:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 03/10] i2c: xiic: Switch to Xiic standard mode for i2c-read Content-Language: en-US To: Krzysztof Adamski , Raviteja Narayanam , linux-i2c@vger.kernel.org, michal.simek@xilinx.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, git@xilinx.com, joe@perches.com References: <20210626102806.15402-1-raviteja.narayanam@xilinx.com> <20210626102806.15402-4-raviteja.narayanam@xilinx.com> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/29/22 14:47, Krzysztof Adamski wrote: > W dniu 26.06.2021 o 12:27, Raviteja Narayanam pisze: >> Xilinx I2C IP has two modes of operation, both of which implement >> I2C transactions. The only difference from sw perspective is the >> programming sequence for these modes. >> Dynamic mode  -> Simple to program, less number of steps in sequence. >> Standard mode -> Gives flexibility, more number of steps in sequence. >> >> In dynamic mode, during the i2c-read transactions, if there is a >> delay(> 200us) between the register writes (address & byte count), >> read transaction fails. On a system with load, this scenario is >> occurring frequently. >> To avoid this, switch to standard mode if there is a read request. >> >> Added a quirk to identify the IP version effected by this and follow >> the standard mode. >> >> Signed-off-by: Raviteja Narayanam > > [...] > > If those two modes only differ in software complexity but we are not > able to support only the simpler one and we have support for the more > complicated (standard mode) anyways, we know that standard mode > can handle or the cases while dynamic mode cannot, we also know that > dynamic mode is broken on some versions of the core, why do we actually > keep support for dynamic mode? If I recall it right, the dynamic mode was supposed to handle transfers longer than 255 Bytes, which the core cannot do in Standard mode. It is needed e.g. by Atmel MXT touch controller. I spent a lot of time debugging the race conditions in the XIIC, which I ultimately fixed (the patches are upstream), but the long transfers I rather fixed in the MXT driver instead. I also recall there was supposed to be some update for the XIIC core coming with newer vivado, but I might be wrong about that.