Skip to contentSkip to conversation

cache: l2x0: Fix write to incorrect shared-override bit

PATCH New Ley Foon Tan 2 participants 2 messages Apr 17, 2020 – Apr 26, 2020 Standalone cache controller drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cache: l2x0: Fix write to incorrect shared-override bit

The existing code write bit-0 for shared attribute override enable bit. It should be bit-22 based on cache controller specification [1].

[1] http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246f/DDI0246F_l2c310_r3p2_trm.pdf

---
 drivers/cache/cache-l2x0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cache/cache-l2x0.c +2 -2
index 67c752d076f2..226824c2832e 100644
@@ -33,8 +33,8 @@ static void l2c310_of_parse_and_init(struct udevice *dev)
 			saved_reg &= ~L310_AUX_CTRL_INST_PREFETCH_MASK;
 	}
 
-	saved_reg |= dev_read_bool(dev, "arm,shared-override");
-	writel(saved_reg, &regs->pl310_aux_ctrl);
+	if (dev_read_bool(dev, "arm,shared-override"))
+		saved_reg |= L310_SHARED_ATT_OVERRIDE_ENABLE;
 
 	saved_reg = readl(&regs->pl310_tag_latency_ctrl);
 	if (!dev_read_u32_array(dev, "arm,tag-latency", tag, 3))
Signature · 1 line
2.19.0
#1 lore raw

PATCH 1/1 cache: l2x0: Fix write to incorrect shared-override bit

Quoted 6 lines · Ley Foon Tan

The existing code write bit-0 for shared attribute override enable bit. It should be bit-22 based on cache controller specification [1].

[1] http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246f/DDI0246F_l2c310_r3p2_trm.pdf

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200426/8a8e3bd7/attachment.sig>