mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
ramips: use uncached address in detect_mem_size
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30438 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -31,11 +31,12 @@ const char *get_system_type(void)
|
|||||||
static void __init detect_mem_size(void)
|
static void __init detect_mem_size(void)
|
||||||
{
|
{
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
|
void *base;
|
||||||
|
|
||||||
|
base = (void *) KSEG1ADDR(detect_mem_size);
|
||||||
for (size = RALINK_SOC_MEM_SIZE_MIN; size < RALINK_SOC_MEM_SIZE_MAX;
|
for (size = RALINK_SOC_MEM_SIZE_MIN; size < RALINK_SOC_MEM_SIZE_MAX;
|
||||||
size <<= 1 ) {
|
size <<= 1 ) {
|
||||||
if (!memcmp(detect_mem_size,
|
if (!memcmp(base, base + size, 1024))
|
||||||
detect_mem_size + size, 1024))
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user