From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 06D6226738C; Sat, 30 May 2026 18:42:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780166556; cv=none; b=B87VbcvjUQKMe8R/kJ84NO+r8yKfD1fmjj94/1CFR0cL8AHGkTxqffVqDgcQFJwHR1zEd6zgfsyivro1Wb4F23Y5aT+gytrUsqQp6Xn8cwV4hMsz4jnLSF4qc5DfJW8nzmQXtXKHgv9PE0mK7t0Ax8/YvVKU0509kToPEkjRqxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780166556; c=relaxed/simple; bh=YXTplMTij6akB5cgvyG8nDYxdesycnuamBYoRGW9avg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iWTBNgzz0eCPpjwZvJRiD4jkU0GY5u/foTKo/ngzTc2gSuGYDx/9EB6RGjGB5WCOUvmhW6ByGLS1qmVIXScYSTbjVD4sQHnC/tab9bQQOg0rHvtKWl701+HMa5nSgapOrWcpFSefBdO2p0tPsGKbWzs0jLp3goHaFMv7KljaL0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XWb3ZgV8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XWb3ZgV8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BC701F00893; Sat, 30 May 2026 18:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780166555; bh=7+9Y6UQZTb65tjJv8u92Xll/Ll7YVl4j+0sWO8yrGUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XWb3ZgV8rQK9wi/k10c7YndVSQHHWCgX0AHAVdC6raOwbf9/7ycNgcEJZ24tVTB4n DdHBdqcdS0w3E0hn6ZPG727lsunQWbM1yTIuCXNpWoPMOskKXDm19JoBHSuzjSkfqV zxQW9MWSmJKupyiypOG8MyDSWD+DbMFWSxv3g34c= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mikko Perttunen , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 5.10 362/589] memory: tegra30-emc: Fix dll_change check Date: Sat, 30 May 2026 18:04:03 +0200 Message-ID: <20260530160234.357111463@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160224.570625122@linuxfoundation.org> References: <20260530160224.570625122@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikko Perttunen [ Upstream commit 0a93f2355cf4922ad2399dbef5ea1049fef116d4 ] The code checking whether the specified memory timing enables DLL in the EMRS register was reversed. DLL is enabled if bit A0 is low. Fix the check. Fixes: e34212c75a68 ("memory: tegra: Introduce Tegra30 EMC driver") Signed-off-by: Mikko Perttunen Link: https://patch.msgid.link/20260126-fix-emc-dllchange-v1-2-47ad3bb63262@nvidia.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- drivers/memory/tegra/tegra30-emc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index 1bd6d3d827aa9..464cdc702754c 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -513,14 +513,14 @@ static int emc_prepare_timing_change(struct tegra_emc *emc, unsigned long rate) emc->emc_cfg = readl_relaxed(emc->regs + EMC_CFG); emc_dbg = readl_relaxed(emc->regs + EMC_DBG); - if (emc->dll_on == !!(timing->emc_mode_1 & 0x1)) + if (emc->dll_on == !(timing->emc_mode_1 & 0x1)) dll_change = DLL_CHANGE_NONE; - else if (timing->emc_mode_1 & 0x1) + else if (!(timing->emc_mode_1 & 0x1)) dll_change = DLL_CHANGE_ON; else dll_change = DLL_CHANGE_OFF; - emc->dll_on = !!(timing->emc_mode_1 & 0x1); + emc->dll_on = !(timing->emc_mode_1 & 0x1); if (timing->data[80] && !readl_relaxed(emc->regs + EMC_ZCAL_INTERVAL)) emc->zcal_long = true; -- 2.53.0