[U-Boot] [PATCH] drivers/net/fec_mxc.c: write mac address in init

call fec_set_hwaddr in init routine to setup MAC address so when ethaddr is set late the change will propagate to the hw
Signed-off-by: John Rigby john.rigby@linaro.org --- drivers/net/fec_mxc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 2d4ffed..050c0e1 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -414,6 +414,8 @@ static int fec_init(struct eth_device *dev, bd_t* bd) uint32_t base; struct fec_priv *fec = (struct fec_priv *)dev->priv;
+ /* Initialize MAC address */ + fec_set_hwaddr(dev); /* * reserve memory for both buffer descriptor chains at once * Datasheet forces the startaddress of each chain is 16 byte

On Wed, Sep 8, 2010 at 2:11 PM, John Rigby john.rigby@linaro.org wrote:
call fec_set_hwaddr in init routine to setup MAC address so when ethaddr is set late the change will propagate to the hw
Signed-off-by: John Rigby john.rigby@linaro.org
Ben, can this fix go into the next release?

Dear John Rigby,
In message 1283976684-30754-1-git-send-email-john.rigby@linaro.org you wrote:
call fec_set_hwaddr in init routine to setup MAC address so when ethaddr is set late the change will propagate to the hw
s/late/later/ ?
Signed-off-by: John Rigby john.rigby@linaro.org
drivers/net/fec_mxc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 2d4ffed..050c0e1 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -414,6 +414,8 @@ static int fec_init(struct eth_device *dev, bd_t* bd) uint32_t base; struct fec_priv *fec = (struct fec_priv *)dev->priv;
- /* Initialize MAC address */
- fec_set_hwaddr(dev); /*
- reserve memory for both buffer descriptor chains at once
- Datasheet forces the startaddress of each chain is 16 byte
Please insert blank line before comment.
Best regards,
Wolfgang Denk

Call fec_set_hwaddr in init routine to setup MAC address so when ethaddr is set late via setenv the change will propagate to the hw.
Signed-off-by: John Rigby john.rigby@linaro.org CC: Ben Warren biggerbadderben@gmail.com --- v2 - add blank line as requested better commit message added CC drivers/net/fec_mxc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 2d4ffed..3f09c2b 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -414,6 +414,9 @@ static int fec_init(struct eth_device *dev, bd_t* bd) uint32_t base; struct fec_priv *fec = (struct fec_priv *)dev->priv;
+ /* Initialize MAC address */ + fec_set_hwaddr(dev); + /* * reserve memory for both buffer descriptor chains at once * Datasheet forces the startaddress of each chain is 16 byte

Dear John Rigby,
In message 1287001868-22244-1-git-send-email-john.rigby@linaro.org you wrote:
Call fec_set_hwaddr in init routine to setup MAC address so when ethaddr is set late via setenv the change will propagate to the hw.
Signed-off-by: John Rigby john.rigby@linaro.org CC: Ben Warren biggerbadderben@gmail.com
v2 - add blank line as requested better commit message added CC drivers/net/fec_mxc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Ben, I hope this is OK with you.
Best regards,
Wolfgang Denk

Hi, John & Wolfgang,
-----Original Message----- From: u-boot-bounces@lists.denx.de
[mailto:u-boot-bounces@lists.denx.de]
On Behalf Of Wolfgang Denk Sent: Wednesday, October 20, 2010 5:28 AM To: John Rigby Cc: u-boot@lists.denx.de; Ben Warren Subject: Re: [U-Boot] [PATCH v2] drivers/net/fec_mxc.c: write mac
address
ininit
Dear John Rigby,
In message 1287001868-22244-1-git-send-email-john.rigby@linaro.org
you
wrote:
Call fec_set_hwaddr in init routine to setup MAC address so when
ethaddr is set
late via setenv the change will propagate to the hw.
Signed-off-by: John Rigby john.rigby@linaro.org CC: Ben Warren biggerbadderben@gmail.com
v2 - add blank line as requested better commit message added CC drivers/net/fec_mxc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Ben, I hope this is OK with you.
In fact, I don't think it's a good fix to fec-mac-address-not-set issue, it's just a hack. This is the output from bootup log,
Warning: FEC MAC addresses don't match: Address in SROM is 75:6e:20:62:6f:6f Address in environment is 00:01:02:04:05:06
It will give one confused warning that the FEC MAC has been set in the SROM, but actually, this the float value which induced by this patch.
In fact, we need read the mac address from FUSE(IIM), all the MAC address has burned into fuse after the chip has been shipped out.
I will send out one patch to fix this issue soon.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de There are three ways to get something done: do it yourself, hire someone, or forbid your kids to do it. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

For current mx51 support in u-boot where we have no fuse support the patch is useful. I don't recall what the general policy is in u-boot for env vs eeprom mac addresses but I do remember discussions about it.
On Tue, Oct 19, 2010 at 11:21 PM, Liu Hui-R64343 r64343@freescale.com wrote:
Hi, John & Wolfgang,
-----Original Message----- From: u-boot-bounces@lists.denx.de
[mailto:u-boot-bounces@lists.denx.de]
On Behalf Of Wolfgang Denk Sent: Wednesday, October 20, 2010 5:28 AM To: John Rigby Cc: u-boot@lists.denx.de; Ben Warren Subject: Re: [U-Boot] [PATCH v2] drivers/net/fec_mxc.c: write mac
address
ininit
Dear John Rigby,
In message 1287001868-22244-1-git-send-email-john.rigby@linaro.org
you
wrote:
Call fec_set_hwaddr in init routine to setup MAC address so when
ethaddr is set
late via setenv the change will propagate to the hw.
Signed-off-by: John Rigby john.rigby@linaro.org CC: Ben Warren biggerbadderben@gmail.com
v2 - add blank line as requested better commit message added CC drivers/net/fec_mxc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Ben, I hope this is OK with you.
In fact, I don't think it's a good fix to fec-mac-address-not-set issue, it's just a hack. This is the output from bootup log,
Warning: FEC MAC addresses don't match: Address in SROM is 75:6e:20:62:6f:6f Address in environment is 00:01:02:04:05:06
It will give one confused warning that the FEC MAC has been set in the SROM, but actually, this the float value which induced by this patch.
In fact, we need read the mac address from FUSE(IIM), all the MAC address has burned into fuse after the chip has been shipped out.
I will send out one patch to fix this issue soon.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de There are three ways to get something done: do it yourself, hire someone, or forbid your kids to do it. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hi, John
2010/10/22 John Rigby jcrigby@gmail.com:
For current mx51 support in u-boot where we have no fuse support the patch is useful. I don't recall what the general policy is in u-boot for env vs eeprom mac addresses but I do remember discussions about it.
Geting mac address from FUSE is the right way for mx51 and it's not difficult to add FUSE read function due to the FUSE read is simple as the memory read. I have seen that Shawn has posted the patches to Linaro-uboot git there.
On Tue, Oct 19, 2010 at 11:21 PM, Liu Hui-R64343 r64343@freescale.com wrote:
Hi, John & Wolfgang,
-----Original Message----- From: u-boot-bounces@lists.denx.de
[mailto:u-boot-bounces@lists.denx.de]
On Behalf Of Wolfgang Denk Sent: Wednesday, October 20, 2010 5:28 AM To: John Rigby Cc: u-boot@lists.denx.de; Ben Warren Subject: Re: [U-Boot] [PATCH v2] drivers/net/fec_mxc.c: write mac
address
ininit
Dear John Rigby,
In message 1287001868-22244-1-git-send-email-john.rigby@linaro.org
you
wrote:
Call fec_set_hwaddr in init routine to setup MAC address so when
ethaddr is set
late via setenv the change will propagate to the hw.
Signed-off-by: John Rigby john.rigby@linaro.org CC: Ben Warren biggerbadderben@gmail.com
v2 - add blank line as requested better commit message added CC drivers/net/fec_mxc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Ben, I hope this is OK with you.
In fact, I don't think it's a good fix to fec-mac-address-not-set issue, it's just a hack. This is the output from bootup log,
Warning: FEC MAC addresses don't match: Address in SROM is 75:6e:20:62:6f:6f Address in environment is 00:01:02:04:05:06
It will give one confused warning that the FEC MAC has been set in the SROM, but actually, this the float value which induced by this patch.
In fact, we need read the mac address from FUSE(IIM), all the MAC address has burned into fuse after the chip has been shipped out.
I will send out one patch to fix this issue soon.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de There are three ways to get something done: do it yourself, hire someone, or forbid your kids to do it. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Dear Jason Liu,
In message AANLkTimEsOZPvRuuTuRsGKXTqk0tYJgdXTCk7eGZmdVe@mail.gmail.com you wrote:
Geting mac address from FUSE is the right way for mx51 and it's not difficult to add FUSE read function due to the FUSE read is simple as the memory read. I have seen that Shawn has posted the patches to Linaro-uboot git there.
It's a pity that Linaro does it's development out-of-tree, but it's their decision, and we cannot help it.
If you think it's so easy, then why don't you adapt their code and submit it as patches here?
Best regards,
Wolfgang Denk

Hi, Wolfgang,
2010/10/22 Wolfgang Denk wd@denx.de:
Dear Jason Liu,
In message AANLkTimEsOZPvRuuTuRsGKXTqk0tYJgdXTCk7eGZmdVe@mail.gmail.com you wrote:
Geting mac address from FUSE is the right way for mx51 and it's not difficult to add FUSE read function due to the FUSE read is simple as the memory read. I have seen that Shawn has posted the patches to Linaro-uboot git there.
It's a pity that Linaro does it's development out-of-tree, but it's their decision, and we cannot help it.
If you think it's so easy, then why don't you adapt their code and submit it as patches here?
I will submit the patch soon. Thanks,
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de "A complex system that works is invariably found to have evolved from a simple system that worked." - John Gall, _Systemantics_

On Thu, Oct 21, 2010 at 9:37 PM, Wolfgang Denk wd@denx.de wrote:
Dear Jason Liu,
In message AANLkTimEsOZPvRuuTuRsGKXTqk0tYJgdXTCk7eGZmdVe@mail.gmail.com you wrote:
Geting mac address from FUSE is the right way for mx51 and it's not difficult to add FUSE read function due to the FUSE read is simple as the memory read. I have seen that Shawn has posted the patches to Linaro-uboot git there.
It's a pity that Linaro does it's development out-of-tree, but it's their decision, and we cannot help it.
Hmmm . . . I'm doing OMAP3 & 4 u-boot work for Linaro and *all* of my work is based on current mainline!
So I think that this is probably not a good blanket assumption.
Steve

Dear Steve Sakoman,
In message AANLkTim28qFGry3O-6qmZ6u-WDWvxzGCxCk059j+pPn5@mail.gmail.com you wrote:
It's a pity that Linaro does it's development out-of-tree, but it's their decision, and we cannot help it.
Hmmm . . . I'm doing OMAP3 & 4 u-boot work for Linaro and *all* of my work is based on current mainline!
So I think that this is probably not a good blanket assumption.
You are right, I should be more careful with such generalizations. Sorry.
Best regards,
Wolfgang Denk

On Friday, October 22, 2010 11:00:37 Steve Sakoman wrote:
On Thu, Oct 21, 2010 at 9:37 PM, Wolfgang Denk wrote:
Jason Liu wrote:
Geting mac address from FUSE is the right way for mx51 and it's not difficult to add FUSE read function due to the FUSE read is simple as the memory read. I have seen that Shawn has posted the patches to Linaro-uboot git there.
It's a pity that Linaro does it's development out-of-tree, but it's their decision, and we cannot help it.
Hmmm . . . I'm doing OMAP3 & 4 u-boot work for Linaro and *all* of my work is based on current mainline!
technically speaking, *everyone* is doing work "based on mainline". but if you're maintaining a fork without getting merged, then Wolfgang's statement is still pretty correct. if i cant checkout current mainline from Wolfgang and get stuff working, then something is wrong. -mike

On Fri, Oct 22, 2010 at 8:32 AM, Mike Frysinger vapier@gentoo.org wrote:
On Friday, October 22, 2010 11:00:37 Steve Sakoman wrote:
On Thu, Oct 21, 2010 at 9:37 PM, Wolfgang Denk wrote:
Jason Liu wrote:
Geting mac address from FUSE is the right way for mx51 and it's not difficult to add FUSE read function due to the FUSE read is simple as the memory read. I have seen that Shawn has posted the patches to Linaro-uboot git there.
It's a pity that Linaro does it's development out-of-tree, but it's their decision, and we cannot help it.
Hmmm . . . I'm doing OMAP3 & 4 u-boot work for Linaro and *all* of my work is based on current mainline!
technically speaking, *everyone* is doing work "based on mainline". but if you're maintaining a fork without getting merged, then Wolfgang's statement is still pretty correct. if i cant checkout current mainline from Wolfgang and get stuff working, then something is wrong.
I can't speak for others, but the lifetime of a patch in my working branch is just a few days before it gets posted to the list.
Frankly I can't imagine working any closer to top of tree. I do daily merges and builds and send fix patches as soon as I have them.
Steve

Jason Liu wrote:
Geting mac address from FUSE is the right way for mx51 and it's not difficult to add FUSE read function due to the FUSE read is simple as the memory read. I have seen that Shawn has posted the patches to Linaro-uboot git there.
It's a pity that Linaro does it's development out-of-tree, but it's their decision, and we cannot help it.
I'm new to community, not Linaro person, but just a Linaro player. And I did not intend to do any out-of-tree u-boot patch. I'm sorry for this, and will make sure all the future u-boot patches will be sent to this list.
PS. I just subscribed the list 10 minutes back.
participants (8)
-
Jason Liu
-
John Rigby
-
John Rigby
-
Liu Hui-R64343
-
Mike Frysinger
-
Shawn Guo
-
Steve Sakoman
-
Wolfgang Denk