- 论坛徽章:
- 0
|
//Here is my comments
phymem = pci_resource_start(pdev, 0); //<--it retrieves the physical address preallocated(normally by u-boot) to this pci device "pdev"
if (!request_mem_region(phymem, pci_resource_len(pdev, 0), "eth")) { //<--is this physical address being used by others ?
printk(KERN_ERR "eth_pci: cannot reserve PCI memory region\n"); //<-- if yes, then report error
goto bad;
}
mem = (unsigned long) ioremap(phymem, pci_resource_len(pdev, 0)); //<--map the physical address to linx kernel virtual address !
if (!mem) {
printk(KERN_ERR "eth_pci: cannot remap PCI memory region\n") ;
goto bad1;
} |
|