ramips: sync kernel patches with the mips-next tree
[openwrt/svn-archive/archive.git] / target / linux / ramips / patches-3.8 / 0105-MIPS-ralink-add-RT5350-sdram-register-defines.patch
1 From 31f4b3ca1c9bb4bcbbebbe5db5a33ac82f130d9c Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Mon, 25 Mar 2013 11:19:58 +0100
4 Subject: [PATCH 105/137] MIPS: ralink: add RT5350 sdram register defines
5
6 Add a few missing defines that are needed to make memory detection work on the
7 RT5350.
8
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Acked-by: Gabor Juhos <juhosg@openwrt.org>
11 Patchwork: http://patchwork.linux-mips.org/patch/5169/
12 ---
13 arch/mips/include/asm/mach-ralink/rt305x.h | 8 ++++++++
14 1 file changed, 8 insertions(+)
15
16 --- a/arch/mips/include/asm/mach-ralink/rt305x.h
17 +++ b/arch/mips/include/asm/mach-ralink/rt305x.h
18 @@ -97,6 +97,14 @@ static inline int soc_is_rt5350(void)
19 #define RT5350_SYSCFG0_CPUCLK_320 0x2
20 #define RT5350_SYSCFG0_CPUCLK_300 0x3
21
22 +#define RT5350_SYSCFG0_DRAM_SIZE_SHIFT 12
23 +#define RT5350_SYSCFG0_DRAM_SIZE_MASK 7
24 +#define RT5350_SYSCFG0_DRAM_SIZE_2M 0
25 +#define RT5350_SYSCFG0_DRAM_SIZE_8M 1
26 +#define RT5350_SYSCFG0_DRAM_SIZE_16M 2
27 +#define RT5350_SYSCFG0_DRAM_SIZE_32M 3
28 +#define RT5350_SYSCFG0_DRAM_SIZE_64M 4
29 +
30 /* multi function gpio pins */
31 #define RT305X_GPIO_I2C_SD 1
32 #define RT305X_GPIO_I2C_SCLK 2