Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git] / arch / ppc / mm / ppc_mmu.c
index 9a381ed..973f1e6 100644 (file)
@@ -2,7 +2,7 @@
  * This file contains the routines for handling the MMU on those
  * PowerPC implementations where the MMU substantially follows the
  * architecture specification.  This includes the 6xx, 7xx, 7xxx,
- * 8260, and POWER3 implementations but excludes the 8xx and 4xx.
+ * 8260, and 83xx implementations but excludes the 8xx and 4xx.
  *  -- paulus
  *
  *  Derived from arch/ppc/mm/init.c:
@@ -23,7 +23,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/init.h>
@@ -42,11 +41,7 @@ unsigned long _SDR1;
 
 union ubat {                   /* BAT register values to be loaded */
        BAT     bat;
-#ifdef CONFIG_PPC64BRIDGE
-       u64     word[2];
-#else
        u32     word[2];
-#endif
 } BATS[4][2];                  /* 4 pairs of IBAT, DBAT */
 
 struct batrange {              /* stores address ranges mapped by BATs */
@@ -83,9 +78,6 @@ unsigned long p_mapped_by_bats(unsigned long pa)
 
 unsigned long __init mmu_mapin_ram(void)
 {
-#ifdef CONFIG_POWER4
-       return 0;
-#else
        unsigned long tot, bl, done;
        unsigned long max_size = (256<<20);
        unsigned long align;
@@ -122,7 +114,6 @@ unsigned long __init mmu_mapin_ram(void)
        }
 
        return done;
-#endif
 }
 
 /*
@@ -205,27 +196,10 @@ void __init MMU_init_hw(void)
 
        if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105);
 
-#ifdef CONFIG_PPC64BRIDGE
-#define LG_HPTEG_SIZE  7               /* 128 bytes per HPTEG */
-#define SDR1_LOW_BITS  (lg_n_hpteg - 11)
-#define MIN_N_HPTEG    2048            /* min 256kB hash table */
-#else
 #define LG_HPTEG_SIZE  6               /* 64 bytes per HPTEG */
 #define SDR1_LOW_BITS  ((n_hpteg - 1) >> 10)
 #define MIN_N_HPTEG    1024            /* min 64kB hash table */
-#endif
-
-#ifdef CONFIG_POWER4
-       /* The hash table has already been allocated and initialized
-          in prom.c */
-       n_hpteg = Hash_size >> LG_HPTEG_SIZE;
-       lg_n_hpteg = __ilog2(n_hpteg);
-
-       /* Remove the hash table from the available memory */
-       if (Hash)
-               reserve_phys_mem(__pa(Hash), Hash_size);
 
-#else /* CONFIG_POWER4 */
        /*
         * Allow 1 HPTE (1/8 HPTEG) for each page of memory.
         * This is less than the recommended amount, but then
@@ -248,7 +222,6 @@ void __init MMU_init_hw(void)
        Hash = mem_pieces_find(Hash_size, Hash_size);
        cacheable_memzero(Hash, Hash_size);
        _SDR1 = __pa(Hash) | SDR1_LOW_BITS;
-#endif /* CONFIG_POWER4 */
 
        Hash_end = (PTE *) ((unsigned long)Hash + Hash_size);