Forum Discussion
Altera_Forum
Honored Contributor
16 years agoOk got it, I had to modify atse.c and altera_tse.c
thanks to the following thread alteraforum.com/forum/showthread.php?t=18802 here are the modifications: * in atse.c, replace ----------if (!request_mem_region(res_sgdma_rx_mem->start, res_sgdma_rx_mem->end - res_sgdma_rx_mem->start + 1, ATSE_CARDNAME)) {
printk("******ATSE:%s:%d:request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out;
} by: if (!request_mem_region(res_sgdma_rx_mem->start, res_sgdma_rx_mem->end - res_sgdma_rx_mem->start + 1, ATSE_CARDNAME)) {
reg_resource = __request_region(&iomem_resource, res_sgdma_rx_mem->start, res_sgdma_rx_mem->end - res_sgdma_rx_mem->start + 1, ATSE_CARDNAME,0);
if(reg_resource != NULL && reg_resource->flags & IORESOURCE_BUSY)
{
printk("******ATSE:%s:%d:request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out;
}
} and if (!request_mem_region(res_sgdma_tx_mem->start, res_sgdma_tx_mem->end - res_sgdma_tx_mem->start + 1, ATSE_CARDNAME)) {
printk("******ATSE:%s:%d:request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out;
} by: if (!request_mem_region(res_sgdma_tx_mem->start, res_sgdma_tx_mem->end - res_sgdma_tx_mem->start + 1, ATSE_CARDNAME)) {
reg_resource = __request_region(&iomem_resource, res_sgdma_tx_mem->start, res_sgdma_tx_mem->end - res_sgdma_tx_mem->start + 1, ATSE_CARDNAME,0);
if(reg_resource != NULL && reg_resource->flags & IORESOURCE_BUSY)
{
printk("******ATSE:%s:%d:request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out;
}
} * in altera_tse.c, replace --------------- if (!request_mem_region(sgdma_rx_base, sgdma_rx_size, "altera_tse")) {
printk(KERN_ERR "ERROR: %s:%d: request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out_sgdma_rx;
} by if (!request_mem_region(sgdma_rx_base, sgdma_rx_size, "altera_tse")) {
reg_resource = __request_region(&iomem_resource, sgdma_rx_base, sgdma_rx_size, " altera_tse" ,0);
if(reg_resource != NULL && reg_resource->flags & IORESOURCE_BUSY)
{
printk(KERN_ERR "ERROR: %s:%d: request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out_sgdma_rx;
}
} and if (!request_mem_region(sgdma_tx_base, sgdma_tx_size, "altera_tse")) {
printk(KERN_ERR "ERROR: %s:%d: request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out_sgdma_tx;
} by if (!request_mem_region(sgdma_tx_base, sgdma_tx_size, "altera_tse")) {
reg_resource = __request_region(&iomem_resource, sgdma_tx_base, sgdma_tx_size, " altera_tse" ,0);
if(reg_resource != NULL && reg_resource->flags & IORESOURCE_BUSY)
{
printk(KERN_ERR "ERROR: %s:%d: request_mem_region() failed\n", __FILE__, __LINE__);
ret = -EBUSY;
goto out_sgdma_tx;
}
} * in both files, and at the beginning of the functions where we made the modifications declare reg_resource by adding the following line struct resource *reg_resource; after compiling and downloading the image I was able to start eth0 by typing : # ifconfig eth0 up