diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-02-11 15:11:45 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-02-11 15:11:45 +0000 |
commit | a2c87895788d2258a8e93b12bcd39f55afaecf26 (patch) | |
tree | 82c97cdd111a483790f709ced09c4dbb39c836cf | |
parent | ba4c9b3a8faa8c553ce784f53962ff6b950b4891 (diff) | |
download | mtk-20170518-a2c87895788d2258a8e93b12bcd39f55afaecf26.zip mtk-20170518-a2c87895788d2258a8e93b12bcd39f55afaecf26.tar.gz mtk-20170518-a2c87895788d2258a8e93b12bcd39f55afaecf26.tar.bz2 |
ramips: use uncached address in detect_mem_size
SVN-Revision: 30438
-rw-r--r-- | target/linux/ramips/files/arch/mips/ralink/common/setup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/ramips/files/arch/mips/ralink/common/setup.c b/target/linux/ramips/files/arch/mips/ralink/common/setup.c index e8126b1..5f7cf14 100644 --- a/target/linux/ramips/files/arch/mips/ralink/common/setup.c +++ b/target/linux/ramips/files/arch/mips/ralink/common/setup.c @@ -31,11 +31,12 @@ const char *get_system_type(void) static void __init detect_mem_size(void) { unsigned long size; + void *base; + base = (void *) KSEG1ADDR(detect_mem_size); for (size = RALINK_SOC_MEM_SIZE_MIN; size < RALINK_SOC_MEM_SIZE_MAX; size <<= 1 ) { - if (!memcmp(detect_mem_size, - detect_mem_size + size, 1024)) + if (!memcmp(base, base + size, 1024)) break; } |