]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00209557 IMX6: GPU: do not reserve memory when GPU is not enabled
authorHuang Shijie <b32955@freescale.com>
Wed, 16 May 2012 10:39:14 +0000 (18:39 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:11:51 +0000 (14:11 +0200)
The current code will reserve 128M for GPU even when it is not enabled.

It is not needed. So do not reserve the memory when the GPU is not enabled.
(this can save 128M for Mfgtool.)

Signed-off-by: Huang Shijie <b32955@freescale.com>
arch/arm/mach-mx6/board-mx6q_arm2.c
arch/arm/mach-mx6/board-mx6q_sabreauto.c
arch/arm/mach-mx6/board-mx6q_sabrelite.c
arch/arm/mach-mx6/board-mx6q_sabresd.c

index 967212abd1b68be94e0e6972ab00a71edd039bb1..43a0b373a879f1abc719edd1d8009eb862d366be 100644 (file)
@@ -2204,6 +2204,7 @@ static struct sys_timer mxc_timer = {
 
 static void __init mx6_arm2_reserve(void)
 {
+#ifdef CONFIG_MXC_GPU_VIV
        phys_addr_t phys;
 
        if (imx6_gpu_pdata.reserved_mem_size) {
@@ -2213,6 +2214,7 @@ static void __init mx6_arm2_reserve(void)
                memblock_remove(phys, imx6_gpu_pdata.reserved_mem_size);
                imx6_gpu_pdata.reserved_mem_base = phys;
        }
+#endif
 }
 
 MACHINE_START(MX6Q_ARM2, "Freescale i.MX 6Quad/Solo/DualLite Armadillo2 Board")
index 99a7c868c490ee627bd6a11834a7d3dba9dd79cc..d7ea2df729c90909bc1669347d72d6c82e290ecd 100644 (file)
@@ -1535,6 +1535,7 @@ static struct sys_timer mxc_timer = {
 
 static void __init mx6q_reserve(void)
 {
+#ifdef CONFIG_MXC_GPU_VIV
        phys_addr_t phys;
 
        if (imx6q_gpu_pdata.reserved_mem_size) {
@@ -1544,6 +1545,7 @@ static void __init mx6q_reserve(void)
                memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);
                imx6q_gpu_pdata.reserved_mem_base = phys;
        }
+#endif
 }
 
 MACHINE_START(MX6Q_SABREAUTO, "Freescale i.MX 6Quad/DualLite/Solo Sabre Auto Board")
index 95145f4c7a5541e194b64a22f9b22491f5f742d5..ce7305ad440bbd908611f9699d0317289ce79326 100644 (file)
@@ -1185,6 +1185,7 @@ static struct sys_timer mx6_sabrelite_timer = {
 
 static void __init mx6q_sabrelite_reserve(void)
 {
+#ifdef CONFIG_MXC_GPU_VIV
        phys_addr_t phys;
 
        if (imx6q_gpu_pdata.reserved_mem_size) {
@@ -1194,6 +1195,7 @@ static void __init mx6q_sabrelite_reserve(void)
                memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);
                imx6q_gpu_pdata.reserved_mem_base = phys;
        }
+#endif
 }
 
 /*
index a52cc4247cbb13af9eda1b7bec2da2aa718067d8..66c9df9bde689b5913992c5e8d0acebf560e79b8 100644 (file)
@@ -1807,6 +1807,7 @@ static struct sys_timer mx6_sabresd_timer = {
 
 static void __init mx6q_sabresd_reserve(void)
 {
+#ifdef CONFIG_MXC_GPU_VIV
        phys_addr_t phys;
 
        if (imx6q_gpu_pdata.reserved_mem_size) {
@@ -1816,6 +1817,7 @@ static void __init mx6q_sabresd_reserve(void)
                memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);
                imx6q_gpu_pdata.reserved_mem_base = phys;
        }
+#endif
 }
 
 /*