kernel ddr v2.01, disable DFTCMP

This commit is contained in:
yangkai
2011-05-05 11:02:52 +08:00
parent 6b8074e3bc
commit 99a5eaafd9
5 changed files with 875 additions and 121 deletions

View File

@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.27
# Wed Apr 20 14:30:55 2011
# Thu May 5 10:46:08 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -204,7 +204,32 @@ CONFIG_MACH_RK29SDK=y
# CONFIG_MACH_RK29_MALATA is not set
# CONFIG_MACH_RK29_PHONESDK is not set
# CONFIG_MACH_RK29_A22 is not set
# CONFIG_DDR_TYPE_DDRII is not set
# CONFIG_DDR_TYPE_LPDDR is not set
# CONFIG_DDR_TYPE_DDR3_800D is not set
# CONFIG_DDR_TYPE_DDR3_800E is not set
# CONFIG_DDR_TYPE_DDR3_1066E is not set
# CONFIG_DDR_TYPE_DDR3_1066F is not set
# CONFIG_DDR_TYPE_DDR3_1066G is not set
# CONFIG_DDR_TYPE_DDR3_1333F is not set
# CONFIG_DDR_TYPE_DDR3_1333G is not set
# CONFIG_DDR_TYPE_DDR3_1333H is not set
# CONFIG_DDR_TYPE_DDR3_1333J is not set
# CONFIG_DDR_TYPE_DDR3_1600G is not set
# CONFIG_DDR_TYPE_DDR3_1600H is not set
# CONFIG_DDR_TYPE_DDR3_1600J is not set
# CONFIG_DDR_TYPE_DDR3_1600K is not set
# CONFIG_DDR_TYPE_DDR3_1866J is not set
# CONFIG_DDR_TYPE_DDR3_1866K is not set
# CONFIG_DDR_TYPE_DDR3_1866L is not set
# CONFIG_DDR_TYPE_DDR3_1866M is not set
# CONFIG_DDR_TYPE_DDR3_2133K is not set
# CONFIG_DDR_TYPE_DDR3_2133L is not set
# CONFIG_DDR_TYPE_DDR3_2133M is not set
# CONFIG_DDR_TYPE_DDR3_2133N is not set
CONFIG_DDR_TYPE_DDR3_DEFAULT=y
CONFIG_RK29_MEM_SIZE_M=512
CONFIG_DDR_SDRAM_FREQ=400
#
# RK29 VPU (Video Processing Unit) support
@@ -1721,8 +1746,7 @@ CONFIG_USB_ANDROID_MASS_STORAGE=y
#
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_USB11_HOST=y
CONFIG_USB11_HOST_EN=y
# CONFIG_USB11_HOST is not set
CONFIG_USB20_HOST=y
CONFIG_USB20_HOST_EN=y
CONFIG_USB20_OTG=y

View File

@@ -49,10 +49,96 @@ config MACH_RK29_A22
endchoice
choice DDR_TYPE
prompt "DDR Memory Type"
default DDR_TYPE_DDR3_DEFAULT
config DDR_TYPE_DDRII
bool "DDRII"
help
Support for DDRII memory
config DDR_TYPE_LPDDR
bool "mobile DDR"
help
Support for mobile DDR, MCP device
config DDR_TYPE_DDR3_800D
bool "DDR3-800 5-5-5"
config DDR_TYPE_DDR3_800E
bool "DDR3-800 6-6-6"
config DDR_TYPE_DDR3_1066E
bool "DDR3-1066 6-6-6"
config DDR_TYPE_DDR3_1066F
bool "DDR3-1066 7-7-7"
config DDR_TYPE_DDR3_1066G
bool "DDR3-1066 8-8-8"
config DDR_TYPE_DDR3_1333F
bool "DDR3-1333 7-7-7"
config DDR_TYPE_DDR3_1333G
bool "DDR3-1333 8-8-8"
config DDR_TYPE_DDR3_1333H
bool "DDR3-1333 9-9-9"
config DDR_TYPE_DDR3_1333J
bool "DDR3-1333 10-10-10"
config DDR_TYPE_DDR3_1600G
bool "DDR3-1600 8-8-8"
config DDR_TYPE_DDR3_1600H
bool "DDR3-1600 9-9-9"
config DDR_TYPE_DDR3_1600J
bool "DDR3-1600 10-10-10"
config DDR_TYPE_DDR3_1600K
bool "DDR3-1600 11-11-11"
config DDR_TYPE_DDR3_1866J
bool "DDR3-1866 10-10-10"
config DDR_TYPE_DDR3_1866K
bool "DDR3-1866 11-11-11"
config DDR_TYPE_DDR3_1866L
bool "DDR3-1866 12-12-12"
config DDR_TYPE_DDR3_1866M
bool "DDR3-1866 13-13-13"
config DDR_TYPE_DDR3_2133K
bool "DDR3-2133 11-11-11"
config DDR_TYPE_DDR3_2133L
bool "DDR3-2133 12-12-12"
config DDR_TYPE_DDR3_2133M
bool "DDR3-2133 13-13-13"
config DDR_TYPE_DDR3_2133N
bool "DDR3-2133 14-14-14"
config DDR_TYPE_DDR3_DEFAULT
bool "DDR3 (Type default)"
endchoice
config RK29_MEM_SIZE_M
int "Memory size (in MiB)"
int "DDR Memory size (in MB)"
default 512
config DDR_SDRAM_FREQ
int "DDR SDRAM frequence (in MHz)"
default 400
config WIFI_CONTROL_FUNC
bool "Enable WiFi control function abstraction"
help

