Re: PCI device driver question
- From: "elliotng.ee@xxxxxxxxx" <elliotng.ee@xxxxxxxxx>
- Date: 22 Dec 2006 06:22:41 -0800
I cannot find any good documentations on sys_open, sys_read, etc. What
are the parameters required to utilize those questions?
Let me rephrase what I wrote before. I have implemented a pci device
driver. I have the __init, __exit, probe, and remove functions just
like standard pci device drivers. Originally, in my probe function, I
tested the pci device driver by reading/writing to different base
address. On the FPGA, I had a simple test program involving LED's to
verify that I have read/write to the specific memory address.
Now, instead of writing/reading from the pci device driver, I want to
be able to do the reading/writing from the userspace. From the
userspace, I want to input a file using stdio that contains the data to
be written. I will then write out the data to the pci device driver.
My questions are:
a) In the pci device driver, do I need a write and read functions? Are
the functions similar to the char device driver read/write functions?
b) In the userspace, how do I access the pci device driver? The
previous poster mentioned to use sys_open, sys_read, sys_write, etc.
What are the parameters needed to utilize sys_open, sys_read,
sys_write, etc.? Do I need to know major/minor numbers?
ellis@xxxxxxx wrote:
In article <1166736838.855581.113720@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
elliotng.ee@xxxxxxxxx <elliotng.ee@xxxxxxxxx> wrote:
Now instead of hard-coding what to write in the memory region, I want
to input a file, read the file, and write the appropriate contents to
the memory region. What are the appropriate steps to do that? It seems
as though that I cannot use the library stdio in pci device drivers. Is
there another library that contains file IO?
Look in the kernel source for examples of sys_open, sys_read, etc.
--
http://www.spinics.net/lists/
.
- Follow-Ups:
- Re: PCI device driver question
- From: elliotng.ee@xxxxxxxxx
- Re: PCI device driver question
- References:
- PCI device driver question
- From: elliotng.ee@xxxxxxxxx
- Re: PCI device driver question
- From:
- PCI device driver question
- Prev by Date: Re: If pipe excellent?
- Next by Date: Re: If pipe excellent?
- Previous by thread: Re: PCI device driver question
- Next by thread: Re: PCI device driver question
- Index(es):
Relevant Pages
|