From: 黄涛 Date: Wed, 23 Jan 2013 16:40:48 +0000 (+0800) Subject: rk3188: fix ddr_get_cap X-Git-Tag: firefly_0821_release~7823 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=94d0a113d8c486ae9ffa9d5f9f401872afca55f1;p=firefly-linux-kernel-4.4.55.git rk3188: fix ddr_get_cap --- diff --git a/arch/arm/mach-rk30/common.c b/arch/arm/mach-rk30/common.c index ce0b83ee0de9..6a0bc268cacc 100755 --- a/arch/arm/mach-rk30/common.c +++ b/arch/arm/mach-rk30/common.c @@ -178,9 +178,6 @@ void __init rk30_map_io(void) static __init u32 rk30_get_ddr_size(void) { -#ifdef CONFIG_ARCH_RK3188 - return SZ_2G; -#endif u32 size; u32 v[3], a[3]; u32 pgtbl = PAGE_OFFSET + TEXT_OFFSET - 0x4000; diff --git a/arch/arm/mach-rk30/ddr.c b/arch/arm/mach-rk30/ddr.c index cc5fd5a4d5b2..a5f33ac04a1a 100755 --- a/arch/arm/mach-rk30/ddr.c +++ b/arch/arm/mach-rk30/ddr.c @@ -3321,7 +3321,11 @@ uint32 ddr_get_cap(void) break; } row = ddr_cfg_2_rbc[i].row; +#ifdef CONFIG_ARCH_RK3188 + if (1) +#else if(*(volatile uint32_t *)(ROM_CHIP_ID_ADDR+0x0c) == 0x56313030) +#endif { if(pGRF_Reg_RK3066B->GRF_SOC_CON[2] & (1<<1)) {