aboutsummaryrefslogtreecommitdiff
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2008-07-14 17:04:14 +0800
committerBryan Wu <cooloney@kernel.org>2008-07-14 17:04:14 +0800
commit99d95bbd48f43dafdcd0540eb0da26c5655d7f33 (patch)
treee17a4d331e7ae07212dd9b6917edeac57fbb02fc /arch/blackfin
parent96b86e94bcf7eadbd8c959c0474d2971b3695478 (diff)
Blackfin arch: Remove redundant kernel option
use kernel command line mem and max_mem bootargs to limit availabe memory instead. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/Kconfig7
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c6
-rw-r--r--arch/blackfin/kernel/setup.c14
-rw-r--r--arch/blackfin/mach-common/arch_checks.c6
4 files changed, 7 insertions, 26 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index d0f7ff3dc08..c602727d1a9 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -310,11 +310,6 @@ config BFIN_KERNEL_CLOCK
are also not changed, and the Bootloader does 100% of the hardware
configuration.
-config MEM_SIZE
- int "SDRAM Memory Size in MBytes"
- depends on BFIN_KERNEL_CLOCK
- default 64
-
config PLL_BYPASS
bool "Bypass PLL"
depends on BFIN_KERNEL_CLOCK
@@ -376,7 +371,7 @@ config SCLK_DIV
config MAX_MEM_SIZE
int "Max SDRAM Memory Size in MBytes"
- depends on !BFIN_KERNEL_CLOCK && !MPU
+ depends on !MPU
default 512
help
This is the max memory size that the kernel will create CPLB
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index 6be0c50122e..224e7cc30bc 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -26,11 +26,7 @@
#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
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 8efea004aec..861a1db74df 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -664,11 +664,8 @@ static __init void setup_bootmem_allocator(void)
})
static inline int __init get_mem_size(void)
{
-#ifdef CONFIG_MEM_SIZE
- return CONFIG_MEM_SIZE;
-#else
-# if defined(EBIU_SDBCTL)
-# if defined(BF561_FAMILY)
+#if defined(EBIU_SDBCTL)
+# if defined(BF561_FAMILY)
int ret = 0;
u32 sdbctl = bfin_read_EBIU_SDBCTL();
ret += EBSZ_TO_MEG(sdbctl >> 0);
@@ -676,10 +673,10 @@ static inline int __init get_mem_size(void)
ret += EBSZ_TO_MEG(sdbctl >> 16);
ret += EBSZ_TO_MEG(sdbctl >> 24);
return ret;
-# else
+# else
return EBSZ_TO_MEG(bfin_read_EBIU_SDBCTL());
-# endif
-# elif defined(EBIU_DDRCTL1)
+# endif
+#elif defined(EBIU_DDRCTL1)
u32 ddrctl = bfin_read_EBIU_DDRCTL1();
int ret = 0;
switch (ddrctl & 0xc0000) {
@@ -694,7 +691,6 @@ static inline int __init get_mem_size(void)
case DEVWD_16: break;
}
return ret;
-# endif
#endif
BUG();
}
diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c
index caaab49e9cf..f9160d83b91 100644
--- a/arch/blackfin/mach-common/arch_checks.c
+++ b/arch/blackfin/mach-common/arch_checks.c
@@ -53,9 +53,3 @@
# endif
#endif /* CONFIG_BFIN_KERNEL_CLOCK */
-
-#ifdef CONFIG_MEM_SIZE
-#if (CONFIG_MEM_SIZE % 4)
-#error "SDRAM mem size must be multible of 4MB"
-#endif
-#endif