From patchwork Sat Jun 24 11:29:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 13291636 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 60FF0EB64DA for ; Sat, 24 Jun 2023 11:31:20 +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=MPPfE4g/HUMm8Oe1jeDD+bNMVKvbPxHAz346Lf70XAU=; b=UmHpcxCkqDVfGn uyaE0sJzBUrLru8mAxfDeQ9Nj1suOHcQDSzqqra5c4OTKN3AVxhFIoxK+bGx1fn5YrB+DtLlLuOF7 kNVtsB3yh7KI7luMvK4xfTMVOSR8LHj6vEdknWgSCtU11b3GvQ/MrQuT1hhjtC1hrzcSfUNeOGW50 ut60Phb81pvZ3HxGESv2RNdtoyhqU8Fhb7jIPyYNdDENXh8hjPfUBaz40iKIkOqSuN17A1rGfz6XD /udUgvigS3WUWSDWNw1DyE2VJpeBJiIDWNmcu/Kjx9VH8K8S+AOHw16aX41RdMY8HVsBAG5c9Siua nxbBw/1brxs69yoNgnfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qD1Tf-005tWg-2f; Sat, 24 Jun 2023 11:30:51 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qD1Tc-005tVj-1F for linux-arm-kernel@lists.infradead.org; Sat, 24 Jun 2023 11:30:50 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f9b4a71623so15513525e9.1 for ; Sat, 24 Jun 2023 04:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687606245; x=1690198245; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=HRYaJVMtI2+V2Yy5LWABEK4iahmUg3ox3qudaa1bywQ=; b=Ot3PiZHGIRsBOazVE8UAaJ3/Yk5C5vC+D9CgOwenc9LpBe9HHXQq6flBjrE3hNYNgY +RN74+AK7hmcTdVZJENVCxA9Hi2f+YQNDyzLWEPygw+1B6DjMYofgQhPx1WbYY8TZJuv cEJaPO2QyUxqEuHw0c3hG1EFNjWgvAoazVAyPt8fA9VB5HdobiFxsep+dA7K469uOlrG Sg1o0MgH9i+PeNE4bZSynn9EEIqzVPvRgVlyrsgJSBq+TVOY6cLXZ3rOoHc4G4fYRVK7 ZPoIo4/9kMmYGl7c/p5B09SbhUtP0Y+dfjI+/QaMS+Djba4ue7Q9X+Bfb1QIam8Z/h8o IinQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687606245; x=1690198245; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HRYaJVMtI2+V2Yy5LWABEK4iahmUg3ox3qudaa1bywQ=; b=gRC/xvAIv9suLL36P+HPjJ6RbWswIjXLJ5QE9mJb3po7ykYcxRr7khXT+dXfBqRW9B dAZwoQUF6Q854oc0AqSpRDUTRJnyeWCxiH6NsgkGGr/SpRQd4S+/bWq0JFZw7SDUCpea DwPT0tJtPurfY6tqSCpCw1HVCYv40iCMzMrkob63+MDWW6hh00lFCkWL7Bzx+gCs9iP1 MFFCPZC3/OHBn06pKU9OGBs8fhXoqYip2KsfafIowD+JtZFQzCczFZKr6WTsYUF0VkT6 GloBYNMt60hfiJHlqBHYSaQvfZjQjHt4PDTYckVIC7O9UYebhvmXPEjOqZw7PQKYogPC 1Lhw== X-Gm-Message-State: AC+VfDz/hiIA0DKEkjydywygVKx4EfJjxjS4n/KVA5ZC/CJsMRcZAWQl w+o8CoWoKCa0srBS76S1Yqc= X-Google-Smtp-Source: ACHHUZ5IU4dS6xvQKCWsBtDRjGB+ZmX9m5sNYJJxzfXFpbyFViNQ7m+fT7Ws2tgc050NYUIPlwpqnA== X-Received: by 2002:a7b:c40e:0:b0:3fa:8714:86bd with SMTP id k14-20020a7bc40e000000b003fa871486bdmr410519wmi.29.1687606244738; Sat, 24 Jun 2023 04:30:44 -0700 (PDT) Received: from localhost (dslb-094-220-187-252.094.220.pools.vodafone-ip.de. [94.220.187.252]) by smtp.gmail.com with ESMTPSA id l25-20020a1c7919000000b003f9b29ba838sm1925790wme.35.2023.06.24.04.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jun 2023 04:30:44 -0700 (PDT) From: Jonas Gorski To: Linus Walleij , Imre Kaloz , Krzysztof Halasa Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] bus: ixp4xx: fix IXP4XX_EXP_T1_MASK Date: Sat, 24 Jun 2023 13:29:58 +0200 Message-Id: <20230624112958.27727-1-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230624_043048_423613_3BAC6E39 X-CRM114-Status: GOOD ( 14.24 ) 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 The IXP4XX_EXP_T1_MASK was shifted one bit to the right, overlapping IXP4XX_EXP_T2_MASK and leaving bit 29 unused. The offset being wrong is also confirmed at least by the datasheet of IXP45X/46X [1]. Fix this by aligning it to IXP4XX_EXP_T1_SHIFT. [1] https://www.intel.com/content/dam/www/public/us/en/documents/manuals/ixp45x-ixp46x-developers-manual.pdf Fixes: 1c953bda90ca ("bus: ixp4xx: Add a driver for IXP4xx expansion bus") Signed-off-by: Jonas Gorski --- Based on 4.6-rc7-ish, since I didn't know which tree I should use, though for this driver it probably doesn't matter anyway. Build tested, but not run tested. @Linus I found this purely by accident when I was looking for examples of GENMASK(). Your recent push to resurrect ixp4xx in OpenWrt convinced me to submit it in a timely manner ;D Also the "ARM/INTEL IXP4XX ARM ARCHITECTURE" entry in MAINTAINERS still lists your kernel.org email address, you might want to update that. @Imre Likewise, it still has your openwrt.org address. drivers/bus/intel-ixp4xx-eb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/intel-ixp4xx-eb.c b/drivers/bus/intel-ixp4xx-eb.c index f5ba6bee6fd8..320cf307db05 100644 --- a/drivers/bus/intel-ixp4xx-eb.c +++ b/drivers/bus/intel-ixp4xx-eb.c @@ -33,7 +33,7 @@ #define IXP4XX_EXP_TIMING_STRIDE 0x04 #define IXP4XX_EXP_CS_EN BIT(31) #define IXP456_EXP_PAR_EN BIT(30) /* Only on IXP45x and IXP46x */ -#define IXP4XX_EXP_T1_MASK GENMASK(28, 27) +#define IXP4XX_EXP_T1_MASK GENMASK(29, 28) #define IXP4XX_EXP_T1_SHIFT 28 #define IXP4XX_EXP_T2_MASK GENMASK(27, 26) #define IXP4XX_EXP_T2_SHIFT 26