Thread (98 messages) flat view 98 messages, 11 authors, 2014-05-05
STALE4488d

[PATCH 10/21] ARM: MM: Add DT binding for Feroceon L2 cache

From: Jason Gunthorpe <hidden>
Date: 2014-02-07 00:51:17

On Fri, Feb 07, 2014 at 12:42:06AM +0100, Andrew Lunn wrote:
  
+#define L2_WRITETHROUGH_KIRKWOOD	0x00000010
BIT(x)?
+#ifdef CONFIG_OF
+static const struct of_device_id feroceon_ids[] __initconst = {
+	{ .compatible = "marvell,feroceon-kirkwood"},
+	{}
+}
How about following the naming convention from l2x0:

"marvell,kirkwood-cache"
"marvell,feroceon-cache"
+	if (writethrough) {
+		writel(readl(base) | L2_WRITETHROUGH_KIRKWOOD, base);
+		feroceon_l2_init(1);
+	} else {
+		writel(readl(base) & ~L2_WRITETHROUGH_KIRKWOOD, base);
+	feroceon_l2_init(0);
This should only happen for "marvell,kirkwood-cache" - it is very
kirkwood specific.. Someday mv78xx0 will have a different bit of code.

Maybe pass -1 to feroceon_l2_init and don't print the writethrough
type at all for the "marvell,feroceon-cache" case?

Regards,
Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help