diff --git a/arch/arm/mach-msm/board-8064.c b/arch/arm/mach-msm/board-8064.c index 73f02f5bd72..beed02d4099 100644 --- a/arch/arm/mach-msm/board-8064.c +++ b/arch/arm/mach-msm/board-8064.c @@ -169,7 +169,6 @@ static struct platform_device android_pmem_adsp_device = { .id = 2, .dev = { .platform_data = &android_pmem_adsp_pdata }, }; -#endif static struct android_pmem_platform_data android_pmem_audio_pdata = { .name = "pmem_audio", @@ -183,7 +182,8 @@ static struct platform_device android_pmem_audio_device = { .id = 4, .dev = { .platform_data = &android_pmem_audio_pdata }, }; -#endif +#endif /* CONFIG_MSM_MULTIMEDIA_USE_ION */ +#endif /* CONFIG_ANDROID_PMEM */ static struct memtype_reserve apq8064_reserve_table[] __initdata = { [MEMTYPE_SMI] = { @@ -235,15 +235,19 @@ static void __init size_pmem_devices(void) #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION android_pmem_adsp_pdata.size = pmem_adsp_size; android_pmem_pdata.size = pmem_size; -#endif android_pmem_audio_pdata.size = MSM_PMEM_AUDIO_SIZE; -#endif +#endif /*CONFIG_MSM_MULTIMEDIA_USE_ION*/ +#endif /*CONFIG_ANDROID_PMEM*/ } +#ifdef CONFIG_ANDROID_PMEM +#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION static void __init reserve_memory_for(struct android_pmem_platform_data *p) { apq8064_reserve_table[p->memory_type].size += p->size; } +#endif /*CONFIG_MSM_MULTIMEDIA_USE_ION*/ +#endif /*CONFIG_ANDROID_PMEM*/ static void __init reserve_pmem_memory(void) { @@ -251,10 +255,10 @@ static void __init reserve_pmem_memory(void) #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION reserve_memory_for(&android_pmem_adsp_pdata); reserve_memory_for(&android_pmem_pdata); -#endif reserve_memory_for(&android_pmem_audio_pdata); +#endif /*CONFIG_MSM_MULTIMEDIA_USE_ION*/ apq8064_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size; -#endif +#endif /*CONFIG_ANDROID_PMEM*/ } static int apq8064_paddr_to_memtype(unsigned int paddr) @@ -1799,9 +1803,9 @@ static struct platform_device *common_devices[] __initdata = { #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION &android_pmem_device, &android_pmem_adsp_device, -#endif &android_pmem_audio_device, -#endif +#endif /*CONFIG_MSM_MULTIMEDIA_USE_ION*/ +#endif /*CONFIG_ANDROID_PMEM*/ #ifdef CONFIG_ION_MSM &ion_dev, #endif diff --git a/arch/arm/mach-msm/board-8960.c b/arch/arm/mach-msm/board-8960.c index 3f0d8dfef9a..2b2527c47c7 100644 --- a/arch/arm/mach-msm/board-8960.c +++ b/arch/arm/mach-msm/board-8960.c @@ -228,7 +228,6 @@ static struct platform_device android_pmem_adsp_device = { .id = 2, .dev = { .platform_data = &android_pmem_adsp_pdata }, }; -#endif static struct android_pmem_platform_data android_pmem_audio_pdata = { .name = "pmem_audio", @@ -242,7 +241,8 @@ static struct platform_device android_pmem_audio_device = { .id = 4, .dev = { .platform_data = &android_pmem_audio_pdata }, }; -#endif +#endif /*CONFIG_MSM_MULTIMEDIA_USE_ION*/ +#endif /*CONFIG_ANDROID_PMEM*/ struct fmem_platform_data fmem_pdata = { }; @@ -324,15 +324,19 @@ static void __init size_pmem_devices(void) } android_pmem_pdata.size = pmem_size; -#endif android_pmem_audio_pdata.size = MSM_PMEM_AUDIO_SIZE; -#endif +#endif /*CONFIG_MSM_MULTIMEDIA_USE_ION*/ +#endif /*CONFIG_ANDROID_PMEM*/ } +#ifdef CONFIG_ANDROID_PMEM +#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION static void __init reserve_memory_for(struct android_pmem_platform_data *p) { msm8960_reserve_table[p->memory_type].size += p->size; } +#endif /*CONFIG_MSM_MULTIMEDIA_USE_ION*/ +#endif /*CONFIG_ANDROID_PMEM*/ static void __init reserve_pmem_memory(void) { @@ -340,8 +344,8 @@ static void __init reserve_pmem_memory(void) #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION reserve_memory_for(&android_pmem_adsp_pdata); reserve_memory_for(&android_pmem_pdata); -#endif reserve_memory_for(&android_pmem_audio_pdata); +#endif msm8960_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size; #endif } @@ -2224,8 +2228,8 @@ static struct platform_device *common_devices[] __initdata = { #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION &android_pmem_device, &android_pmem_adsp_device, -#endif &android_pmem_audio_device, +#endif #endif &msm_device_vidc, &msm_device_bam_dmux,