linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Cox <apc@agelectronics.co.uk>
To: "David W. Patmore" <dwp@bluesteelnet.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: G4 + Linux + PCI device + x86 driver = 0
Date: Mon, 15 Nov 1999 09:33:58 +0000	[thread overview]
Message-ID: <382FD386.5BCEBF84@agelectronics.co.uk> (raw)
In-Reply-To: NDBBKOPFGLPEGICBJFDIAEDMCCAA.dwp@bluesteelnet.com


"David W. Patmore" wrote:
[snip]
> 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.

You should include <asm/io.h>. But virt_to_bus(), phys_to_virt(), and
their relatives, only apply to RAM.

> Code snip:
>         ul_reg_addr = p_dev->base_address[0];
> 
>         pul_remapped =ioremap( ul_reg_addr, 32 );
> 
>         printk( "pcidrv: base addr %08X \n", ul_reg_addr );
>         printk( "pcidrv: pul_remapped %08X \n", pul_remapped );
>         printk( "pcidrv: remapped data: %08X \n", *pul_remapped );
> 
>         iounmap( pul_remapped );

Note that as a general principal of cross platform Linux programming,
the thing returned by ioremap is not a true pointer, and should only be
used with readl(), writel(), etc.

These are not your problem - the problem is most likely the device not
being enabled by the boot firmware. This may mean that 
(1) The PCI fixup code is broken on the G4s.
(2) The device has unusual startup requirements.

- Adrian Cox, AG Electronics

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~1999-11-15  9:33 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
1999-11-15  9:33 ` Adrian Cox [this message]
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=382FD386.5BCEBF84@agelectronics.co.uk \
    --to=apc@agelectronics.co.uk \
    --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).