From patchwork Thu May 5 15:40:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 12839681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 42C66C433EF for ; Thu, 5 May 2022 15:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=r7WBMUdu1ItDo0dH0eNSseGMPjJKDIkay0vnUmWh0WU=; b=OMCe9TpoC6bMJ2 GGKw5CkgSnvTj36b8priKi51X2oyo8Vku98fZdl0jGDs8RLj6zuXRUunDm1rGjp/nvVwILJc9wAYA dismWgtenGXeQPg4aFbCdCzyQy7/vxWLfgd2I3nE54yW2H38Cm8j+NKgsGtgOlrmN/gmK6Ox8AYVS DsUaNbeOur24ofG04R+6yi0YlYOnFq9Wpr2mlw2zcrwVja20y5eA815wPemVeavxHwGhcQmz5rP89 X7frCUW5CerFbrrTt6PPM2iM+cVyxkKdVszUZMN4YfhGUq79r7NZDdHN9kXxC8iRGuFM21++oFT2f FpLslciKDGMfIAK3dE4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmdaw-00GgyZ-OZ; Thu, 05 May 2022 15:40:46 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmdas-00GguZ-Pm; Thu, 05 May 2022 15:40:44 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 292215C0230; Thu, 5 May 2022 11:40:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 05 May 2022 11:40:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1651765235; x=1651851635; bh=xpW3unNQu8 QRdU1aUouMudDjza+0AjvP9kw1txQmGyE=; b=K+XKjHnGqoyi4gHJkLolZqrINg RXQ3eKUiL7v16XSP/Xxy0bqhYpHj9MrT4YEofBAY2Q8bhzdjhoxY05FYZ6vMNjwE typxn9tP2wsX7buHn1ABCO4GcQkZmvmsrJ+dTnQkeK0425tON0QKXveRQUczpTZt x8p4KFd8wHXIQjo9fHcIJGWqM+qHVZxgOqj0X6FAJACLdgNMPq4AkVF5wqE9g2kF NogEIXNjMG64mJHB8sfbuG3AABGf7i3frI/TE6Ss1WmUsdu0NLY2UoylI9OpvKSb CNroMLbHbGxVx0RPNyReTLP0O0ivy0fU1sLIeH9ZiW3VjGG4j5uYMISYMMlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1651765235; x=1651851635; bh=x pW3unNQu8QRdU1aUouMudDjza+0AjvP9kw1txQmGyE=; b=TjcNgBTc7BCUORWuw w1V6d2ADSkSxdWxd9PcwW9dHtUk/Xiq1UtIebZkA1gLOivoi01gSZVgOqmCp4zkG nzAMO/Ec6lpCAeuIf+QFEBsBCYYontmP6kdnSwa3C5aiUDMJe1t7Yw4zgaLLVGWu 2oxj7CcOqxetJSFxnNrQvClCGKH23FhZTUgeUXoOQITb6NgS2IlkdqClsbWb6K0V gxifAERdnnQK6G4i8lRdiDxc6c8fOwaK1NtDdPPAcAujUVMk36zXvYb/HU4jriZ8 z9Y5fMjSWhOq56Gue7hvd/+hU7I3H3u1QCR2SXxtUQl2TrJ0S/60+0FuKznDSKj0 LO2nQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedugdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuvhgvnhcurfgv thgvrhcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrfgrthhtvghrnh epjeelveffvdefgeeuteefueetgeeghfelveevheeugefftdelleeuudefvefhieelnecu ffhomhgrihhnpehkvghrnhgvlhdrohhrghdpghhithhhuhgsrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhvvghnsehsvhgvnhhp vghtvghrrdguvghv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 May 2022 11:40:33 -0400 (EDT) From: Sven Peter To: soc@kernel.org Cc: linux-nvme@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Sven Peter , Hector Martin , Alyssa Rosenzweig , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Subject: [GIT PULL] Apple SoC RTKit/SART/NVMe driver Date: Thu, 5 May 2022 17:40:20 +0200 Message-Id: <20220505154020.84638-1-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_084043_342173_7581B58A X-CRM114-Status: GOOD ( 12.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi SoC Team, Please merge the Apple SoC NVMe driver and its dependencies for 5.19. As discussed on the nvme mailing list [1] it's easiest if we take it entirely through the SoC tree since there's a chance that we will have more drivers depending on rtkit for 5.19. Thanks Sven [1] https://lore.kernel.org/linux-nvme/CAK8P3a1CO8_Pa=Hk3hcdNfT_eD3PQK2aWDFB9bwk6TCNbGmtEg@mail.gmail.com/ ---------------------------------------------------------------- The following changes since commit 3123109284176b1532874591f7c81f3837bbdc17: Linux 5.18-rc1 (2022-04-03 14:08:21 -0700) are available in the Git repository at: https://github.com/AsahiLinux/linux.git tags/asahi-soc-rtkit-sart-nvme-for-5.19 for you to fetch changes up to 5bd2927aceba181b84286e00aa2f56e117e699c3: nvme-apple: Add initial Apple SoC NVMe driver (2022-05-02 17:24:45 +0200) ---------------------------------------------------------------- Apple SoC NVMe driver and dependencies: - RTKit IPC library required to boot and communicate with co-processors embedded inside Apple SoCs - SART DMA address filter required to allow some DMA transactions for the NVMe co-processor - NVMe platform driver The following minor changes since v3 on the mailing list have been folded in: - sart: %llx -> %pa for a phys_addr_t - rtkit:/sart: Drop IS_ENABLED inside headers - rtkit: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL - nvme: Set NVME_REQ_CANCELLED in the timeout handler - nvme: Use DEFINE_SIMPLE_DEV_PM_OPS instead of #ifdef CONFIG_PM_SLEEP ---------------------------------------------------------------- Sven Peter (6): soc: apple: Always include Makefile soc: apple: Add RTKit IPC library dt-bindings: iommu: Add Apple SART DMA address filter soc: apple: Add SART driver dt-bindings: nvme: Add Apple ANS NVMe nvme-apple: Add initial Apple SoC NVMe driver .../devicetree/bindings/iommu/apple,sart.yaml | 52 + .../devicetree/bindings/nvme/apple,nvme-ans.yaml | 111 ++ MAINTAINERS | 4 + drivers/nvme/host/Kconfig | 13 + drivers/nvme/host/Makefile | 3 + drivers/nvme/host/apple.c | 1593 ++++++++++++++++++++ drivers/soc/Makefile | 2 +- drivers/soc/apple/Kconfig | 24 + drivers/soc/apple/Makefile | 6 + drivers/soc/apple/rtkit-crashlog.c | 154 ++ drivers/soc/apple/rtkit-internal.h | 62 + drivers/soc/apple/rtkit.c | 958 ++++++++++++ drivers/soc/apple/sart.c | 328 ++++ include/linux/soc/apple/rtkit.h | 155 ++ include/linux/soc/apple/sart.h | 53 + 15 files changed, 3517 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/iommu/apple,sart.yaml create mode 100644 Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml create mode 100644 drivers/nvme/host/apple.c create mode 100644 drivers/soc/apple/rtkit-crashlog.c create mode 100644 drivers/soc/apple/rtkit-internal.h create mode 100644 drivers/soc/apple/rtkit.c create mode 100644 drivers/soc/apple/sart.c create mode 100644 include/linux/soc/apple/rtkit.h create mode 100644 include/linux/soc/apple/sart.h