aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-02-11 15:11:45 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-02-11 15:11:45 +0000
commita2c87895788d2258a8e93b12bcd39f55afaecf26 (patch)
tree82c97cdd111a483790f709ced09c4dbb39c836cf /target/linux/ramips/files
parentba4c9b3a8faa8c553ce784f53962ff6b950b4891 (diff)
downloadupstream-a2c87895788d2258a8e93b12bcd39f55afaecf26.tar.gz
upstream-a2c87895788d2258a8e93b12bcd39f55afaecf26.tar.bz2
upstream-a2c87895788d2258a8e93b12bcd39f55afaecf26.zip
ramips: use uncached address in detect_mem_size
SVN-Revision: 30438
Diffstat (limited to 'target/linux/ramips/files')
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/common/setup.c5
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;
}