Re: IO ports issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am Mittwoch, 14. Mai 2003 04:28 schrieben Sie:
> Sorry about the dud post earlier.
>
> Hi,
> I have some issues with accessing IO ports in the driver I am
> writing...

>
> First I do a pci_enable_device(...), then pci_request_regions(...),
> and finally ioremap(...).
IMHO, you try to get iomem, not ioport ;-)
>
> ioremap always returns a null pointer.  It seems that it needs to be
> used for memory mapped IO only...  The documentation with the kernel
> seems to imply that it needs to be always used (for portability).
> IO using [in|out][b|w|l] seems to work, ie doesn't crash but does not
> return correct results either.
> Whereas [read|write][b|w|l] will cause a segfault (due to the null
> pointer).
>
> Can someone please point me to the proper way of doing this (I have
> not found any sample code where this appears to work).
>
> tom.
code examples are available at the kernel source (i.e. the framebuffer 
drivers in /usr/src/linux/drivers/video aty128fb.c tridentfb.c). 

also see Rubini's book for linux device drivers which is available for 
online reading.

HTH,

Franz





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux