Merge branch 'l2x0-pull-rmk' of git://dev.omapzoom.org/pub/scm/santosh/kernel-omap4...
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 28 Oct 2010 13:42:06 +0000 (14:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 28 Oct 2010 13:42:06 +0000 (14:42 +0100)
1  2 
arch/arm/include/asm/hardware/cache-l2x0.h
arch/arm/mach-omap2/omap4-common.c

index 351ca8d02aa718fc676408f4d38748c7082809f1,4633d2a8817ad6e1c5698ee49c5d0b5859f072cf..cc42d5fdee17155e920d77ed753074aee0ade487
  #define L2X0_LINE_DATA                        0xF10
  #define L2X0_LINE_TAG                 0xF30
  #define L2X0_DEBUG_CTRL                       0xF40
 +#define L2X0_PREFETCH_CTRL            0xF60
 +#define L2X0_POWER_CTRL                       0xF80
 +#define   L2X0_DYNAMIC_CLK_GATING_EN  (1 << 1)
 +#define   L2X0_STNDBY_MODE_EN         (1 << 0)
  
+ /* Registers shifts and masks */
+ #define L2X0_CACHE_ID_PART_MASK               (0xf << 6)
+ #define L2X0_CACHE_ID_PART_L210               (1 << 6)
+ #define L2X0_CACHE_ID_PART_L310               (3 << 6)
+ #define L2X0_AUX_CTRL_WAY_SIZE_MASK   (0x3 << 17)
  #ifndef __ASSEMBLY__
  extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
  #endif
index 923f9f5f91ce96fc2588f41503b53795e6cdea21,b557cc2c4b10e2ba4b6c4d6e3397611fb2de5952..2f895553e6a815e5df735b47fbf89b2c191ba8d8
@@@ -61,15 -68,17 +68,21 @@@ static int __init omap_l2_cache_init(vo
        omap_smc1(0x102, 0x1);
  
        /*
 -       * 32KB way size, 16-way associativity,
 -       * parity disabled
 +       * 16-way associativity, parity disabled
 +       * Way size - 32KB (es1.0)
 +       * Way size - 64KB (es2.0 +)
         */
 -      l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
 +      if (omap_rev() == OMAP4430_REV_ES1_0)
 +              l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
 +      else
 +              l2x0_init(l2cache_base, 0x0e070000, 0xc0000fff);
  
+       /*
+        * Override default outer_cache.disable with a OMAP4
+        * specific one
+       */
+       outer_cache.disable = omap4_l2x0_disable;
        return 0;
  }
  early_initcall(omap_l2_cache_init);