From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MISSING_HEADERS,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC2CC282DA for ; Fri, 19 Apr 2019 13:27:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F8E72229E for ; Fri, 19 Apr 2019 13:27:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CUaBqnQD"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=eInfochipsIndia.onmicrosoft.com header.i=@eInfochipsIndia.onmicrosoft.com header.b="JXaRhHaN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F8E72229E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=einfochips.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: From:Reply-To: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=W2q4DQwuvK+UnaVKGiC2fqJ7Bh4U4WCS8vkBaKvDzZc=; b=CUaBqnQDgfB0x6 +bqBXdScg/IOhMljSlmepx5+QE7Qe09z4Far29Ek2kJU2v+ZLPEs8DfbKwFaQbPd/TELWAOKkQwWB NEbsuq6UKw5UFrMovHiA5eqFoxRNCXBH9matGd1I61KcjX2+/746QbYapSTFX5tvzQ4VckXY9Bi+g vgRwgqBTDe3oxVMlC+pqVRdmxp7J5uAV1VnprWghgUgpPlML4Nx2xLBdE42l0mUKMwpsiq5/8UBlp vZ1vOswR0K5lLrFfgpyYgOG6NXwgswjQGqs1uPcJmkTPDpafBspXGrJ43mY3eZrMR5cT2ppgtDi6a uLNRZM7ZeMU0DF5Xjc3Q==; 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 1hHTXl-0000nY-8K; Fri, 19 Apr 2019 13:27:05 +0000 Received: from mail-eopbgr1300087.outbound.protection.outlook.com ([40.107.130.87] helo=APC01-HK2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHTXg-0000n9-Qv for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2019 13:27:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eInfochipsIndia.onmicrosoft.com; s=selector1-einfochips-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sdfUc6+kLnUGTJf7L9HG8c0ayt4uBIagq0PHTSw5FSk=; b=JXaRhHaNbTyMAG02rm9RyB/ESCCoW83TARTzwWjVG9n3DyAvk9K2y5WZ21cqRe9vJk40hjC8qJ5XzprDxECUita1vbDy5JmMchcChHfpFlpumLPNqsEgkqnhnUU7Rm1za3/zcHHjsDOFtlRZOGmtwAEfQgR6Pb+by1PP6eIEfIQ= Received: from HK0PR02MB2468.apcprd02.prod.outlook.com (52.133.208.17) by HK0PR02MB3314.apcprd02.prod.outlook.com (20.177.68.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Fri, 19 Apr 2019 13:26:53 +0000 Received: from HK0PR02MB2468.apcprd02.prod.outlook.com ([fe80::81e3:202b:6cdf:5912]) by HK0PR02MB2468.apcprd02.prod.outlook.com ([fe80::81e3:202b:6cdf:5912%2]) with mapi id 15.20.1813.013; Fri, 19 Apr 2019 13:26:53 +0000 From: Raag Jadav Subject: [PATCH] i2c: at91: fix TXRDY interrupt spam Thread-Topic: [PATCH] i2c: at91: fix TXRDY interrupt spam Thread-Index: AQHU9rONl182tFqeSUyYd/NZUUWF6A== Date: Fri, 19 Apr 2019 13:26:53 +0000 Message-ID: <1555680298-518-1-git-send-email-raag.jadav@einfochips.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: KL1PR0601CA0021.apcprd06.prod.outlook.com (2603:1096:802:1::31) To HK0PR02MB2468.apcprd02.prod.outlook.com (2603:1096:203:21::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=raag.jadav@einfochips.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [14.98.130.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1898ae49-df85-477c-fd5f-08d6c4caafbb x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:HK0PR02MB3314; x-ms-traffictypediagnostic: HK0PR02MB3314: x-microsoft-antispam-prvs: x-forefront-prvs: 0012E6D357 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39840400004)(396003)(346002)(366004)(376002)(136003)(189003)(199004)(36756003)(8676002)(102836004)(81156014)(81166006)(186003)(53936002)(54906003)(6512007)(26005)(50226002)(14454004)(59246006)(55236004)(7736002)(386003)(5660300002)(305945005)(6506007)(68736007)(2906002)(66066001)(478600001)(316002)(25786009)(78486014)(109986005)(2616005)(4326008)(71200400001)(256004)(14444005)(5024004)(6116002)(71190400001)(97736004)(6486002)(44832011)(6436002)(486006)(476003)(86362001)(8936002)(66574012)(64756008)(66446008)(3846002)(66476007)(66946007)(66556008)(1671002)(99286004)(73956011)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:HK0PR02MB3314; H:HK0PR02MB2468.apcprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: einfochips.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /HGNiiJLJX8FsWMXwtcsV/fHuml2Lvw6e+SoTzZNxqaCOb4FFxPyE+kOiECMK998Y4Z6Z2o1rQ0Xo0ZTDI25GK7tDLYt1HyEVGh/u4/rxlIWCVAvFKr9Nus2tYFfvfEiDePgFwmohaXmJEUjNCV/8Ywf/9WB8Duf5UyYPgCqhzvGJEMgzIHepN07HFeFjg5ixeI+6tB7n9tPi3ymNSip/y6cQj+VXOL0tuoylHPfwt96MJorngTcat8YsvzNrooKrBiOIZYkIPP2+0sFQZEwEO+2kOjsxWPh0wda5tGlzB9avyFkZ+D0bHDBud6Zl2CdDU5zYIXhVg8AG6s2V0cUokPaUwOqBQg1bla8TVB4FRcOoJgHoHZ1Y8r4Zi3lqgIMHIieeRm8rXNiz3FyUk6+vNp/LFoF+lEFQbnZbcwM8qQ= MIME-Version: 1.0 X-OriginatorOrg: einfochips.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1898ae49-df85-477c-fd5f-08d6c4caafbb X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2019 13:26:53.3627 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0adb040b-ca22-4ca6-9447-ab7b049a22ff X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK0PR02MB3314 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_062700_952034_80D51BDB X-CRM114-Status: GOOD ( 10.34 ) 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: Alexandre Belloni , "linux-kernel@vger.kernel.org" , Ludovic Desroches , "linux-i2c@vger.kernel.org" , Raag Jadav , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Performing i2c write operation while SDA or SCL line is grounded, TXRDY interrupt spam hangs the processor, not allowing to boot. Signed-off-by: raag --- drivers/i2c/busses/i2c-at91.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index bfd1fdf..47b5e8a 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c @@ -270,9 +270,11 @@ static void at91_twi_write_next_byte(struct at91_twi_dev *dev) writeb_relaxed(*dev->buf, dev->base + AT91_TWI_THR); /* send stop when last byte has been written */ -if (--dev->buf_len == 0) +if (--dev->buf_len == 0) { if (!dev->use_alt_cmd) at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_STOP); +at91_twi_write(dev, AT91_TWI_IDR, AT91_TWI_TXRDY); +} dev_dbg(dev->dev, "wrote 0x%x, to go %zu\n", *dev->buf, dev->buf_len); -- 2.7.4 ************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company ac cepts no liability for any damage caused by any virus transmitted by this email. ************************************************************************************************************************************************************* _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel