summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKetan Patil <ketanp@nvidia.com>2026-09-03 18:25:19 +0000
committerKrzysztof Kozlowski <krzk@kernel.org>2026-09-15 09:06:33 +0200
commitfb8af372f899690646444cd0b38a88ec52568cbc (patch)
tree7f57c9b764898dd6b8d55ef25ff65148dc929b36
parentedda28d5317521c2f5172f869d3a433a2d37f7a2 (diff)
downloadlinux-next-fb8af372f899690646444cd0b38a88ec52568cbc.tar.gz
linux-next-fb8af372f899690646444cd0b38a88ec52568cbc.zip
memory: tegra: Parameterise Tegra264 MCF slice bound
Replace the hard-coded slice bound check in handle_mcf_irq() with a TEGRA264_MC_NUM_SLICES define, so the number of MCF slices is named rather than being an unexplained literal. Note that although the existing logic is correct, the actual number of MCF slices for Tegra264 is 5 and not 4. So define TEGRA264_MC_NUM_SLICES as 5 and update the logic accordingly. No functional change intended. Signed-off-by: Ketan Patil <ketanp@nvidia.com> Link: https://patch.msgid.link/20260903182520.950555-3-ketanp@nvidia.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
-rw-r--r--drivers/memory/tegra/tegra264.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/memory/tegra/tegra264.c b/drivers/memory/tegra/tegra264.c
index 56e55269eed7..b40275ae382e 100644
--- a/drivers/memory/tegra/tegra264.c
+++ b/drivers/memory/tegra/tegra264.c
@@ -727,6 +727,9 @@ static const char *const tegra264_rt_error_names[16] = {
#define TEGRA264_MC_APERTURE_UPHY 10
#define TEGRA264_MC_APERTURE_TOP 11
+/* Tegra264 splits the MCF common interrupt status across five slices. */
+#define TEGRA264_MC_NUM_SLICES 5
+
/*
* tegra264_mc_icc_set() - Pass MC client info to the BPMP-FW
* @src: ICC node for Memory Controller's (MC) Client
@@ -941,7 +944,7 @@ static irqreturn_t handle_mcf_irq(int irq, void *data)
for_each_set_bit(slice, &common_intstat, 32) {
/* Find out the slice number on which interrupt occurred */
- if (slice > 4) {
+ if (slice >= TEGRA264_MC_NUM_SLICES) {
dev_err(mc->dev, "Slice index out of bounds: %u\n", slice);
return IRQ_NONE;
}