Part Number: AM3359
Hi TI team,
I am using AM3359 TI processor for our application .
I am working on GPMC protocol,where I have .ko file based on Our Custom board version.
Custom Board version Kernel is --- 4.19.94
for Custom Boards we have generated the .ko file with SDK version as 6.03.00.106.
Driver loading is working fine but driver initialization is getting problem.
[ 1770.452879] device = 0xdc143440
[ 1770.459901] device->chancnt = 2
[ 1770.466837] device->dev_id = 1
[ 1770.472484] device->dev = 0xdc107010
[ 1770.477325] device->filter = 0x00000000
[ 1770.482380] device->cap_mask = 0x301
[ 1770.487403] device->device_config = 0xc04cdcd4
[ 1770.494051] device->device_prep_dma_memcpy=0xc04cdd78
[ 1770.500031] device->device_prep_slave_sg = 0x00000000
[ 1770.506374] device->device_prep_slave_cyclic = 0x00000000
GPMC driver started
pageSize :4096
fd : -1
open: No such file or directory
GPMC: GPMCUtility.cpp:76: int GPMCUtility::GpmcInit(): Assertion `0' failed.
Aborted (core dumped)
I am sending source code for GPMC driver Initialization-
int GPMCUtility::LoadGpmcDriver()
{
/** load the ko file
**/
string command = "insmod /home/dma_gpmc_transfer.ko"; //for new GCM module 0004
system(command.c_str());
return 0;
}
int GPMCUtility::GpmcInit(void)
{
/** local variables
**/
/*static int fd;
static long page_size;
char *address1;*/
cout<<"GPMC driver started"<<endl;
pageSize = sysconf(_SC_PAGE_SIZE);
printf(" pageSize :%d\n",pageSize);
fd = open("/proc/gpmc_mmap", O_RDWR | O_SYNC);
printf("fd : %d\n",fd);
if (fd < 0)
{
perror("open");
assert(0);
return -1;
}
/* mmap twice for double fun. */
pAddress = (char*)mmap(NULL,pageSize, PROT_READ | PROT_WRITE, MAP_SHARED,fd, 0);
if (pAddress == MAP_FAILED)
{
perror("mmap");
assert(0);
return -1;
}
cout<<"GPMC driver initialised"<<endl;
return 0;
}
Requesting to check and guide on this.
Thanks and Regards,
Jyoti G.