<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: 'Droid Sans', arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(32, 32, 32); ">Yes I've set the correct adress and it's why I don't have fffff like on the phytec.<div>
But in fact I had to change the fec_get_hwadrr() to make it work with my board :</div><div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
static int fec_get_hwaddr(struct eth_device *dev, unsigned char *mac)</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
{</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>int i;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>int uninitialized = 0;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>for (i=0;i<6;i++) {</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">                </span>mac[6-1-i] = readl(&IIM_BANK_REG(0,(IIM0_MAC+i)));</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>}</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>/* uninitialized if all 00 */</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>if ((mac[0] == 0) && (mac[1] == 0) && (mac[2] == 0) &&</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
(mac[3] == 0) && (mac[4] == 0) && (mac[5] == 0))</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
uninitialized = 1;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>/* uninitialized if all FF (could be safe) */</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
if ((mac[0] == 0xff) && (mac[1] == 0xff) && (mac[2] == 0xff) &&</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span> (mac[3] == 0xff) && (mac[4] == 0xff) && (mac[5] == 0xff))</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span> uninitialized = 1;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span style="white-space: pre-wrap; ">        </span>return uninitialized;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
}</blockquote></div><div><br></div><div>Before this change it wasn't the case, I had no mac adress in barebox start...</div><div>I also added a specific reset :</div><div><br></div><div><div>void fec_reset()</div><div>
{</div><div> int i=0;</div><div> /* FEC RESET */</div><div> imx_gpio_mode(CFG_ETHPHY_RST | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);</div><div> printf("Before PHY reset\n");</div><div> GPIO_CLEAR(CFG_ETHPHY_RST);</div>
<div> udelay(200);</div><div> GPIO_SET(CFG_ETHPHY_RST);</div><div> printf("After PHY reset\n");</div><div> </div><div>}</div></div><div><br></div><div>And then I call it in the fec_probe() to ensure the fec is reset properly before settings.</div>
<div>I already tested the fec on u-boot and it works fine, so i tought it can help me with barebox but it seems there are some differences between codes.</div><div><br></div><div>For now Im trying to see if it can be a cpu frequence problem because I have an errata on the pll that shifts all my frequencies and so I have to adjust them in the lowlevelinit...</div>
<div><br></div><div>So I would like to know if the clock initialization is taking effect if I boot from RAM ? Do I have t boot from flash ?</div><div><br></div><div>Thanks again.</div></span><br><div class="gmail_quote">
2011/7/12 Sascha Hauer <span dir="ltr"><<a href="mailto:s.hauer@pengutronix.de">s.hauer@pengutronix.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Tue, Jul 12, 2011 at 03:54:43PM +0200, Sascha Hauer wrote:<br>
> On Mon, Jul 11, 2011 at 05:14:54PM +0200, Kamel BOUHARA wrote:<br>
> > Hi,<br>
> ><br>
> > Im trying to port barebox to my Armadeus apf27 board (based on the Freescale<br>
> > imx27 with a 512MiB NAND and 1GB of SDRAM).<br>
> > I've first tried the phytec imx27 configuration and I got it worked until<br>
> > the Linux uncompressing task (the machine ID is bad so I didn't expect it<br>
> > will boot fine :)).<br>
> > So I just copied the phycard-imx27 board directory and I followed the<br>
> > boards.dox in order to add support for my board.<br>
> > But when I've tried to boot again it was not working anymore ...<br>
> ><br>
> > There are somethings stranges with the FEC, here is the result of a memory<br>
> > display with both phytec and my own board :<br>
> ><br>
> > > barebox@Phytec phyCard-i.MX27:/ md -s /dev/phy0<br>
> > ><br>
> > > 00000000: ffffffff ffffffff ffffffff ffffffff ................<br>
> > ><br>
> > > 00000010: ffffffff ffffffff ffffffff ffffffff ................<br>
> > ><br>
> > > 00000020: ffffffff ffffffff ffffffff ffffffff ................<br>
> > ><br>
> > > 00000030: ffffffff ffffffff ffffffff ffffffff ................<br>
><br>
> This means your phy is not configured correctly. Do you usse the correct<br>
> address (can be passed in platform_data).<br>
<br>
</div>GPIO pins which hold the phy in reset are another thing which might go<br>
wrong.<br>
<div><div></div><div class="h5"><br>
Sascha<br>
<br>
--<br>
Pengutronix e.K. | |<br>
Industrial Linux Solutions | <a href="http://www.pengutronix.de/" target="_blank">http://www.pengutronix.de/</a> |<br>
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |<br>
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>__________________________________<br><i><font face="'comic sans ms', sans-serif">Kamel BOUHARA</font></i><div>7 rue Jules César<div>02100 SAINT-QUENTIN<br>
06.17.83.29.04<br><br></div></div><br>