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>
static void __init mx6_arm2_reserve(void)
{
+#ifdef CONFIG_MXC_GPU_VIV
phys_addr_t phys;
if (imx6_gpu_pdata.reserved_mem_size) {
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")
static void __init mx6q_reserve(void)
{
+#ifdef CONFIG_MXC_GPU_VIV
phys_addr_t phys;
if (imx6q_gpu_pdata.reserved_mem_size) {
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")
static void __init mx6q_sabrelite_reserve(void)
{
+#ifdef CONFIG_MXC_GPU_VIV
phys_addr_t phys;
if (imx6q_gpu_pdata.reserved_mem_size) {
memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);
imx6q_gpu_pdata.reserved_mem_base = phys;
}
+#endif
}
/*
static void __init mx6q_sabresd_reserve(void)
{
+#ifdef CONFIG_MXC_GPU_VIV
phys_addr_t phys;
if (imx6q_gpu_pdata.reserved_mem_size) {
memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);
imx6q_gpu_pdata.reserved_mem_base = phys;
}
+#endif
}
/*