From: Zang Roy-r61911 <tie-fei.zang@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Implement general ULi 526x Ethernet driver support in U-boot
Date: 15 Nov 2007 20:03:53 +0800 [thread overview]
Message-ID: <1195128233.7437.22.camel@localhost.localdomain> (raw)
In-Reply-To: <473B26BC.3070508@freescale.com>
On Thu, 2007-11-15 at 00:47, Tabi Timur wrote:
> Timur Tabi wrote:
>
> > BTW, where is the code that programs the MAC address *into* the
> IDT/SROM? All
> > we have is code that reads *from* the IDT/SROM. On the 8610, the
> MAC address is
> > stored in I2C EEPROM (address 0x57), and so U-Boot will need to copy
> that into
> > the IDT/SROM *before* this driver runs.
>
> I think I see the problem. The comment in set_mac_addr() is wrong and
> confused me:
>
> +static void set_mac_addr(struct eth_device *dev)
> +{
> + int i;
> + u16 addr;
> + struct uli526x_board_info *db = dev->priv;
> + outl(0x10000, db->ioaddr + DCR0); /* Diagnosis mode */
> + /* Reset dianostic pointer port */
> + outl(0x1c0, db->ioaddr + DCR13);
> + outl(0, db->ioaddr + DCR14); /* Clear reset port */
> + outl(0x10, db->ioaddr + DCR14); /* Reset ID Table pointer */
> + outl(0, db->ioaddr + DCR14); /* Clear reset port */
> + outl(0, db->ioaddr + DCR13); /* Clear CR13 */
> + /* Select ID Table access port */
> + outl(0x1b0, db->ioaddr + DCR13);
> + /* Read MAC address from CR14 */
>
> This should say "Write MAC address to CR14"
You are correct!
Roy
next prev parent reply other threads:[~2007-11-15 12:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 9:49 [U-Boot-Users] [PATCH v2] Add general ULi 526x Ethernet driver support in U-boot Zang Roy-r61911
2007-11-01 13:53 ` Jon Loeliger
2007-11-01 17:43 ` Ben Warren
2007-11-05 8:42 ` [U-Boot-Users] [PATCH] " Zang Roy-r61911
2007-11-05 9:39 ` [U-Boot-Users] [PATCH] Implement " Zang Roy-r61911
2007-11-14 15:34 ` Timur Tabi
2007-11-14 16:47 ` Timur Tabi
2007-11-15 12:03 ` Zang Roy-r61911 [this message]
2007-11-15 10:56 ` Zang Roy-r61911
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=1195128233.7437.22.camel@localhost.localdomain \
--to=tie-fei.zang@freescale.com \
--cc=u-boot@lists.denx.de \
/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