diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-04-25 02:04:05 +0800 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-04-25 02:04:05 +0800 |
commit | a086ee2268abcfcbf80a114f4602e5b26aa80bf0 (patch) | |
tree | fe027181ea37e00e85040977788cad82aa3faea5 /arch/blackfin/kernel/cplb-nompu/cplbinit.c | |
parent | a81501af19830ff43688781edad7e9c0cbd668af (diff) |
[Blackfin] arch: detect the memory available in the system on the fly by default
detect the memory available in the system on the fly by default
rather than forcing people to set this manually in the kconfig
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/cplb-nompu/cplbinit.c')
-rw-r--r-- | arch/blackfin/kernel/cplb-nompu/cplbinit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index f271f39d565..917325bfbd8 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c @@ -26,6 +26,12 @@ #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 + /* * Number of required data CPLB switchtable entries * MEMSIZE / 4 (we mostly install 4M page size CPLBs @@ -35,7 +41,7 @@ * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO * 1 for ASYNC Memory */ -#define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1 \ +#define MAX_SWITCH_D_CPLBS (((CPLB_MEM / 4) + 16 + 1 + 1 + 1 \ + ASYNC_MEMORY_CPLB_COVERAGE) * 2) /* @@ -46,7 +52,7 @@ * possibly 1 for L2 Instruction Memory * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO */ -#define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1 + 1) * 2) +#define MAX_SWITCH_I_CPLBS (((CPLB_MEM / 4) + 12 + 1 + 1 + 1) * 2) u_long icplb_table[MAX_CPLBS + 1]; |