<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">The device is enabled via pci_enable_device. pci_request_region also succeeds.<br>pci_resource_start(pdev, 0) is what is returning zero.<br><br>The same driver works on boards with different ppc processor (440SPe).<br><br>Thanks<br>Abg<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: Marco Stornelli <marco.stornelli@coritel.it><br>To: Abg Abg <abg.mur22@yahoo.com><br>Cc: linuxppc-embedded@ozlabs.org<br>Sent: Friday, September 19, 2008 12:35:33 PM<br>Subject: Re: Network driver on ppc 405EX<br><br>
Have you already enabled the device? You can enable it with<br>pci_enable_device. Then you can call the pci_request_region and then the<br>ioremap. In addition, you can check the pci configuration with the<br>command lspci. You can found an example on Linux Device Drivers.<br><br>Regards.<br><br>Abg Abg ha scritto:<br>> Hi, <br>> Hope this is the correct list for driver related queries for ppc boards<br>> <br>> I was porting a network driver for a ppc 405EX based embedded system (kilauea config).<br>> The module builds fine and loads and I see the probe routine get called correctly.<br>> However when I try remapping the BAR0 address from the PCI config space, the ioremap fails.<br>> A little debugging showed that the address passed to ioremap was zero.<br>> I pass the address to the ioremap via pci_resource_start(pdev, 0) where pdev is a type struct pci_dev *.<br>> <br>> I dumped the contents of the pdev and saw that
the vendor-id, device id etc were correct, however the BAR0 address seemed to be all zeroes.<br>> <br>> The question that I had was<br>> 1. Is there any kernel config that needs to be done for PCI devices to be able to remap the BAR0 addresses.<br>> 2. Any other kernel parameter that needs to be tweaked?<br>> <br>> Thanks,<br>> Abg<br>> <br>> <br>> <br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> _______________________________________________<br>> Linuxppc-embedded mailing list<br>> <a ymailto="mailto:Linuxppc-embedded@ozlabs.org" href="mailto:Linuxppc-embedded@ozlabs.org">Linuxppc-embedded@ozlabs.org</a><br>> <a href="https://ozlabs.org/mailman/listinfo/linuxppc-embedded" target="_blank">https://ozlabs.org/mailman/listinfo/linuxppc-embedded</a><br><br>-- <br>Marco Stornelli<br>Embedded Software Engineer<br>CoRiTeL - Consorzio
di Ricerca sulle Telecomunicazioni<br><a href="http://www.coritel.it" target="_blank">http://www.coritel.it</a><br><br><a ymailto="mailto:marco.stornelli@coritel.it" href="mailto:marco.stornelli@coritel.it">marco.stornelli@coritel.it</a><br>+39 06 72582838<br></div></div></div><br>
</body></html>