Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp587428lqo; Wed, 8 May 2024 08:48:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVU3WZd/yjbpCcH0jAA0e/IlvgBAJbaLGXgj55zTd9gdtF9jBUKy9I+BD4CK8cDhnDtBVUwxZwfq+qYXURy4e6JpgN9uR/Lx2sUAWyOdQ== X-Google-Smtp-Source: AGHT+IEEMO219Md+mPAUUX5SeMJxQMbN+OGfrdOtCOHtPONO4S5+SVCNGgxjEbnsBtZKo1gllzzu X-Received: by 2002:a05:6e02:1906:b0:36c:4a36:1274 with SMTP id e9e14a558f8ab-36caed1bc57mr36043485ab.16.1715183299188; Wed, 08 May 2024 08:48:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715183299; cv=pass; d=google.com; s=arc-20160816; b=EWqx/1VABLBCDAoMtWSALOAFsoctZG+1cSypjq7TG6At4hjQ6gSiXrT1D7IKU//ByG BzESMtc1UPWTPWK6Z0ZBYw72cUd8nGnH3RPpRx3GsxSoVpUqqwJrNGiJDXJw1hMTw7nb k77SBegb0L/ifXmyqgi2QUY25ZW6MBGKvZbpvSZVhhBv3Ml9CThjGuuVSAokIU+GdvvR QkCy+pKAao8NJox7ZQRDykGAD/S5ebwaEylR5Mmpv/EgAPvR52IZunVGabc7ycYToX+B 0+KvCVKTe83B++wv/q+IsgUdMnEI9fUCLRnfddJOUfzwQGzaVr/90wvNZShCpCEitcBS xKew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=kMwAf/1N9pFtbUcp4Ga1o1QOImbfVSL7uVjrRBGJmhY=; fh=bAhdmMEwmQ61dG8EzwfVbRkcATr6MTLLyrdErx0VoBQ=; b=AFNaplqLSsU3GuuGOVJk+NvyviEuaBedOqDC4norA/lC0l7pUTd0KU2CP07ziApCiu e4Lm2Ws47uG3aIyeaKLlo3eeBUIjKDA2T6jcQ0JvmZWqwIFTO8s0La9U34GnDiRorR76 2Pt6TD4Xmy6NPgJL2uIAGozmn+QAJ2h1UnKKwWBRKj13/WqAKzwUbAO2AE5cXwWPfLKN 7+1vfuybQqKvLWwbfFxgyy6ksd9Dkjy+6edKhc+55EoyubvV5I0MAzVHbCOSpfa8ZFC4 HO85SsT345CrcDHZS1sKh/sOQbwYLNMomEwPFPwmoc+NxJti1k4yGkv+Yv3PuSa4+Fvq cDHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BTBS1PAz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173507-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173507-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n9-20020a63ee49000000b005f808ee8efasi10805249pgk.809.2024.05.08.08.48.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:48:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173507-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BTBS1PAz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173507-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173507-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E22528A14C for ; Wed, 8 May 2024 15:47:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DED212837A; Wed, 8 May 2024 15:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BTBS1PAz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEC35126F39; Wed, 8 May 2024 15:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715183234; cv=none; b=YkWYXLa9ccoqYfuLuBa6zICuHywKXMcNj83AfogbVLplUNlLY5my6fdNLcUCkH8IELKefOtM74DfhZAr2QOzIcp2Q5rTc7c3vWTtSZT45UI6U38PYPKJdFDhpnqxn2VG4bJ08ahkWzFOLsmATogTqcXJZkL6lfsDofyxisgVhtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715183234; c=relaxed/simple; bh=0HR6q0zl75bMlgfU7A1SNZdUSz2U26CMH4Khc6e3wVY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nVuUnhpHDQg1Xdlwixgo3TYH3NVk6TGkO2cmqWTjUkrpEOaY9pG+c6IxIZy28a/lQDK0Yd3qr5XpwgrJ1/qLGX274/AfhC95jKo9vi134OPKydNdDVMfJzqisC0VGpyaa591ppZ5IsFVGYMwMDTNYxvR0pmnZu2rRBNeMvwnpPo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BTBS1PAz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AE5AC113CC; Wed, 8 May 2024 15:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715183234; bh=0HR6q0zl75bMlgfU7A1SNZdUSz2U26CMH4Khc6e3wVY=; h=From:To:Cc:Subject:Date:From; b=BTBS1PAzbNf5tz9Ylffd4s0oku6UWlAlm3kmSVwkXAO3ZZzbNmrXVpugY9mtYHqdn /XdXhjBsBEa+TUINBTB2B2en7R3j+TtPNvonFvbDTdZBLEEP8WFzlTz9d1Qe6c+h2C 2bBe2OBE7a8lDLgcqtWnzFOwOT8imZwETAiPED54GqjZrhZ2yC8lS060tN/kWjh9RD 5wlaoTeI6ccvR+9z0aXsdXIPwhk4C53T7fdORfUk19uUSPq7R+rTX0YbHiUkn4w3jD pVQDZactcwSIJegW1XYIXUNMv5Hcukemwo6AdvLzTMCVLj400ZHlWqHuIdP0pURcw4 X9c6Vi/T6AhYA== From: Conor Dooley To: linux-spi@vger.kernel.org Cc: conor@kernel.org, Conor Dooley , stable@vger.kernel.org, Daire McNamara , Naga Sureshkumar Relli , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH v1] spi: microchip-core-qspi: fix setting spi bus clock rate Date: Wed, 8 May 2024 16:46:51 +0100 Message-ID: <20240508-fox-unpiloted-b97e1535627b@spud> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1341; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=JZge+HWuFL69hQ2rSaeYyYwg1fwwg6/w4PlilwD4sWM=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGnW87IY6wvjcvbd3lc5s9/aYuKZvvjm3zweQikcjRv66 /ctvsnQUcrCIMbBICumyJJ4u69Fav0flx3OPW9h5rAygQxh4OIUgIlcncrIsPFnWtJWd4OtphIv ylmefL970ExKTr392aGbuWIBFxlZ2hj+u9uo3583L3LLvj2WExIS+68aJopO6H/8T/nr/8/mnOx uXAA= X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit From: Conor Dooley Before ORing the new clock rate with the control register value read from the hardware, the existing clock rate needs to be masked off as otherwise the existing value will interfere with the new one. CC: stable@vger.kernel.org Fixes: 8596124c4c1b ("spi: microchip-core-qspi: Add support for microchip fpga qspi controllers") Signed-off-by: Conor Dooley --- CC: Conor Dooley CC: Daire McNamara CC: Naga Sureshkumar Relli CC: Mark Brown CC: linux-spi@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/spi/spi-microchip-core-qspi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-microchip-core-qspi.c b/drivers/spi/spi-microchip-core-qspi.c index 03d125a71fd9..09f16471c537 100644 --- a/drivers/spi/spi-microchip-core-qspi.c +++ b/drivers/spi/spi-microchip-core-qspi.c @@ -283,6 +283,7 @@ static int mchp_coreqspi_setup_clock(struct mchp_coreqspi *qspi, struct spi_devi } control = readl_relaxed(qspi->regs + REG_CONTROL); + control &= ~CONTROL_CLKRATE_MASK; control |= baud_rate_val << CONTROL_CLKRATE_SHIFT; writel_relaxed(control, qspi->regs + REG_CONTROL); control = readl_relaxed(qspi->regs + REG_CONTROL); -- 2.43.0