linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Surovegin <ebs@ebshome.net>
To: Shawn Jin <shawnxjin@gmail.com>
Cc: ppcembed <linuxppc-embedded@ozlabs.org>
Subject: Re: Ethernet doesn't work in linux for PPC440GP?
Date: Wed, 23 Feb 2005 01:38:50 -0800	[thread overview]
Message-ID: <20050223093849.GB6670@gate.ebshome.net> (raw)
In-Reply-To: <c3d0340b050223000217714e92@mail.gmail.com>

On Wed, Feb 23, 2005 at 12:02:04AM -0800, Shawn Jin wrote:
> > > zmii0: input 0 in SMII mode
> > > eth0: IBM emac, MAC 00:04:ac:e3:1b:bb
> > > eth0: Found Generic MII PHY (0x08)
> > > zmii0: input 1 in RMII mode
> > > eth1: IBM emac, MAC FF:FF:FF:FF:FF:FF
> > > eth1: Found Generic MII PHY (0x09)
> > 
> > I already told you that this is wrong, why are you asking again?
> > Please, if you asking questions, spend some time reading answers
> > given to you, before asking again.
> 
> Well, don't be mad at me first. The question may bring out another
> round of arguments whether it's a bug related to uboot or linux EMAC
> driver. Wolfgang makes it very clear that this is a bug in linux
> ethernet driver. And I agree with him. This argument happened before
> and I just forgot what specific ethernet driver was in the argument.

This is really irrelevant.

> 
> > Ebony uses RMII, so SMII is obviously wrong. Most probably your
> > firmware doesn't set correct mode and autodetection in the EMAC driver
> > fails.
> 
> So the EMAC driver does expect a boot loader (the firmware you
> mentioned here) to set something for it. Then I think I need to fix it
> in this driver instead of in uboot.

Current EMAC driver uses autodetection logic if PHY mode wasn't 
specified by the board support code. It works for Ebony + OpenBIOS. 
You can try the following patch (untested) to set PHY mode explicitly:

===== arch/ppc/platforms/4xx/ebony.c 1.10 vs edited =====
--- 1.10/arch/ppc/platforms/4xx/ebony.c	2005-02-03 06:42:41 -08:00
+++ edited/arch/ppc/platforms/4xx/ebony.c	2005-02-23 01:28:04 -08:00
@@ -52,6 +52,13 @@
 
 #include <syslib/gen550.h>
 
+/*
+ * This is a horrible kludge, we eventually need to abstract this
+ * generic PHY stuff, so the  standard phy mode defines can be
+ * easily used from arch code.
+ */
+#include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h"
+
 static struct ibm44x_clocks clocks __initdata;
 
 /*
@@ -267,9 +274,11 @@
 	def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0);
 	emacdata = def->additions;
 	memcpy(emacdata->mac_addr, EBONY_NA0_ADDR(vpd_base), 6);
+	emacdata->phy_mode = PHY_MODE_RMII;
 	def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1);
 	emacdata = def->additions;
 	memcpy(emacdata->mac_addr, EBONY_NA1_ADDR(vpd_base), 6);
+	emacdata->phy_mode = PHY_MODE_RMII;
 	iounmap(vpd_base);
 
 	/*


--
Eugene

  reply	other threads:[~2005-02-23  9:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-23  3:07 Ethernet doesn't work in linux for PPC440GP? Shawn Jin
2005-02-23  4:22 ` Eugene Surovegin
2005-02-23  8:02   ` Shawn Jin
2005-02-23  9:38     ` Eugene Surovegin [this message]
2005-02-23  4:29 ` Eugene Surovegin
2005-02-23  8:02   ` Shawn Jin

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=20050223093849.GB6670@gate.ebshome.net \
    --to=ebs@ebshome.net \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=shawnxjin@gmail.com \
    /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).