From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 111c93,98f9256d903bde7 X-Google-Attributes: gid111c93,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news.glorb.com!hwmnpeer01.lga!hwmedia!hw-filter.lga!fe10.lga.POSTED!53ab2750!not-for-mail Sender: mchouque@mcs.bigip.mine.nu Newsgroups: comp.os.linux.alpha Subject: Re: User mode IO acces - PCI A/D card - Alpha station XP900 References: <1129032472.525938.270220@f14g2000cwb.googlegroups.com> <1129039826.382311.313210@g44g2000cwa.googlegroups.com> X-Face: %JOeya=Dg!}[/#Go&*&cQ+)){p1c8}u\Fg2Q3&)kothIq|JnWoVzJtCFo~4X Organization: Uh? Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 11 Oct 2005 10:57:08 -0400 NNTP-Posting-Host: 67.83.202.227 X-Complaints-To: abuse@cv.net X-Trace: fe10.lga 1129042629 67.83.202.227 (Tue, 11 Oct 2005 07:57:09 MST) NNTP-Posting-Date: Tue, 11 Oct 2005 07:57:09 MST Xref: g2news1.google.com comp.os.linux.alpha:484 "lpgl" 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- SERR- 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 --