Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
[sfrench/cifs-2.6.git] / arch / arm / mm / cache-l2x0.c
index 9819869d2bc90954967a5a1ca0e636c883c09e2f..df4955885b21d412ede58df0a8c26a4fcb8ca0fb 100644 (file)
@@ -218,6 +218,9 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
        cache_id = readl(l2x0_base + L2X0_CACHE_ID);
        aux = readl(l2x0_base + L2X0_AUX_CTRL);
 
+       aux &= aux_mask;
+       aux |= aux_val;
+
        /* Determine the number of ways */
        switch (cache_id & L2X0_CACHE_ID_PART_MASK) {
        case L2X0_CACHE_ID_PART_L310:
@@ -248,8 +251,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
        if (!(readl(l2x0_base + L2X0_CTRL) & 1)) {
 
                /* l2x0 controller is disabled */
-               aux &= aux_mask;
-               aux |= aux_val;
                writel(aux, l2x0_base + L2X0_AUX_CTRL);
 
                l2x0_inv_all();