From patchwork Fri Feb 22 14:53:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 10826261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B86015AC for ; Fri, 22 Feb 2019 14:54:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AF502E2DC for ; Fri, 22 Feb 2019 14:54:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EA3E327A9; Fri, 22 Feb 2019 14:54:42 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 A03B12E2DC for ; Fri, 22 Feb 2019 14:54:41 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=thSY8jjjoml1FSWqvjN+G4haathLvbGUenOa4cPgFIY=; b=VZASi8NC+1cudK mgJYTAYLz5quDl7UdTY1Dmc6TodLxFdFmXiDBKfB2hL3jtoEKc8ihB4Mvt3cy+5KKLC56B5HH7l56 jtBFbkcFemBCSGO1+HwuIWnu75/T9YkXWYacm7lIvZ/cdpsbzkvlj+AL7Z0YBa/qAccC3cGd6PngI 2x1aByYZ3MdRhszGUIDKJZtcUdw5YYsVcbCjFSQm749oEGZLjvmmNRpW/GUIgl7KVTp32nuRikkzD Rhr6HIEBHTqYuhcvQP3Fv+tgyoCM1AqmZCr6A1Upjs+VYLsEbzX27P4fKwFd+ceu6rRbihVsascVP E+J9NLQGewXuFzPcwJFA==; 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 1gxCDj-0001NA-Hr; Fri, 22 Feb 2019 14:54:35 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gxCDP-000123-2Y for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2019 14:54:17 +0000 X-Originating-IP: 90.88.23.190 Received: from localhost.localdomain (aaubervilliers-681-1-81-190.w90-88.abo.wanadoo.fr [90.88.23.190]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 763A060008; Fri, 22 Feb 2019 14:53:59 +0000 (UTC) From: Miquel Raynal To: Gregory Clement , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , Mark Rutland , Jens Axboe , Hans de Goede , Thomas Gleixner , Marc Zyngier Subject: [PATCH 0/5] Enable per-port SATA interrupts and drop an hack in the IRQ subsystem Date: Fri, 22 Feb 2019 15:53:51 +0100 Message-Id: <20190222145356.23072-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190222_065415_266967_8228B2DA X-CRM114-Status: GOOD ( 12.94 ) 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: devicetree@vger.kernel.org, Antoine Tenart , Maxime Chevallier , Nadav Haklai , linux-ide@vger.kernel.org, Thomas Petazzoni , Miquel Raynal , linux-arm-kernel@lists.infradead.org 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 Hello, Some time ago, when the initial support for Armada CP110 was contributed, the SATA core was not able to handle per-port interrupts. Despite the hardware reality, the device tree only represents one main interrupt for the two ports. Having both SATA ports enabled at the same time has been achieved by a hack in the ICU driver(1) that faked the use of the two interrupts, no matter which SATA port was in use. Now that the SATA core is ready to handle more than one interrupt, this series adds support for it in the libahci_platform code. The CP110 device tree must be updated to reflect the two SATA ports available and their respective interrupts. To do not break DT backward compatibility, the ahci_platform driver now embeds a special quirk which checks if the DT is valid (only for A8k compatible) and, if needed, creates the two missing sub-nodes, and assign them the relevant "reg" and "interrupts" properties, before removing the main SATA node "interrupts" one. Thanks, Miquèl (1) The ICU is an irqchip aggregating the CP110 (south-bridge) interrupts into MSIs for the AP806 (north-bridge). Miquel Raynal (4): ata: libahci: Ensure the host interrupt status bits are cleared ata: libahci_platform: Support per-port interrupts irqchip/irq-mvebu-icu: Move the double SATA ports interrupt hack arm64: dts: marvell: armada-8040-clearfog: Drop non-existent SATA port Thomas Petazzoni (1): arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts .../arm64/boot/dts/marvell/armada-7040-db.dts | 7 +- .../marvell/armada-8040-clearfog-gt-8k.dts | 5 - .../arm64/boot/dts/marvell/armada-8040-db.dts | 14 +- arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 16 +- drivers/ata/acard-ahci.c | 2 +- drivers/ata/ahci.c | 2 +- drivers/ata/ahci.h | 3 +- drivers/ata/ahci_platform.c | 174 ++++++++++++++++++ drivers/ata/libahci.c | 9 +- drivers/ata/libahci_platform.c | 66 +++++-- drivers/ata/sata_highbank.c | 2 +- drivers/irqchip/irq-mvebu-icu.c | 18 -- 12 files changed, 274 insertions(+), 44 deletions(-)