Do you have a question? Post it now! No Registration Necessary
- W. Tolkien
November 20, 2003, 7:35 am

I need to develop a driver for a multifunction PCMCIA card with a standard
serial interface (16550) and a proprietary FIFO interface. I can access the
serial port now, but the FIFO is the problem.
Since I have so far no experience with Kernel driver development, and since
the application is not very demanding and all this happens in a controlled
embedded environment (x86 based), I'm tempted to do this in user land if
possible...
Any help now at the design stage would be much appreciated, so that I don't
run into the wrong direction!
- First of all: is this possible? I need to access a few registers on the
PCMCIA card and that should be it. No IRQs, I think I can get away with
polling.
- Any hints for documentation on how to do it? Does anybody know of any
similar drivers that already exist?
Thanks a lot already...
Wolfgang
serial interface (16550) and a proprietary FIFO interface. I can access the
serial port now, but the FIFO is the problem.
Since I have so far no experience with Kernel driver development, and since
the application is not very demanding and all this happens in a controlled
embedded environment (x86 based), I'm tempted to do this in user land if
possible...
Any help now at the design stage would be much appreciated, so that I don't
run into the wrong direction!
- First of all: is this possible? I need to access a few registers on the
PCMCIA card and that should be it. No IRQs, I think I can get away with
polling.
- Any hints for documentation on how to do it? Does anybody know of any
similar drivers that already exist?
Thanks a lot already...
Wolfgang

Re: User mode driver for PCMCIA card - How?
complicated and by far less appropriate for the task.
You should just copy the source code of the serial driver from the
Kernel source into your own file and modify it to support the FiFo
control. Use Rubini's book "Linux device drivers" (even readable online)
if you need to understand how to compile a driver and learn about some
driver internals. I suppose if you know how the hardware works, it will
be quite obvious what modifications need to be made.
If you just need to set some bits in the card and don't need to do
anything while data is sent and received, a user mode thing might be
doable.
-Michael

Re: User mode driver for PCMCIA card - How?
Thanks for the quick reply!
Hmm, I actually own Rubinis book and scanned through it. I will have another
look, maybe I'm just too paranoid.
Still - since this would be my first kernel project and stability is
paramount in an embedded system, I am still considering the User mode
option.
Does anybody have some pointers where to start here?
Wolfgang
Michael Schnell wrote:

Hmm, I actually own Rubinis book and scanned through it. I will have another
look, maybe I'm just too paranoid.
Still - since this would be my first kernel project and stability is
paramount in an embedded system, I am still considering the User mode
option.
Does anybody have some pointers where to start here?
Wolfgang
Michael Schnell wrote:


Re: User mode driver for PCMCIA card - How?

I don't quite understand you.
A 16550 has a FIFO.
If your board has another kind of FIFO then it is not 16550...
- In this case I would suggest you try to modify the driver in kernel
(and release the source)
Or is the FIFO not related to the serial port?
- Slow data, then it could be OK with user driver.
Take care, what happens if the processor does something else?

as root call ioperm() and iopl() after that you can use inb/outb

/RogerL
--
Roger Larsson
Skellefteċ
Roger Larsson
Skellefteċ
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » linux (2.4.17) ethernet bridge latency
- — Next thread in » Embedded Linux
-
- » Compulab ARM modules
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » OT A modest proposal
- — The site's Newest Thread. Posted in » Electronics Design
-
- » Low Noise Direct Coupled Preamp
- — The site's Last Updated Thread. Posted in » Electronics Design
-