summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx6/Kconfig25
-rw-r--r--arch/arm/mach-mx6/board-mx6q_phyflex.c16
2 files changed, 36 insertions, 5 deletions
diff --git a/arch/arm/mach-mx6/Kconfig b/arch/arm/mach-mx6/Kconfig
index f6129cd7e3f4..faf56844c68c 100644
--- a/arch/arm/mach-mx6/Kconfig
+++ b/arch/arm/mach-mx6/Kconfig
@@ -415,4 +415,29 @@ config PHYFLEX_SOC_1362_0
help
Old version of phyFLEX modules without integrated PMIC
+choice
+ prompt "phyFLEX-i.MX6 RAM Size"
+ default PHYFLEX_1G
+
+config PHYFLEX_512M
+ bool "512MB RAM"
+ help
+ phyFLEX-i.MX6 with 512MB RAM
+
+config PHYFLEX_1G
+ bool "1GB RAM"
+ help
+ phyFLEX-i.MX6 with 1GB RAM
+
+config PHYFLEX_2G
+ bool "2GB RAM"
+ help
+ phyFLEX-i.MX6 with 2GB RAM
+
+config PHYFLEX_4G
+ bool "4GB RAM"
+ help
+ phyFLEX-i.MX6 with 4GB RAM
+
+endchoice
endif
diff --git a/arch/arm/mach-mx6/board-mx6q_phyflex.c b/arch/arm/mach-mx6/board-mx6q_phyflex.c
index 83a32c739435..f6d7516f8a2f 100644
--- a/arch/arm/mach-mx6/board-mx6q_phyflex.c
+++ b/arch/arm/mach-mx6/board-mx6q_phyflex.c
@@ -1611,15 +1611,21 @@ static void __init mx6_phyflex_reserve(void)
{
#if defined(CONFIG_MXC_GPU_VIV) || defined(CONFIG_MXC_GPU_VIV_MODULE)
phys_addr_t phys;
+ phys_addr_t size;
if (imx6q_gpu_pdata.reserved_mem_size) {
-#ifdef DDR_2GB
- phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,
- SZ_4K, SZ_2G);
+#if defined(CONFIG_PHYFLEX_4G)
+ size = size = SZ_1G;
+#elif defined(CONFIG_PHYFLEX_2G)
+ size = SZ_2G;
+#elif defined(CONFIG_PHYFLEX_512M)
+ size = SZ_512M;
#else
- phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,
- SZ_4K, SZ_1G);
+ size = SZ_1G;
#endif
+
+ phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,
+ SZ_4K, size);
memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);
imx6q_gpu_pdata.reserved_mem_base = phys;
}