linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Antw:Help Sought: 8390-Ethernet Troubles on PowerPC 4xx Port
@ 2000-01-13 21:12 Niklaus Giger
  0 siblings, 0 replies; only message in thread
From: Niklaus Giger @ 2000-01-13 21:12 UTC (permalink / raw)
  To: grant, linuxppc-embedded


>>> Grant Erickson <grant@lcse.umn.edu> 13.01.00 02:10:28 >>>
>
>The latest road bump I've encountered on the path to a Linux port for the
>PowerPC 403GCX running on IBM's "Oak" evaluation board is getting the
>National Semiconductor DP83902AV chip to behave.
>...
Dear Grant,

I had a look at your code. As I cannot (yet) compile and build the kernel, I give you only some
very general advice.

As far as I know there are problems accessing the Ethernet chip directly.
On the PPC403GA there was a maximal wait of 128 clocks for a memory access being delayed,
which the DP83902AV could easily surpass if there was some remote DMA happening on the 
other side.

Therefore there is a register in the MAC which you can test, whether the access to the
8390 was okay or not. (0x01 means okay, adress is probably  0xf4000030.
There is a similar register to test whether reading the DMA port is okay (Adress 0xf4000020).

There are two solutions to this problem the PPC403GCX allows you to wait indefintely on
a memory access (governed by a bit in the IOCR-register I think), (if your HW permits it).
Unfortunatly this is a general setting therefore you really may hang forever (or till power off,
whatever comes first).

The other "solution" is a SW patch, whose structure I sketch like this.

For each memory access (aka inb_p, out_p) do the following.

First disable the Ethernet interrupt, 

Check whether the PageRegister is okay (do not forget after each access to
check for the success bit).

If the page register does not match, write the register (do not forget after each access to
check for the success bit).

Now you may read or write to the register (do not forget after each access to
check for the success bit).

Reenable (if necessary) the ethernet interrupt.

This gives you quite some overhead but it is the only SW-patch which will you garantee
correct operation over longer periods...

I hope this helps.

Regards



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             !
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             !
                                                                       
 
                                                                                                 

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-01-13 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-13 21:12 Antw:Help Sought: 8390-Ethernet Troubles on PowerPC 4xx Port Niklaus Giger

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).