View File

@@ -43,6 +43,7 @@
#include <media/soc_camera.h> /* ddl@rock-chips.com : camera support */
#include <mach/vpu_mem.h>
#include <mach/sram.h>
#include <mach/ddr.h>
#include <linux/regulator/rk29-pwm-regulator.h>
#include <linux/regulator/machine.h>
@@ -1967,6 +1968,7 @@ static void __init machine_rk29_mapio(void)
rk29_sram_init();
rk29_clock_init(periph_pll_288mhz);
rk29_iomux_init();
ddr_init(DDR_TYPE,DDR_FREQ); // DDR3_1333H, 400
}
MACHINE_START(RK29, "RK29board")

File diff suppressed because it is too large Load Diff

128
arch/arm/mach-rk29/include/mach/ddr.h Normal file → Executable file
View File

@@ -19,9 +19,135 @@
#include <linux/types.h>
#include <mach/sram.h>
#ifdef CONFIG_DDR_SDRAM_FREQ
#define DDR_FREQ (CONFIG_DDR_SDRAM_FREQ)
#else
#define DDR_FREQ 400
#endif
#define DDR3_800D (0) // 5-5-5
#define DDR3_800E (1) // 6-6-6
#define DDR3_1066E (2) // 6-6-6
#define DDR3_1066F (3) // 7-7-7
#define DDR3_1066G (4) // 8-8-8
#define DDR3_1333F (5) // 7-7-7
#define DDR3_1333G (6) // 8-8-8
#define DDR3_1333H (7) // 9-9-9
#define DDR3_1333J (8) // 10-10-10
#define DDR3_1600G (9) // 8-8-8
#define DDR3_1600H (10) // 9-9-9
#define DDR3_1600J (11) // 10-10-10
#define DDR3_1600K (12) // 11-11-11
#define DDR3_1866J (13) // 10-10-10
#define DDR3_1866K (14) // 11-11-11
#define DDR3_1866L (15) // 12-12-12
#define DDR3_1866M (16) // 13-13-13
#define DDR3_2133K (17) // 11-11-11
#define DDR3_2133L (18) // 12-12-12
#define DDR3_2133M (19) // 13-13-13
#define DDR3_2133N (20) // 14-14-14
#define DDR3_DEFAULT (21)
#define DDR_DDRII (22)
#define DDR_LPDDR (23)
#ifdef CONFIG_DDR_TYPE_DDR3_800D
#define DDR_TYPE DDR3_800D
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_800E
#define DDR_TYPE DDR3_800E
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1066E
#define DDR_TYPE DDR3_1066E
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1066F
#define DDR_TYPE DDR3_1066F
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1066G
#define DDR_TYPE DDR3_1066G
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1333F
#define DDR_TYPE DDR3_1333F
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1333G
#define DDR_TYPE DDR3_1333G
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1333H
#define DDR_TYPE DDR3_1333H
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1333J
#define DDR_TYPE DDR3_1333J
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1600G
#define DDR_TYPE DDR3_1600G
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1600H
#define DDR_TYPE DDR3_1600H
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1600J
#define DDR_TYPE DDR3_1600J
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1866J
#define DDR_TYPE DDR3_1866J
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1866K
#define DDR_TYPE DDR3_1866K
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1866L
#define DDR_TYPE DDR3_1866L
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_1866M
#define DDR_TYPE DDR3_1866M
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_2133K
#define DDR_TYPE DDR3_2133K
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_2133L
#define DDR_TYPE DDR3_2133L
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_2133M
#define DDR_TYPE DDR3_2133M
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_2133N
#define DDR_TYPE DDR3_2133N
#endif
#ifdef CONFIG_DDR_TYPE_DDR3_DEFAULT
#define DDR_TYPE DDR3_DEFAULT
#endif
#ifdef CONFIG_DDR_TYPE_DDRII
#define DDR_TYPE DDR_DDRII
#endif
#ifdef CONFIG_DDR_TYPE_LPDDR
#define DDR_TYPE DDR_LPDDR
#endif
void __sramfunc ddr_suspend(void);
void __sramfunc ddr_resume(void);
void __sramlocalfunc delayus(uint32_t us);
void __sramfunc ddr_change_freq(uint32_t nMHz);
uint32_t __sramfunc ddr_change_freq(uint32_t nMHz);
int __init ddr_init(uint32_t dram_type, uint32_t freq);
#endif