Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp842574ybp; Fri, 4 Oct 2019 05:56:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTLvV1fjwWoH7KMuqSMSFEvJDTLMNal2eQqHVNCORluO/OltqM27lT/FOi4rw1JXG+3sg+ X-Received: by 2002:a17:906:1d03:: with SMTP id n3mr12318443ejh.287.1570193805052; Fri, 04 Oct 2019 05:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570193805; cv=none; d=google.com; s=arc-20160816; b=dAtMsJcuWCgbVOvPe5Zn4JtLukUmZWF/1KRMxfSdfIJ0TNbHF5cAIO2syDxA0lhr7m 91CRT6h2sutvrw98pU7noiUlJFSePubFC4ahUuMfKwGRUuomxZ9UARf2YE59SJqyiNes +Iv0MsF5L9QaEaetKVEf+Tn3d/7/e03H/kSOGMPgR/3Ebl4reisa5+jBzCs2t7MhWW4F hFbdjjboO5HvL9hlZYblFkr087lWur1JWCwWiphlkQOeykMLKgtggWIsGRPDb7Xsm9rA 9IPViYwh+NdWQKWVngDBXHWSCUEU3/F8pGJklzmeEoqU8t5vUIiER7lbbI1A+nrN7Bvq s9kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=lGK3rGa8rr3JIk8PpyLmxZn15MCxqgHG13xaixhMEI4=; b=av1V0/Vrm+zxrYuEP95UrFFVuhTCRwqdS5KfYCdTLatPkJYXc8tZQu9F3PoSveERgd oGBHOY0MMZbbpsY47rIh2tzxo67MCi94/dLtf8KhE7c1rB7gvRtXluJ3sdpxA4sWveNZ qzUD6yGCJX4VK6vqOx4JdOJ/CJAecFl+PjdFXUTz5w2PPf7BbjUGzdamvORwH2QA5H5g PeKWBipa6EUIRnKGe+kyotV44t9ynQURFZrO6/J/uCvyTa71QJyAhswUMf9ZjdZ71Iq2 T8Pyb+iNqFR4d7RuB6qF7j5YFpKqUg9/LjgHrEJ5ZY7Mt44sVyhIrMw00Ged6uRvmmUp ij2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ca7si2912655ejb.319.2019.10.04.05.56.20; Fri, 04 Oct 2019 05:56:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387894AbfJDMwe (ORCPT + 99 others); Fri, 4 Oct 2019 08:52:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:42540 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387545AbfJDMwe (ORCPT ); Fri, 4 Oct 2019 08:52:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 59CBAB125; Fri, 4 Oct 2019 12:52:32 +0000 (UTC) From: Nicolas Saenz Julienne To: Adrian Hunter , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com Cc: wahrenst@gmx.net, Nicolas Saenz Julienne , Matthias Brugger , Ulf Hansson , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: sdhci-iproc: fix spurious interrupts on Multiblock reads with bcm2711 Date: Fri, 4 Oct 2019 14:52:26 +0200 Message-Id: <20191004125226.27037-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Raspberry Pi 4 SDHCI hardware seems to automatically issue CMD12 after multiblock reads even when ACMD12 is disabled. This triggers spurious interrupts after the data transfer is done with the following message: mmc1: Got data interrupt 0x00000002 even though no data operation was in progress. mmc1: sdhci: ============ SDHCI REGISTER DUMP =========== mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00001002 mmc1: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000 mmc1: sdhci: Argument: 0x00000000 | Trn mode: 0x00000033 mmc1: sdhci: Present: 0x1fff0000 | Host ctl: 0x00000017 mmc1: sdhci: Power: 0x0000000f | Blk gap: 0x00000080 mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000107 mmc1: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000 mmc1: sdhci: Int enab: 0x03ff100b | Sig enab: 0x03ff100b mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000 mmc1: sdhci: Caps: 0x45ee6432 | Caps_1: 0x0000a525 mmc1: sdhci: Cmd: 0x00000c1a | Max curr: 0x00080008 mmc1: sdhci: Resp[0]: 0x00000b00 | Resp[1]: 0x00edc87f mmc1: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x00400e00 mmc1: sdhci: Host ctl2: 0x00000001 mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0xf3025208 mmc1: sdhci: ============================================ Enable SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 to enable ACMD12 on multiblock reads and suppress the spurious interrupts. Signed-off-by: Nicolas Saenz Julienne Tested-by: Matthias Brugger --- drivers/mmc/host/sdhci-iproc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 2b9cdcd1dd9d..f4f5f0a70cda 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -262,6 +262,7 @@ static const struct sdhci_iproc_data bcm2835_data = { }; static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = { + .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, .ops = &sdhci_iproc_32only_ops, }; -- 2.23.0