Merge branch 'x86/alternatives' into x86/core
[pandora-kernel.git] / arch / blackfin / kernel / cplb-nompu / cplbinit.c
index 6be0c50..728f708 100644 (file)
 #include <asm/cplb.h>
 #include <asm/cplbinit.h>
 
-#ifdef CONFIG_MAX_MEM_SIZE
-# define CPLB_MEM CONFIG_MAX_MEM_SIZE
-#else
-# define CPLB_MEM CONFIG_MEM_SIZE
-#endif
+#define CPLB_MEM CONFIG_MAX_MEM_SIZE
 
 /*
 * Number of required data CPLB switchtable entries
@@ -168,17 +164,13 @@ static struct cplb_desc cplb_data[] = {
                .name = "Asynchronous Memory Banks",
        },
        {
-#ifdef L2_START
                .start = L2_START,
                .end = L2_START + L2_LENGTH,
                .psize = SIZE_1M,
                .attr = SWITCH_T | I_CPLB | D_CPLB,
                .i_conf = L2_MEMORY,
                .d_conf = L2_MEMORY,
-               .valid = 1,
-#else
-               .valid = 0,
-#endif
+               .valid = (L2_LENGTH > 0),
                .name = "L2 Memory",
        },
        {