obj-$(CONFIG_PPC64)    += copypage_64.o copyuser_64.o \
                           memcpy_64.o usercopy_64.o mem_64.o string.o
-obj-$(CONFIG_QUICC_ENGINE) += rheap.o
 obj-$(CONFIG_XMON)     += sstep.o
 obj-$(CONFIG_KPROBES)  += sstep.o
 obj-$(CONFIG_NOT_COHERENT_CACHE)       += dma-noncoherent.o
 obj-$(CONFIG_SMP)      += locks.o
 endif
 
-# Temporary hack until we have migrated to asm-powerpc
-obj-$(CONFIG_8xx)      += rheap.o
-obj-$(CONFIG_CPM2)     += rheap.o
+obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
 
 
 config QUICC_ENGINE
        bool
+       select PPC_LIB_RHEAP
        help
          The QUICC Engine (QE) is a new generation of communications
          coprocessors on Freescale embedded CPUs (akin to CPM in older chips).
        bool
        default n
        select CPM
+       select PPC_LIB_RHEAP
        help
          The CPM2 (Communications Processor Module) is a coprocessor on
          embedded CPUs made by Freescale.  Selecting this option means that
 
 
 config 8xx
        bool "8xx"
+       select PPC_LIB_RHEAP
 
 config E200
        bool "e200"
 config CPM2
        bool
        depends on 8260 || MPC8560 || MPC8555
+       select PPC_LIB_RHEAP
        default y
        help
          The CPM2 (Communications Processor Module) is a coprocessor on
 config PIN_TLB
        bool "Pinned Kernel TLBs (860 ONLY)"
        depends on ADVANCED_OPTIONS && 8xx
+
+config PPC_LIB_RHEAP
+       bool
+
 endmenu
 
 source "net/Kconfig"