diff options
author | Christian Hemp <c.hemp@phytec.de> | 2013-09-03 14:03:16 +0200 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2013-11-07 12:19:37 -0500 |
commit | 6beed48f7bedeb31954dbbcc80cdd9e755d023ab (patch) | |
tree | c99107d7558f8d903cd54d7b39c7545d5e219de6 | |
parent | 5748721b79a5c56b40a489422e954c1b09936ddc (diff) |
phyFLEX-i.MX6: Add memory selection for GPU
To allocate memory for the GPU we need the RAM size.
We can choose the ramsize over the Kernelkonfig.
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
-rw-r--r-- | arch/arm/mach-mx6/Kconfig | 25 | ||||
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_phyflex.c | 16 |
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; } |