Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Mathieu Chouquet-Stringer <mchouque_@_online_._fr>
Subject: Re: User mode IO acces - PCI A/D card - Alpha station XP900
Date: 11 Oct 2005 10:57:08 -0400	[thread overview]
Message-ID: <m364s4ksor.fsf@mcs.bigip.mine.nu> (raw)
In-Reply-To: 1129039826.382311.313210@g44g2000cwa.googlegroups.com

"lpgl" <patrice.lespagnol@obs-nancay.fr> writes:
> Here is the output of lspci -vv
> 
> 0000:00:11.0 Class ff00: Advantech Co. Ltd: Unknown device 1713 (rev
> 02)
>         Subsystem: PLX Technology, Inc.: Unknown device 9050
>         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
> ParErr- Stepping- SERR- FastB2B-
>         Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
> >TAbort- <TAbort- <MAbort- >SERR- <PERR-
>         Interrupt: pin A routed to IRQ 47
>         Region 0: Memory at 000000000a0f3000 (32-bit, non-prefetchable)
>         Region 2: I/O ports at 8800 [size=32]
> 
> What I've done is :
> 
> fd_mem = open("/dev/mem", O_RDWR);
> baseIO = (char *) mmap(0, 32, PROT_WRITE | PROT_READ, MAP_SHARED,
> fd_mem, 0x8000);
> baseIO += 0x800;
> 
> then I simply access or change what is at baseIO + the register number
> I want on the advantech card

Unless I'm wrong, these are I/O ports and they are accessed using
outb/inb/outw/inw/...

Right now, it looks like you're just poking bytes at random memory places
(ie you can't do that this way).

-- 
Mathieu Chouquet-Stringer             
    "Le disparu, si l'on v�n�re sa m�moire, est plus pr�sent et
                 plus puissant que le vivant".
           -- Antoine de Saint-Exup�ry, Citadelle --


  reply	other threads:[~2005-10-11 14:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 12:07 User mode IO acces - PCI A/D card - Alpha station XP900 patrice.lespagnol
2005-10-11 12:53 ` Mathieu Chouquet-Stringer
2005-10-11 12:55   ` Mathieu Chouquet-Stringer
2005-10-11 14:10   ` lpgl
2005-10-11 14:57     ` Mathieu Chouquet-Stringer [this message]
2005-10-11 16:04       ` lpgl
2005-10-11 16:22         ` Mathieu Chouquet-Stringer
2005-10-11 18:03           ` lpgl
2005-10-11 18:16             ` Mathieu Chouquet-Stringer
2005-10-11 19:43               ` Måns Rullgård
2005-10-12  8:11                 ` lpgl
2005-10-12 12:29                   ` Mathieu Chouquet-Stringer
2005-10-13  7:24                     ` lpgl
2005-10-12  7:56               ` lpgl
2005-10-11 18:13         ` Måns Rullgård
2005-10-12  8:34           ` lpgl
2005-10-12 20:49             ` Måns Rullgård
2005-10-13  7:53               ` lpgl
2005-10-13  8:23                 ` Måns Rullgård
2005-10-13 10:40                   ` lpgl
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox