<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 &lt;marco.stornelli@coritel.it&gt;<br>To: Abg Abg &lt;abg.mur22@yahoo.com&gt;<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>&gt; Hi, <br>&gt;&nbsp;  Hope this is the correct list for driver related queries for ppc boards<br>&gt; <br>&gt; I was porting a network driver for a ppc 405EX based embedded system (kilauea config).<br>&gt; The module builds fine and loads and I see the probe routine get called correctly.<br>&gt; However when I try remapping the BAR0 address from the PCI config space, the ioremap fails.<br>&gt; A little debugging showed that the address passed to ioremap was zero.<br>&gt; I pass the address to the ioremap via pci_resource_start(pdev, 0) where pdev is a type struct pci_dev *.<br>&gt; <br>&gt; 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>&gt; <br>&gt; The question that I had was<br>&gt; 1. Is there any kernel config that needs to be done for PCI devices to be able to remap the BAR0 addresses.<br>&gt; 2. Any other kernel parameter that needs to be tweaked?<br>&gt; <br>&gt; Thanks,<br>&gt; Abg<br>&gt; <br>&gt; <br>&gt;&nbsp; &nbsp; &nbsp;  <br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; _______________________________________________<br>&gt; Linuxppc-embedded mailing list<br>&gt; <a ymailto="mailto:Linuxppc-embedded@ozlabs.org" href="mailto:Linuxppc-embedded@ozlabs.org">Linuxppc-embedded@ozlabs.org</a><br>&gt; <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>