Beagle Android PMEM device

Hi ,

I am trying to create PMEM device in the kernel.

I added the device as follows

static struct android_pmem_platform_data android_pmem_hwc_pdata = {
	.name = "pmem_hwc",

	.start = PMEM_HWC_BASE,
	.size = _PMEM_HWC_SIZE,
	.no_allocator = 0,
	.cached = 0,
};

Is that this Base address and size of this memory region should have been reserved while booting the linux with mem = ( TOTALSIZE - x ) ? Inputs on this front will be highly helpful .

Hi,

it seems good. but normall pmem is physical memory allocated, this has been done for msm.

we can compare and check it out.

Hi,

it seems good. but normall pmem is physical memory allocated, this has been done for msm.

we can compare and check it out.

Thanks. And , i was able to see base is taken as (0x10000000 + 64*SZ_1M) in MSM. So, this would have been reserved from Linux Memory,with boot param as mem = 80M , right ?

[ linux/arch/arm/mach-msm/board-trout.h]

#ifndef __ARCH_ARM_MACH_MSM_BOARD_HALIBUT_H
#define __ARCH_ARM_MACH_MSM_BOARD_HALIBUT_H

#define MSM_PMEM_GPU0_BASE      (0x10000000 + 64*SZ_1M)
#define MSM_PMEM_GPU0_SIZE      0x800000

#define MSM_PMEM_MDP_BASE       (MSM_PMEM_GPU0_BASE + MSM_PMEM_GPU0_SIZE)
#define MSM_PMEM_MDP_SIZE       0x800000
#define MSM_PMEM_ADSP_BASE      (MSM_PMEM_MDP_BASE + MSM_PMEM_MDP_SIZE)
#define MSM_PMEM_ADSP_SIZE      0x800000

Hi,

right. we have to allocate physical memory which is not being used by any other device, mmap or iomap range and give bootargs considerably.

Hi,

u able to get pmem working with android.

Thanks and Regards,
HarishKumar.V

Hi,

u able to get pmem working with android.

Yet to complete …

Shankar Ganesh wrote:

    Hi,

    u able to get pmem working with android.

Yet to complete ..

I have the following configuration for pmem device :

/* PMEM device */
static struct android_pmem_platform_data omap_pmem_data = {
         .name = "pmem",
         .start = (120 * SZ_1M),
         .size = (8 * SZ_1M),
         .no_allocator = 0,
         .cached = 0,
};

And while booting the android image, i gave bootargs as mem=120M [.i.e
Reserving last 8 MB and used as pmem device], but after booting,
i am continuously getting the following error :

Unhandled fault: external abort on non-linefetch (0x1818) at 0x44a67000

Any clues will be helpful .

Thanks,
Shankar