From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Mon, 18 Aug 2014 03:35:03 -0500 Subject: Linux PCI driver. In-Reply-To: <53F1B054.2020100@gmail.com> References: <53F1B054.2020100@gmail.com> Message-ID: <20140818083503.GA1550@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Aug 18, 2014 at 09:50:44AM +0200, testlaster wrote: > Hey Guys > > Im writing a PCI driver in Linux ( Lubuntu ). Now its not an entire > driver its really just a little program that will latch onto a space of > ram and dump the entire content of the ram into a file. > I have done this before in a Unix/Linux based OS and it took me quite a > while to figure it out. > > So at startup the configuration for the PCI is already done so I wont > have to do any of that myself. > I really just need to set a pointer to a register. > > My problem is that I cant find the functions to do that for linux. > I cant find similar functions to things like : > PCI_ATTACH() > pci_attach_device(); > mmap_device_memory(); > > I think that is really all I need at the moment. > Anybody have some ideas of where I can start looking? Have you read the book, Linux Device Drivers, 3rd edition, it's free online and has a whole chapter on PCI that should answer these questions for you. If not, please feel free to post your code and we will be glad to review it. thanks, greg k-h