Message ID | 1487754465-10190-1-git-send-email-a.hajda@samsung.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-samsung-soc-owner@kernel.org> 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 4B0796051E for <patchwork-linux-samsung-soc@patchwork.kernel.org>; Wed, 22 Feb 2017 09:08:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2349D28676 for <patchwork-linux-samsung-soc@patchwork.kernel.org>; Wed, 22 Feb 2017 09:08:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17CDB2873A; Wed, 22 Feb 2017 09:08:18 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 00F1328676 for <patchwork-linux-samsung-soc@patchwork.kernel.org>; Wed, 22 Feb 2017 09:08:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753600AbdBVJIQ (ORCPT <rfc822;patchwork-linux-samsung-soc@patchwork.kernel.org>); Wed, 22 Feb 2017 04:08:16 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:38877 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbdBVJIM (ORCPT <rfc822;linux-samsung-soc@vger.kernel.org>); Wed, 22 Feb 2017 04:08:12 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OLR00HUOQPLAF60@mailout1.w1.samsung.com>; Wed, 22 Feb 2017 09:08:09 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170222090809eucas1p208bca615fc45bb22c797865a59cd6b45~lkNNHqUHk0397703977eucas1p2W; Wed, 22 Feb 2017 09:08:09 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 60.50.30614.8F45DA85; Wed, 22 Feb 2017 09:08:08 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170222090808eucas1p28d2afb2a8752a0442f797983b8773ef2~lkNMgH5hC0397303973eucas1p2Q; Wed, 22 Feb 2017 09:08:08 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-f1-58ad54f8a4c9 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id AB.5E.10233.EF45DA85; Wed, 22 Feb 2017 09:08:14 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLR0013NQPJ31A0@eusync2.samsung.com>; Wed, 22 Feb 2017 09:08:08 +0000 (GMT) From: Andrzej Hajda <a.hajda@samsung.com> To: Wolfram Sang <wsa@the-dreams.de>, Krzysztof Kozlowski <krzk@kernel.org>, Javier Martinez Canillas <javier@osg.samsung.com>, linux-i2c@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Andrzej Hajda <a.hajda@samsung.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Marek Szyprowski <m.szyprowski@samsung.com> Subject: [PATCH] i2c: exynos5: disable fifo-almost-empty irq signal when necessary Date: Wed, 22 Feb 2017 10:07:45 +0100 Message-id: <1487754465-10190-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsWy7djP87o/QtZGGEy4pWdxa905VouNM9az Wrx5u4bJ4vz5DewWHX+/MFrMOL+PyWLtkbvsFitPzGJ24PDYtKqTzWNL/112j74tqxg9Tp56 wuLxeZNcAGsUl01Kak5mWWqRvl0CV8aaD//ZCtZwVLy6/Yi9gfEtWxcjJ4eEgInE+gt/oGwx iQv31gPZXBxCAksZJRY8nscE4XxmlDi9bi0rTMfKBVNZIBLLGCW+vj3CCuH8Z5S4vuktO0gV m4CmxN/NN8FmiQgcYJS4d20d2CxmgR5GibnXG5hBqoQFQiS27D4K1sEioCpxqOUVI4jNK+As 8WjlCqir5CRunutkBmmWELjPJjF5YgNQEQeQIyux6QAzhOki8eFiIUS5sMSr41vYIWwZicuT u1kgWrsZJT71n2CHcKYwSvz7MIMZospa4vDxi2DPMQvwSUzaNh1qKK9ER5sQRImHxIFJj5gg bEeJBbv3gC0QEoiVuNO9jH0Co/QCRoZVjCKppcW56anFRnrFibnFpXnpesn5uZsYgXF7+t/x jzsY35+wOsQowMGoxMP7wH1NhBBrYllxZe4hRgkOZiUR3niftRFCvCmJlVWpRfnxRaU5qcWH GKU5WJTEefcsuBIuJJCeWJKanZpakFoEk2Xi4JRqYNyVdr5RdZ7l3GXSycF3lvjJT2k+LZuW nsJXtOPWX47dPbb+Z36vMG55X57/ZoGoi418g/XBJdsV37ozTI/JrmdXqN2gV2/XPse6SujD rrjpLup1jWd85zNvY85eLfqNl63r09YdO7Y2hvG9mpM6t89YQfunTOeSR2XTMrkepJUaChfu EuC+p8RSnJFoqMVcVJwIAGlcM8LXAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsVy+t/xK7r/QtZGGLy4I2Fxa905VouNM9az Wrx5u4bJ4vz5DewWHX+/MFrMOL+PyWLtkbvsFitPzGJ24PDYtKqTzWNL/112j74tqxg9Tp56 wuLxeZNcAGuUm01GamJKapFCal5yfkpmXrqtUmiIm66FkkJeYm6qrVKErm9IkJJCWWJOKZBn ZIAGHJwD3IOV9O0S3DLWfPjPVrCGo+LV7UfsDYxv2boYOTkkBEwkVi6YygJhi0lcuLceKM7F ISSwhFHi/467YEVCAo1MEi1d7iA2m4CmxN/NN8GKRAQOMEpsO/uPHcRhFuhjlGj8uwqsQ1gg RGLL7qPsIDaLgKrEoZZXjCA2r4CzxKOVK6BWy0ncPNfJPIGRewEjwypGkdTS4tz03GIjveLE 3OLSvHS95PzcTYzAQN127OeWHYxd74IPMQpwMCrx8Ha4rokQYk0sK67MPcQowcGsJMIb77M2 Qog3JbGyKrUoP76oNCe1+BCjKdDyicxSosn5wCjKK4k3NDE0tzQ0MrawMDcyUhLnnfrhSriQ QHpiSWp2ampBahFMHxMHp1QDo5CT6SzXpqWv3XuS/3x8zbsvbk7zGmtT1gviQfsVrR/cd34u feb32cSEuvb8xh/f1q0ynLx+Za/4Cqf1xuwFf69Zr8tiFch2aWu+tOF35sQeR8Uqtbez5XhS VbaWTF4558WFCoMy5uyS4zy9lgw+EX9CC6VslXqjGipKPCUfJPa6BHUUGmoqsRRnJBpqMRcV JwIAZss/KmoCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170222090808eucas1p28d2afb2a8752a0442f797983b8773ef2 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRvsgrw=?= =?UTF-8?B?7ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRtTYW1z?= =?UTF-8?B?dW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170222090808eucas1p28d2afb2a8752a0442f797983b8773ef2 X-RootMTR: 20170222090808eucas1p28d2afb2a8752a0442f797983b8773ef2 References: <CGME20170222090808eucas1p28d2afb2a8752a0442f797983b8773ef2@eucas1p2.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-samsung-soc.vger.kernel.org> X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index bea6071..2e11793 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -503,7 +503,13 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id) len = i2c->variant->fifo_depth - fifo_level; if (len > (i2c->msg->len - i2c->msg_ptr)) + if (len > (i2c->msg->len - i2c->msg_ptr)) { + u32 int_en = readl(i2c->regs + HSI2C_INT_ENABLE); + + int_en &= ~HSI2C_INT_TX_ALMOSTEMPTY_EN; + writel(int_en, i2c->regs + HSI2C_INT_ENABLE); len = i2c->msg->len - i2c->msg_ptr; + } while (len > 0) { byte = i2c->msg->buf[i2c->msg_ptr++];
Fifo-almost-empty irq signal should be disabled as soon as possible, to avoid unnecessary interrupt storm. The best moment is when there is no more data to feed fifo. This patch fixes system stalls caused by IRQ storm. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/i2c/busses/i2c-exynos5.c | 6 ++++++ 1 file changed, 6 insertions(+)