From 55390a6b985cc3fece52cac3e37b6f9e72fa8648 Mon Sep 17 00:00:00 2001 From: yangkai Date: Mon, 11 Apr 2011 11:39:47 +0800 Subject: [PATCH] add mobile ddr to Kconfig --- arch/arm/mach-rk29/Kconfig | 9 ++- arch/arm/mach-rk29/ddr.c | 94 +++++++++++++++++++++++++++ arch/arm/mach-rk29/include/mach/ddr.h | 2 + 3 files changed, 103 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rk29/Kconfig b/arch/arm/mach-rk29/Kconfig index 47da703b2e73..9b3d1f0f38ee 100755 --- a/arch/arm/mach-rk29/Kconfig +++ b/arch/arm/mach-rk29/Kconfig @@ -63,7 +63,12 @@ choice DDR_TYPE config DDR_TYPE_DDRII bool "DDRII" help - Spport for DDRII memory + 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" @@ -129,7 +134,7 @@ config DDR_TYPE_DDR3_2133N bool "DDR3-2133 14-14-14" config DDR_TYPE_DDR3_DEFAULT - bool "DDR3 Type unknow" + bool "DDR3 (Type unknow)" endchoice diff --git a/arch/arm/mach-rk29/ddr.c b/arch/arm/mach-rk29/ddr.c index d4772f86f12f..f0fb89cd7cce 100755 --- a/arch/arm/mach-rk29/ddr.c +++ b/arch/arm/mach-rk29/ddr.c @@ -41,6 +41,100 @@ #ifdef CONFIG_DDR_TYPE #define DDR3_TYPE CONFIG_DDR_TYPE + +#ifdef CONFIG_DDR_TYPE_DDR3_800D +#define DDR3_TYPE DDR3_800D +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_800E +#define DDR3_TYPE DDR3_800E +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1066E +#define DDR3_TYPE DDR3_1066E +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1066F +#define DDR3_TYPE DDR3_1066F +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1066G +#define DDR3_TYPE DDR3_1066G +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1333F +#define DDR3_TYPE DDR3_1333F +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1333G +#define DDR3_TYPE DDR3_1333G +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1333H +#define DDR3_TYPE DDR3_1333H +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1333J +#define DDR3_TYPE DDR3_1333J +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1600G +#define DDR3_TYPE DDR3_1600G +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1600H +#define DDR3_TYPE DDR3_1600H +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1600J +#define DDR3_TYPE DDR3_1600J +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1866J +#define DDR3_TYPE DDR3_1866J +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1866K +#define DDR3_TYPE DDR3_1866K +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1866L +#define DDR3_TYPE DDR3_1866L +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_1866M +#define DDR3_TYPE DDR3_1866M +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_2133K +#define DDR3_TYPE DDR3_2133K +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_2133L +#define DDR3_TYPE DDR3_2133L +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_2133M +#define DDR3_TYPE DDR3_2133M +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_2133N +#define DDR3_TYPE DDR3_2133N +#endif + +#ifdef CONFIG_DDR_TYPE_DDR3_DEFAULT +#define DDR3_TYPE DDR3_DEFAULT +#endif + +#if 0 +#ifdef CONFIG_DDR_TYPE_DDRII +#define DDR3_TYPE DDR_DDRII +#endif + +#ifdef CONFIG_DDR_TYPE_LPDDR +#define DDR3_TYPE DDR_LPDDR +#endif +#endif #else #define DDR3_TYPE DDR3_DEFAULT #endif diff --git a/arch/arm/mach-rk29/include/mach/ddr.h b/arch/arm/mach-rk29/include/mach/ddr.h index 3e9cfe1a27b0..c0e49f038a47 100755 --- a/arch/arm/mach-rk29/include/mach/ddr.h +++ b/arch/arm/mach-rk29/include/mach/ddr.h @@ -304,6 +304,8 @@ #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) /* DDR Controller register struct */ typedef volatile struct DDR_REG_Tag -- 2.34.1