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

Jason Gunthorpe
2014-02-07T00:51:17Z

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