ramips: rt305x: use different memory size setup for RT3352
authorGabor Juhos <juhosg@openwrt.org>
Sat, 21 Apr 2012 12:30:45 +0000 (12:30 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 21 Apr 2012 12:30:45 +0000 (12:30 +0000)
SVN-Revision: 31400

target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h
target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c

index 2c62a1689b5d0111b5af26590c20709cdaae2035..0afbb2fbf3f095ff2b2f224fc6e9a996b3e43e57 100644 (file)
@@ -54,6 +54,9 @@ static inline int soc_is_rt3352(void)
 #define RT305X_MEM_SIZE_MIN (2 * 1024 * 1024)
 #define RT305X_MEM_SIZE_MAX (64 * 1024 * 1024)
 
+#define RT3352_MEM_SIZE_MIN (2 * 1024 * 1024)
+#define RT3352_MEM_SIZE_MAX (256 * 1024 * 1024)
+
 #define RT305X_CPU_IRQ_BASE    0
 #define RT305X_INTC_IRQ_BASE   8
 #define RT305X_INTC_IRQ_COUNT  32
index 831db84c73f54ae208f65bed275381ce86c64467..179f9b7bc48c8f7c58036572de74582eb2cf2db5 100644 (file)
@@ -67,8 +67,16 @@ void __init ramips_soc_prom_init(void)
                (id & CHIP_ID_REV_MASK));
 
        ramips_mem_base = RT305X_SDRAM_BASE;
-       ramips_mem_size_min = RT305X_MEM_SIZE_MIN;
-       ramips_mem_size_max = RT305X_MEM_SIZE_MAX;
+
+       if (soc_is_rt305x() || soc_is_rt3350()) {
+               ramips_mem_size_min = RT305X_MEM_SIZE_MIN;
+               ramips_mem_size_max = RT305X_MEM_SIZE_MAX;
+       } else if (soc_is_rt3352()) {
+               ramips_mem_size_min = RT3352_MEM_SIZE_MIN;
+               ramips_mem_size_max = RT3352_MEM_SIZE_MAX;
+       } else {
+               BUG();
+       }
 }
 
 static struct ramips_gpio_chip rt305x_gpio_chips[] = {