MIPS: ralink: add RT5350 sdram register defines
authorJohn Crispin <blogic@openwrt.org>
Mon, 25 Mar 2013 10:19:58 +0000 (11:19 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 7 May 2013 23:19:08 +0000 (01:19 +0200)
Add a few missing defines that are needed to make memory detection work on the
RT5350.

Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/5169/

arch/mips/include/asm/mach-ralink/rt305x.h

index e36c3c52942396e1c0ece9bcc77fc28c646979bc..80cda8af7ac936f8a6f539d8b8eb95eede51941c 100644 (file)
@@ -97,6 +97,14 @@ static inline int soc_is_rt5350(void)
 #define RT5350_SYSCFG0_CPUCLK_320      0x2
 #define RT5350_SYSCFG0_CPUCLK_300      0x3
 
+#define RT5350_SYSCFG0_DRAM_SIZE_SHIFT  12
+#define RT5350_SYSCFG0_DRAM_SIZE_MASK   7
+#define RT5350_SYSCFG0_DRAM_SIZE_2M     0
+#define RT5350_SYSCFG0_DRAM_SIZE_8M     1
+#define RT5350_SYSCFG0_DRAM_SIZE_16M    2
+#define RT5350_SYSCFG0_DRAM_SIZE_32M    3
+#define RT5350_SYSCFG0_DRAM_SIZE_64M    4
+
 /* multi function gpio pins */
 #define RT305X_GPIO_I2C_SD             1
 #define RT305X_GPIO_I2C_SCLK           2