diff options
author | John Crispin <blogic@openwrt.org> | 2013-04-15 09:45:09 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-08 01:19:12 +0200 |
commit | 9b75733b7b5e056a893f829262c2a2624a66d186 (patch) | |
tree | 4ea117284ad1ff2e1065d70b6797d1988678702d | |
parent | dd63b00804a5c842fb73b6afc52f928f0c209a07 (diff) |
MIPS: ath79: make use of the new memory detection code
There is now a generic function for detecting memory size. Use this instead of
the one found in the ath79 support.
Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/5149/
-rw-r--r-- | arch/mips/ath79/setup.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index d5b3c9057018..a0233a2c1988 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c @@ -51,20 +51,6 @@ static void ath79_halt(void) cpu_wait(); } -static void __init ath79_detect_mem_size(void) -{ - unsigned long size; - - for (size = ATH79_MEM_SIZE_MIN; size < ATH79_MEM_SIZE_MAX; - size <<= 1) { - if (!memcmp(ath79_detect_mem_size, - ath79_detect_mem_size + size, 1024)) - break; - } - - add_memory_region(0, size, BOOT_MEM_RAM); -} - static void __init ath79_detect_sys_type(void) { char *chip = "????"; @@ -212,7 +198,7 @@ void __init plat_mem_setup(void) AR71XX_DDR_CTRL_SIZE); ath79_detect_sys_type(); - ath79_detect_mem_size(); + detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX); ath79_clocks_init(); _machine_restart = ath79_restart; |