[PATCH 49/75] ARM: l2c: fix register naming

Tony Lindgren tony at atomide.com
Fri Mar 28 12:00:48 EDT 2014


* Russell King <rmk+kernel at arm.linux.org.uk> [140328 08:22]:
> We have a mixture of different devices with different register layouts,
> but we group all the bits together in an opaque mess.  Split them out
> into those which are L2C-310 specific and ones which refer to earlier
> devices.  Provide full auxiliary control register definitions.
> 
> Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>

Acked-by: Tony Lindgren <tony at atomide.com>

> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -212,15 +212,15 @@ static int __init omap_l2_cache_init(void)
>  		return -ENOMEM;
>  
>  	/* 16-way associativity, parity disabled, way size - 64KB (es2.0 +) */
> -	aux_ctrl = (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
> -			(0x1 << 25) |
> -			(0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
> -			(0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT)) |
> -			(0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
> -			(1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
> -			(1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
> -			(1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
> -			(1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT);
> +	aux_ctrl = L310_AUX_CTRL_ASSOCIATIVITY_16 |
> +		   L310_AUX_CTRL_CACHE_REPLACE_RR |
> +		   L310_AUX_CTRL_NS_LOCKDOWN |
> +		   L310_AUX_CTRL_NS_INT_CTRL |
> +		   L2C_AUX_CTRL_WAY_SIZE(3) |
> +		   L2C_AUX_CTRL_SHARED_OVERRIDE |
> +		   L310_AUX_CTRL_DATA_PREFETCH |
> +		   L310_AUX_CTRL_INSTR_PREFETCH |
> +		   L310_AUX_CTRL_EARLY_BRESP;

I guess eventually we can set up some common configuration mask
define for these kind of things?

Regards,

Tony



More information about the linux-arm-kernel mailing list