From patchwork Tue Nov 29 03:32:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tnhuynh@apm.com X-Patchwork-Id: 9450877 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 DAA586074E for ; Tue, 29 Nov 2016 03:32:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D148927829 for ; Tue, 29 Nov 2016 03:32:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4F3E27D4A; Tue, 29 Nov 2016 03:32:23 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CD6A27829 for ; Tue, 29 Nov 2016 03:32:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754827AbcK2DcV (ORCPT ); Mon, 28 Nov 2016 22:32:21 -0500 Received: from mail-pg0-f50.google.com ([74.125.83.50]:36246 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbcK2DcU (ORCPT ); Mon, 28 Nov 2016 22:32:20 -0500 Received: by mail-pg0-f50.google.com with SMTP id f188so63899420pgc.3 for ; Mon, 28 Nov 2016 19:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id; bh=0/zYmsDxQ3xuc7uWL5Iuu3Dc4N9+UwVi5lpLKkgGYkI=; b=hh3FVaoLeLyv+M3QWivnz6mz5aR3W5vGThenBxfIEbqCzL2Yj4xhAok/d5GTg1kzZK a24ycVxcHyZbRHy4ml/hzl8+/32tOZSezEI5Ft10RM6u9w4QWONPnRX105qQeHKYnQbU tNv25WqPBZkJ4pF+y/60Jju1Yb9E9kIA1wtK4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0/zYmsDxQ3xuc7uWL5Iuu3Dc4N9+UwVi5lpLKkgGYkI=; b=fN0WJ1e+e+MQV4pOZYKDI0klbRevgJfeYQRtflQO3pwRjJKjvQTomyDk8n/kDC1i2g ubNQiJYZbwn6eP8FaW8ZvusyY4e26ucrOblFr2qR4aonxq1FAoz5fTAsG9U1KhEF92o7 li3AYlrAHavgvyOZCDIlVrHQzndB5ygT2wOq1ngjwnazjo4EJYYUxs4roccLfA8ngLXA DGKcuZFC+HaWCP1PLQ2Jf5ipJKQeKX755yofj9QUbRrw+o0zeR67Qi8OFsk0gK7EtFS4 2OaNUI2G+MLhHmRaSPyglf8v7sbHpfpPIu+RqMlhFqOQqwdVxneOecsNxGwGZkAmA9IA U7Ow== X-Gm-Message-State: AKaTC00D1kmMheDbZw4S+nkvETIxLkB2ZWdF4znKkcQpDTVxXYSDlv4/2FeR/c3vz5OL5vGw X-Received: by 10.98.149.81 with SMTP id p78mr25619083pfd.95.1480390339934; Mon, 28 Nov 2016 19:32:19 -0800 (PST) Received: from localhost.localdomain ([118.69.219.197]) by smtp.gmail.com with ESMTPSA id q9sm90404852pfg.47.2016.11.28.19.32.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 19:32:18 -0800 (PST) From: Tin Huynh To: Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Loc Ho , Thang Nguyen , Phong Vo , patches@apm.com, Tin Huynh Subject: [PATCH V1] i2c: designware: fix wrong tx/rx fifo for ACPI Date: Tue, 29 Nov 2016 10:32:07 +0700 Message-Id: <1480390327-24562-1-git-send-email-tnhuynh@apm.com> X-Mailer: git-send-email 1.7.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ACPI always sets txfifo and rxfifo to 32. This configuration will cause problem if the IP core supports a fifo size of 16 bytes only. Set the default value to 0 so the driver will get these parameters from IP core. Signed-off-by: Tin Huynh --- drivers/i2c/busses/i2c-designware-platdrv.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 0b42a12..c88a4b8 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -97,8 +97,8 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev) const struct acpi_device_id *id; dev->adapter.nr = -1; - dev->tx_fifo_depth = 32; - dev->rx_fifo_depth = 32; + dev->tx_fifo_depth = 0; + dev->rx_fifo_depth = 0; /* * Try to get SDA hold time and *CNT values from an ACPI method if