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 | cba394b3896b95e1517564759f6f429ac04b19d1 (patch) | |
tree | 577aa775c0b4606af5beb7bc8bc6de6efc45c099 /target | |
parent | 7c64e707bbc3397da0212a803aacdaf7433f7649 (diff) | |
download | upstream-cba394b3896b95e1517564759f6f429ac04b19d1.tar.gz upstream-cba394b3896b95e1517564759f6f429ac04b19d1.tar.bz2 upstream-cba394b3896b95e1517564759f6f429ac04b19d1.zip |
ramips: use uncached address in detect_mem_size
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30438 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-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 e8126b11c8..5f7cf14a76 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; } |