From: Antonio Di Bacco Date: Wed, 15 Mar 2006 23:01:17 +0100 Subject: [U-Boot-Users] mii_send error or at least strange In-Reply-To: <1142458690.8625.142.camel@saruman.qstreams.net> References: <200603152231.13466.antonio.dibacco@aruba.it> <1142458690.8625.142.camel@saruman.qstreams.net> Message-ID: <200603152301.17547.antonio.dibacco@aruba.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de That's a good answer. Thank you. But why do I receive "mii_send STUCK" for example when tftp tries to use FEC2? Bye. On Wednesday 15 March 2006 22:38, Ben Warren wrote: > Antonio, > > I'm not sure about the 8xx PowerQUICCs, but other Freescale CPUs with > multiple ethernet ports support MII data plane on all ports but only > have one MDIO port (control plane for MII). Maybe that's why the code > is this way? > > regards, > Ben > > On Wed, 2006-03-15 at 22:31 +0100, Antonio Di Bacco wrote: > > I had a look to mii_send code in u-boot/cpu/mpc8xx/fec.c . It supports > > both FEC1 and FEC2 but anyway it seems to write always register mii-data > > of FEC1, look here: > > > > /* send command to phy using mii, wait for result */ > > static uint mii_send(uint mii_cmd) > > { > > uint mii_reply; > > volatile fec_t *ep; > > int cnt; > > > > ep = &(((immap_t *)CFG_IMMR)->im_cpm.cp_fec); > > > > ep->fec_mii_data = mii_cmd; /* command to phy */ > > > > /* wait for mii complete */ > > cnt = 0; > > while (!(ep->fec_ievent & FEC_ENET_MII)) { > > if (++cnt > 1000) { > > printf("mii_send STUCK!\n"); > > break; > > } > > } > > mii_reply = ep->fec_mii_data; /* result from phy */ > > ep->fec_ievent = FEC_ENET_MII; /* clear MII complete */ > > #if 0 > > printf("%s[%d] %s: sent=0x%8.8x, reply=0x%8.8x\n", > > __FILE__,__LINE__,__FUNCTION__,mii_cmd,mii_reply); > > #endif > > return (mii_reply & 0xffff); /* data read from phy */ > > } > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > > _______________________________________________ > > U-Boot-Users mailing list > > U-Boot-Users at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/u-boot-users