From patchwork Wed Jan 4 11:00:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 13088487 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 9E982C4708E for ; Wed, 4 Jan 2023 11:12:35 +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:References:In-Reply-To: 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: List-Owner; bh=1ivU+JXe6theLWh0dC2XfHpAj8h39Rlsm9uji/Pzl20=; b=KrwukvFEyhQ5FB NOeGPJQnKvw5cL8gCt7JKwLbjQyw5MsKlbFvoAe4Tx6crQ0CQ2GWtx87mx/rAHWbRYXy6qlKhQ61X iNeM9500hQdVzgi9AvJ6UiJ4qGLfo8hbbb2z3z9TwAhM4ITZpBUzkCS/R33eFLJ+dPZsupSwl1FDZ mosri+lsYVSBy5wK0+c3agsVeZflknRfciBrGvf9nPr698tYyB8OybdmlWznqYW5LumpgBXaYrCg+ zJa8AFIXbqamQkULAXpRwJcV6Y6lRJe94aja2mfPTDXiyTT6IF9KJOklyz/e8EI7fwqPkm3qKuWzg TrDA9t56a3MX5cLx6qnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pD1g1-008f0k-0c; Wed, 04 Jan 2023 11:11:21 +0000 Received: from marcansoft.com ([212.63.210.85] helo=mail.marcansoft.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pD1X3-008cAB-3W for linux-arm-kernel@lists.infradead.org; Wed, 04 Jan 2023 11:02:06 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id DC01341DF4; Wed, 4 Jan 2023 11:01:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1672830123; bh=6O6u/DiwF8q7P6Yv/PpHELUbZYJkapFUTj1HP8/Sg6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=xbUI3R/qFHwBvDCZsyCio7NVckEz+1/4EhgmDZkgYjeU6h2mgnP/V9akZ7+uJxjBA BS0694famCGv6qB8Yy5449gpx8Ij5lnifJVPJmJlHJARuXbw3oAw6myUiQ+lvCJDgZ MsE3dj4wzOJolPr18opaUPXj6cyXVIiYbrGQs+Whl7MP7abQhqvkuVlHgqdGxZCf5L o5eZb8rTSzoqRz6S2rSp5oZ09I6ex3Pxcc/DL9eyh/gLvm5jKXNj2qZw8FMW6diWrK KPxjtLx519xsTQ8mOTfcE2dzfwXrFKGEdKS1P+m39DJCRlJxuknw4bWlTdpA/tRsOX sClceEQUxXmrA== From: Hector Martin To: Joerg Roedel , Will Deacon , Robin Murphy Cc: Sven Peter , Alyssa Rosenzweig , Janne Grunau , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, iommu@lists.linux.dev, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hector Martin Subject: [PATCH 5/7] iommu: dart: Fix DART_PARAMS1/2 bit define names Date: Wed, 4 Jan 2023 20:00:11 +0900 Message-Id: <20230104110013.24738-6-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230104110013.24738-1-marcan@marcan.st> References: <20230104110013.24738-1-marcan@marcan.st> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230104_030205_343437_5D6205E1 X-CRM114-Status: GOOD ( 10.46 ) 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 They didn't have the PARAMS reg index in them, but they should. Signed-off-by: Hector Martin Reviewed-by: Sven Peter --- drivers/iommu/apple-dart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index 189487c1d978..03a3cb5638ba 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -40,10 +40,10 @@ #define DART_PARAMS1 0x00 -#define DART_PARAMS_PAGE_SHIFT GENMASK(27, 24) +#define DART_PARAMS1_PAGE_SHIFT GENMASK(27, 24) #define DART_PARAMS2 0x04 -#define DART_PARAMS_BYPASS_SUPPORT BIT(0) +#define DART_PARAMS2_BYPASS_SUPPORT BIT(0) #define DART_STREAM_COMMAND 0x20 #define DART_STREAM_COMMAND_BUSY BIT(2) @@ -893,8 +893,8 @@ static int apple_dart_probe(struct platform_device *pdev) dart_params[0] = readl(dart->regs + DART_PARAMS1); dart_params[1] = readl(dart->regs + DART_PARAMS2); - dart->pgsize = 1 << FIELD_GET(DART_PARAMS_PAGE_SHIFT, dart_params[0]); - dart->supports_bypass = dart_params[1] & DART_PARAMS_BYPASS_SUPPORT; + dart->pgsize = 1 << FIELD_GET(DART_PARAMS1_PAGE_SHIFT, dart_params[0]); + dart->supports_bypass = dart_params[1] & DART_PARAMS2_BYPASS_SUPPORT; dart->num_streams = dart->hw->max_sid_count;