linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: "David W. Patmore" <dwp@bluesteelnet.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Update: RE: G4 + Linux + PCI device + x86 driver = 0
Date: Fri, 03 Dec 1999 19:50:05 -0500	[thread overview]
Message-ID: <9912040050.AA54380@marc.watson.ibm.com> (raw)
In-Reply-To: Message from "David W. Patmore" <dwp@bluesteelnet.com> of "Fri, 03 Dec 1999 15:00:13 PST." <NDBBKOPFGLPEGICBJFDIOEDCCDAA.dwp@bluesteelnet.com>


>>>>> "David W Patmore" writes:

avid> 1.  I had to enable memory writes (PCI_COMMAND_MEMORY), which was somehow
David> handled automataically on x86, but not here.
David> {
David> pci_read_config_word( pDev, PCI_COMMAND, &value );
David> value |= PCI_COMMAND_MEMORY;
David> pci_write_config_word( pDev, PCI_COMMAND, value );
David> }
David> For good measure, I also set PCI_COMMAND_MASTER, though I also call
David> pci_set_master(), which covers the issue.

	It is up to the device driver or the card to set all of these bits
if necessary.

David> 2.  I had to byte-swap all pointers that I supply to my device.  For
David> portability, I made a set of macros, "SYS_TO_LE() and LE_TO_SYS(), etc. so
David> that both endian architectures could work out.

	Linux already provides macros like le16_to_cpu(), etc. for this. 

David

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

  reply	other threads:[~1999-12-04  0: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
1999-11-15  9:33 ` Adrian Cox
1999-12-03 23:00   ` Update: " David W. Patmore
1999-12-04  0:50     ` David Edelsohn [this message]
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=9912040050.AA54380@marc.watson.ibm.com \
    --to=dje@watson.ibm.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).