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 /arch/arm/mach-mx6/board-mx6q_phyflex.c | |
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>
Diffstat (limited to 'arch/arm/mach-mx6/board-mx6q_phyflex.c')
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_phyflex.c | 16 |
1 files changed, 11 insertions, 5 deletions
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; } |