All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Porting  a driver from x86 to LinucPPC
@ 1998-12-16 10:06 Bryan Christianson
  1998-12-18 10:46 ` Jens Ch. Restemeier
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan Christianson @ 1998-12-16 10:06 UTC (permalink / raw
  To: linuxppc-dev


I'm trying to port a device driver from x86 to linuxppc. I am running into
problems with big/little endian-ness.

The device is a PCI card. Do I need to explicitly translate the data
between big-endian and little-endian or will the io routines (outl, inl and
inw) take care of this for me? On x86 I didn't even think about this issue,
but now I have a feeling that maybe I should have.

--
Bryan Christianson
email:		<mailto:bryanc@ihug.co.nz>
Home Page:	<http://crash.ihug.co.nz/~bryanc>



[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Porting  a driver from x86 to LinucPPC
  1998-12-16 10:06 Porting a driver from x86 to LinucPPC Bryan Christianson
@ 1998-12-18 10:46 ` Jens Ch. Restemeier
  1998-12-19 10:34   ` Bryan Christianson
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Ch. Restemeier @ 1998-12-18 10:46 UTC (permalink / raw
  To: Bryan Christianson; +Cc: linuxppc-dev


Bryan Christianson wrote:
> 
> I'm trying to port a device driver from x86 to linuxppc. I am running into
> problems with big/little endian-ness.
> 
> The device is a PCI card. Do I need to explicitly translate the data
> between big-endian and little-endian or will the io routines (outl, inl and
> inw) take care of this for me? On x86 I didn't even think about this issue,
> but now I have a feeling that maybe I should have.

I just fixed the NE2000 driver for this.

inl/outl will fix PCI's liddle-endianess to host-endianness. There is
some documentation in include/asm/io.h.

Jens


[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Porting  a driver from x86 to LinucPPC
  1998-12-18 10:46 ` Jens Ch. Restemeier
@ 1998-12-19 10:34   ` Bryan Christianson
  0 siblings, 0 replies; 3+ messages in thread
From: Bryan Christianson @ 1998-12-19 10:34 UTC (permalink / raw
  To: jenschrr; +Cc: linuxppc-dev


>Bryan Christianson wrote:
>>
>> I'm trying to port a device driver from x86 to linuxppc. I am running into
>> problems with big/little endian-ness.
>>
>> The device is a PCI card. Do I need to explicitly translate the data
>> between big-endian and little-endian or will the io routines (outl, inl and
>> inw) take care of this for me? On x86 I didn't even think about this issue,
>> but now I have a feeling that maybe I should have.
>
>I just fixed the NE2000 driver for this.
>
>inl/outl will fix PCI's liddle-endianess to host-endianness. There is
>some documentation in include/asm/io.h.
>

Thanks - I've got the thing working now. The inl/outl stuff worked fine,
but this card also uses inw. I had to flip the bytes on the returned value
and the card burst into life.

Bryan

--
Bryan Christianson
email:		<mailto:bryanc@ihug.co.nz>
Home Page:	<http://crash.ihug.co.nz/~bryanc>



[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-12-19 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-16 10:06 Porting a driver from x86 to LinucPPC Bryan Christianson
1998-12-18 10:46 ` Jens Ch. Restemeier
1998-12-19 10:34   ` Bryan Christianson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.