From patchwork Fri Jan 13 10:50:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 13100511 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 800D0C54EBE for ; Fri, 13 Jan 2023 10:59:30 +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=0Y2fpX6h2Z3pfvyIeKeX5DZMU6cRED9MEe+b2tCWeew=; b=enNY983TtKCXMk ncfmtFh8saWu4fwU5jx15RoguB5hTSzyh3SKmCxP7FdQhz5MwipxIlZHZRI3PXjyillUlyC4NrxV8 Nfxiw4bqsG0O1v4Bomo/0nZLSfw+t4JSsr94AAIfEv9EiMZdgaQJscQVjThthgxi+j5IJ7KOeAJCp T5j3XYuYu9XyXLQaCKZ11T6pGqj6zfmviiXiE3mpJLOGzQmgVfho/3eE8Da++IDOfT2hTCfsC3ZwO nsPeBEVTz6G5OsvCzJYQHnzFbueAg4JAVgr0rc2i/INuIWEsRnf5ZQBnMyaNG8OpDIu59RFEwTXyo xX20H8CCOCdUGiftFCHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGHlM-001wuk-8M; Fri, 13 Jan 2023 10:58:20 +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 1pGHf5-001txn-EZ for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 10:51:54 +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 578D44206F; Fri, 13 Jan 2023 10:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1673607110; bh=XN7W4wHaV4CYylxXNUod7fpaKbnCRKcr/LnEs1SZri8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lm1OI8ZmxoHebhJKLPlRDpInHCgUpIecT+3XN2nnu+fLs+th+5YQYk9IqXLrQdImt K0fOEhs0+OpDPLNaB0AjR/iMUL2GYphZ6BY5NQt8gWnza+U7iOaCA/QMufkefDwgkV CCjpMh8GUSJhKBWwpkD56lcslFmfDjyyeasxUEBpqfKnAin/8boa4Y5kPGdN5OTZJy 7bAmCAz4hO3eFWLZmAcvlp37pw65DlnDQcUcAh13Quc+Me2ojJhVKwW/acErloBMlS DrEuMagqhKOCtaOl1oc8+EWkUrjeSbyZhxcBPlh1zC6icxZSj+pAYlXtpffMV/lg0D H/9ywWdQHcTiA== 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: Fri, 13 Jan 2023 19:50:28 +0900 Message-Id: <20230113105029.26654-6-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230113105029.26654-1-marcan@marcan.st> References: <20230113105029.26654-1-marcan@marcan.st> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_025151_692285_D113BDCF X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. 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. Reviewed-by: Sven Peter Signed-off-by: Hector Martin --- 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 82b2581d909c..89be055a44be 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;