9front - general discussion about 9front
 help / color / mirror / Atom feed
* etheryuk.c for Marvell 88E8036
@ 2016-06-16  8:13 kokamoto
  0 siblings, 0 replies; only message in thread
From: kokamoto @ 2016-06-16  8:13 UTC (permalink / raw)
  To: 9front

I posted a mail to 9fans, but I don't have received that mail,
so retries it to this mailing-list.

I asked the above line for about two weeks ago to 9fans.
Now I got a solution by myself.

The problem was 88E8036(Yukfe) chip has a small amount
of RAM buffer, which eric didn't pay attention.

I tried to may diff file, however, I wrote too many comment lines
on the file, which leads to a fuge sized diff file.
Therefore, I'll write only the differences between the last cdrom
of 9front and myself.
belows are the data:
(please pay attention to ===> lines)
-----from here-----
1)static Vtab vtab[] = {
	0x11ab,	0x4351,	1514,	"88e8036",



2)in buffinit() function:

	if(q == Qr || q == Qr + Qportsz){
===>		t = end - start;
		rrwrite32(c, q + Rpon, t - 8192/8);		/* set Rx upper threshold, pause on */
===>		rrwrite32(c, q + Rpoff, t/4);		/* set Rx lower threshold pause off */



3)in phyinit() function:

	if((c->feat & Fnewphy) == 0){
		u = phyread(c, Phyextctl);
		u &= ~0xf70;			/* clear downshift counters */
		u |= 0x7<<4;			/* mac tx clock = 25mhz */
		if(c->type == Yukec)
			u |= 2*Dnmstr | Dnslv;
		else
===>			u |= (0<<8 & 3<<8)|(1<<8 & 3<<8);
				......
	}else{
===>		if(c->feat != 0)		/* exclude Yukfe */
			u |= Ppmdixa >> 1;		/* why the shift? */
		if(c->type == Yukfep && c->rev == 0){
		}
			.....
+++	if (c->type == Yukfe){	/* led control */
+++		u = u1 = phyread(c, Phyphy);
+++		u &= ~(0xf <<4);
+++		u |= 0x0b<<4 & 0xf<<4;
+++		phywrite(c, 0x16, u);
+++		u1 |= (1<<8 & 7<<8) <<1;
+++		phywrite(c, 0x18, u1);
+++	}
	phywrite(c, Phyintm, Anok | Anerr | Lsc);		/* phy interrupt mask */
	dprint("phyid %.4ux step %.4ux\n", phyread(c, 2), phyread(c, 3));
}
------- to here -----

Kenji



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

only message in thread, other threads:[~2016-06-16  8:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16  8:13 etheryuk.c for Marvell 88E8036 kokamoto

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