|
|
|
@ -21,6 +21,7 @@ |
|
|
|
|
#include <asm/mach-ralink/machine.h> |
|
|
|
|
|
|
|
|
|
unsigned char ramips_sys_type[RAMIPS_SYS_TYPE_LEN]; |
|
|
|
|
unsigned long (*ramips_get_mem_size)(void); |
|
|
|
|
|
|
|
|
|
const char *get_system_type(void) |
|
|
|
|
{ |
|
|
|
@ -30,6 +31,10 @@ const char *get_system_type(void) |
|
|
|
|
static void __init detect_mem_size(void) |
|
|
|
|
{ |
|
|
|
|
unsigned long size; |
|
|
|
|
|
|
|
|
|
if (ramips_get_mem_size) { |
|
|
|
|
size = ramips_get_mem_size(); |
|
|
|
|
} else { |
|
|
|
|
void *base; |
|
|
|
|
|
|
|
|
|
base = (void *) KSEG1ADDR(detect_mem_size); |
|
|
|
@ -38,6 +43,7 @@ static void __init detect_mem_size(void) |
|
|
|
|
if (!memcmp(base, base + size, 1024)) |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
add_memory_region(ramips_mem_base, size, BOOT_MEM_RAM); |
|
|
|
|
} |
|
|
|
|