From patchwork Wed Mar 14 17:03:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10283169 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D7FA0602C2 for ; Wed, 14 Mar 2018 18:10:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9A60285C8 for ; Wed, 14 Mar 2018 18:10:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE76E2858B; Wed, 14 Mar 2018 18:10:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C30A285DB for ; Wed, 14 Mar 2018 18:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ZZvede16qYm9oTjtzZ5WIymug63EPqvyV3EtTb7pfjc=; b=Le2 D1OlUh5lGla2mPO4u4kSIUJLHOsxe4ajSPyqEmy8t9lZMjkBOLZFlowr41ZqOZS4ObcVkn+cyS0hT K9nGZMPBTmd5FU/CEIos09Vw5VymxOWcJwWKHPZvGg8FR5I+7QzosVtgtwHOqctYIqmQjD5PrnDCq lLJ4eYxJCy5JZH5lnylZO0WPrwLpMUVcmloSJcn5by+Iri88MuSd2Z6okKU2LgCHau5OFj5qOrEZ/ BpfgYhxUZM9QM6p8l1T0dSMj8NJxWH3snI1bgX1ioXINPTeJGNRxAvAboGtUXfrw45nEas0o+Wl9D 4Leo8hJV1uEosyISk6gIGW0ZTN84j+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewAqs-0006oQ-R7; Wed, 14 Mar 2018 18:10:14 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewAqR-00064J-SU for linux-arm-kernel@bombadil.infradead.org; Wed, 14 Mar 2018 18:09:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KnIScdXuP/QOW+uFzY5e5HEeSXVcAaG3hI3sDsrm/t0=; b=eRR6Nq2Quc4D5yLnDZfN6WALt u+8j9uY9aio+s0l6Ru72Z3A2PLBCUf3UgMajOcicszD9qYWsKi7IocbEymsoNZBFYR6eZRlHg53D/ iJ3hnNO2uiejSLm8pwGhkUwPBEtzl8QtcHCIqSCvNF8nScx++oh32u6A3Qy1ylGZg2dciR74ksqWR d4fpt32hjoPqrhfUYXZMkXhX4Yg7LXRNeyjxPOGGsfaY/B6bT6p02arg55CUfWBfkfYbpM+WCpR53 bXmFU5yjZYaFKiaG8oFj75Z2Mxu0iD6hQj30af2PXIKAhmWoGfT/spvI4+rE96juEU91gnsBDFb1F XQLE82Bjg==; Received: from mail.bootlin.com ([62.4.15.54]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ew9oq-0003ay-9m for linux-arm-kernel@lists.infradead.org; Wed, 14 Mar 2018 17:04:07 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id B4A8920732; Wed, 14 Mar 2018 18:03:49 +0100 (CET) Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 738482070F; Wed, 14 Mar 2018 18:03:49 +0100 (CET) From: Gregory CLEMENT To: Wolfram Sang , linux-i2c@vger.kernel.org Subject: [PATCH] i2c: mv64xxx: Apply errata delay only in standard mode Date: Wed, 14 Mar 2018 18:03:40 +0100 Message-Id: <20180314170340.11951-1-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.16.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180314_130404_437824_B08C0CE6 X-CRM114-Status: GOOD ( 11.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Jason Cooper , Antoine Tenart , Gregory CLEMENT , Thomas Petazzoni , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The errata FE-8471889 description has been updated. There is still a timing violation for repeated start. But the errata now states that it was only the case for the Standard mode (100 kHz), in Fast mode (400 kHz) there is no issue. This patch limit the errata fix to the Standard mode. It has been tesed successfully on the clearfog (Aramda 388 based board). Signed-off-by: Gregory CLEMENT --- drivers/i2c/busses/i2c-mv64xxx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 440fe4a96e68..a5a95ea5b81a 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -845,12 +845,16 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data, */ if (of_device_is_compatible(np, "marvell,mv78230-i2c")) { drv_data->offload_enabled = true; - drv_data->errata_delay = true; + /* The delay is only needed in standard mode (100kHz) */ + if (bus_freq <= 100000) + drv_data->errata_delay = true; } if (of_device_is_compatible(np, "marvell,mv78230-a0-i2c")) { drv_data->offload_enabled = false; - drv_data->errata_delay = true; + /* The delay is only needed in standard mode (100kHz) */ + if (bus_freq <= 100000) + drv_data->errata_delay = true; } if (of_device_is_compatible(np, "allwinner,sun6i-a31-i2c"))