htcleo: fixed wrong memory configuration

Credits to manusfreedom
Still problems with gralloc but no stripes
This commit is contained in:
Markinus 2010-08-29 13:40:28 +02:00
parent 6a5342e98e
commit fd7e2ee0b2
2 changed files with 41 additions and 12 deletions

View File

@ -348,16 +348,12 @@ static struct platform_device msm_kgsl_device =
static struct android_pmem_platform_data android_pmem_pdata = {
.name = "pmem",
.start = MSM_PMEM_MDP_BASE,
.size = MSM_PMEM_MDP_SIZE,
.no_allocator = 0,
.cached = 1,
};
static struct android_pmem_platform_data android_pmem_adsp_pdata = {
.name = "pmem_adsp",
.start = MSM_PMEM_ADSP_BASE,
.size = MSM_PMEM_ADSP_SIZE,
.no_allocator = 0,
.cached = 1,
};
@ -597,9 +593,48 @@ int __init ram_console_early_init(void);
#endif
#endif
static unsigned pmem_sf_size = MSM_PMEM_SF_SIZE;
static void __init pmem_sf_size_setup(char **p)
{
pmem_sf_size = memparse(*p, p);
}
__early_param("pmem_sf_size=", pmem_sf_size_setup);
static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
static void __init pmem_adsp_size_setup(char **p)
{
pmem_adsp_size = memparse(*p, p);
}
__early_param("pmem_adsp_size=", pmem_adsp_size_setup);
static void __init htcleo_allocate_memory_regions(void)
{
void *addr;
unsigned long size;
size = pmem_sf_size;
if (size) {
addr = alloc_bootmem(size);
android_pmem_pdata.start = __pa(addr);
android_pmem_pdata.size = size;
pr_info("allocating %lu bytes at %p (%lx physical) for sf "
"pmem arena\n", size, addr, __pa(addr));
}
size = pmem_adsp_size;
if (size) {
addr = alloc_bootmem(size);
android_pmem_adsp_pdata.start = __pa(addr);
android_pmem_adsp_pdata.size = size;
pr_info("allocating %lu bytes at %p (%lx physical) for adsp "
"pmem arena\n", size, addr, __pa(addr));
}
}
static void __init htcleo_map_io(void)
{
msm_map_common_io();
htcleo_allocate_memory_regions();
msm_clock_init();
#if defined(CONFIG_VERY_EARLY_CONSOLE)

View File

@ -20,13 +20,7 @@
#define MSM_EBI1_BANK0_BASE 0x11800000
//#define MSM_EBI1_BANK0_SIZE 0x1E800000 /* 488MB */
#define MSM_EBI1_BANK0_SIZE 0x1A7C0000 /* 424MB - 0x00040000 RAM CONSOLE*/
#define MSM_PMEM_MDP_BASE (MSM_EBI1_BANK0_BASE+MSM_EBI1_BANK0_SIZE)
#define MSM_PMEM_MDP_SIZE 0x02000000
#define MSM_PMEM_ADSP_BASE (MSM_PMEM_MDP_BASE+MSM_PMEM_MDP_SIZE)
#define MSM_PMEM_ADSP_SIZE 0x02000000
#define MSM_EBI1_BANK0_SIZE 0x1E7C0000 /* 488MB - 0x00040000 RAM CONSOLE*/
/* Don't change that */
#define MSM_SMI_BASE 0x00000000
@ -56,7 +50,7 @@
#define MSM_PMEM_SF_SIZE 0x02000000
//#define MSM_PMEM_ADSP_SIZE 0x02196000
#define MSM_PMEM_ADSP_SIZE 0x02196000
/* MSM_RAM_CONSOLE uses the last 0x00040000 of EBI memory, defined in msm_iomap.h
#define MSM_RAM_CONSOLE_SIZE 0x00040000