From: Marek Vasut Date: Wed, 26 Jun 2019 12:26:31 +0200 Subject: [U-Boot] [PATCH v2 2/2] xilinx_xiic: Fix transfer initialisation In-Reply-To: References: <20190625132929.97027-1-tomas.melin@vaisala.com> <20190625132929.97027-2-tomas.melin@vaisala.com> <60957db1-f355-8e7f-4074-046d98ea175c@denx.de> <3112b021-4575-a9d3-2fc6-f7fed5a7321f@vaisala.com> <3169e36e-e88b-bbce-689d-9e1bc2055b38@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 6/26/19 12:12 PM, Melin Tomas wrote: > On 6/26/19 12:46 PM, Marek Vasut wrote: > >> On 6/26/19 7:30 AM, Melin Tomas wrote: >>> On 6/25/19 6:15 PM, Marek Vasut wrote: >>> >>>> On 6/25/19 3:30 PM, Melin Tomas wrote: >>>>> Prior to starting a new transfer, conditionally wait for bus to not >>>>> be busy. >>>>> >>>>> Reinitialise controller as otherwise operation is not stable. >>>>> For reference, see linux kernel commit: 9656eeebf3f1 ("i2c: Revert >>>>> "i2c: xiic: Do not reset controller before every transfer"") >>>>> >>>>> Signed-off-by: Tomas Melin >>>>> --- >>>>> Changes in v2: >>>>> - Change variable declaration order >>>>> - Change timeout to 3ms >>>> Why 3mS ? >>> That is value used also in kernel driver. >> But why 3mS , why not e.g. 5mS ? > > Quoting from comment: "for instance if previous transfer was terminated > due to TX error it might be that the bus is on it's way to become > available give it at most 3 ms to wake" So where did that 3 mS figure come from ? Is it from a datasheet ? Or the HDL ? Or is that some arbitrary number ? -- Best regards, Marek Vasut