From: Paul Mackerras <paulus@linuxcare.com>
To: linuxppc-dev@lists.linuxppc.org,
"David W. Patmore" <dwp@bluesteelnet.com>
Subject: Re: G4 + Linux + PCI device + x86 driver = 0
Date: Mon, 15 Nov 1999 10:50:24 +1100 [thread overview]
Message-ID: <99111510562201.03543@argo.linuxcare.com.au> (raw)
In-Reply-To: NDBBKOPFGLPEGICBJFDIAEDMCCAA.dwp@bluesteelnet.com
On Sun, 14 Nov 1999, David W. Patmore wrote:
> The original x86 (Redhat 6.0) driver uses virt_to_bus() to get the address
> to write to. In LinuxPPC, that function is not available (not in name
> table). I guess that I'm supposed to use ioremap(), but that doesn't seem
> to do it for me either.
virt_to_bus is an extern inline function in <asm/io.h>, so you should be
able to use it. What undefined symbols do you get when you try? (Note
that you have to compile with at least -O2 otherwise gcc doesn't do inline
functions.)
If you want to access the device register within your driver, ioremap is
what you want, though, rather than virt_to_bus. You would use virt_to_bus
to translate the virtual address of some kernel memory into a bus address
to program into a DMA controller.
> The outcome of running this code is: pci base address (0x80890000),
> remapped (0xC8271000), data (0xFFFFFFFF). The data is a status word which I
> expect to be not
> all "F"s.
Most likely the device doesn't have PCI memory space accesses enabled, as
Ryuichi pointed out.
Paul.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~1999-11-14 23:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-14 0:55 G4 + Linux + PCI device + x86 driver = 0 David W. Patmore
1999-11-14 11:41 ` Takashi Oe
1999-11-14 23:50 ` Paul Mackerras [this message]
1999-11-15 9:33 ` Adrian Cox
1999-12-03 23:00 ` Update: " David W. Patmore
1999-12-04 0:50 ` David Edelsohn
1999-12-04 1:13 ` endian-swapping Hollis R Blanchard
1999-12-04 1:56 ` endian-swapping David Edelsohn
1999-12-04 19:13 ` endian-swapping Gabriel Paubert
1999-12-04 11:57 ` Update: RE: G4 + Linux + PCI device + x86 driver = 0 Michel Lanners
1999-12-05 19:42 ` Geert Uytterhoeven
1999-12-06 6:51 ` Michel Lanners
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=99111510562201.03543@argo.linuxcare.com.au \
--to=paulus@linuxcare.com \
--cc=dwp@bluesteelnet.com \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).