msm: Remove the pmem audio devices.

Ifdef the pmem audio device under USE_ION config so
that audio doesn't exercise any pmem related devices.

Change-Id: I786573ce5d3b6378733a796a231ec6557d5c37ff
Signed-off-by: Bharath Ramachandramurthy <bramacha@codeaurora.org>
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
This commit is contained in:
Bharath Ramachandramurthy
2012-03-13 19:16:24 -07:00
committed by Linux Build Service Account
parent b5380b64e4
commit 4a3fa9136d
2 changed files with 22 additions and 14 deletions

View File

@@ -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

View File

@@ -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,