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

  #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
@@@ -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);