Skip to contentSkip to conversation

imx: Get fec mac address from fuse

PATCH Superseded Jason Liu 5 participants 14 messages Oct 22, 2010 – Oct 27, 2010

Subsystems (3)

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Jason Liu

author
#0 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

The patch is to support getting FEC MAC address from fuse bank.

---
 arch/arm/include/asm/arch-mx25/imx-regs.h |   10 +++-------
 arch/arm/include/asm/arch-mx27/imx-regs.h |    5 ++---
 arch/arm/include/asm/arch-mx5/imx-regs.h  |   24 ++++++++++++++++++++++++
 drivers/net/fec_mxc.c                     |   17 +++++------------
 4 files changed, 34 insertions(+), 22 deletions(-)
arch/arm/include/asm/arch-mx25/imx-regs.h +3 -7
index f709bd8..35eb303 100644
@@ -128,12 +128,8 @@ struct iim_regs {
 	u32 iim_prev;
 	u32 iim_srev;
 	u32 iim_prog_p;
-	u32 res1[0x1f5];
-	u32 iim_bank_area0[0x20];
-	u32 res2[0xe0];
-	u32 iim_bank_area1[0x20];
-	u32 res3[0xe0];
-	u32 iim_bank_area2[0x20];
+	u32 res[0x1f5];
+	u32 iim_bank_area[0x100 * 3];
 };
 #endif
 
@@ -311,6 +307,6 @@ struct iim_regs {
 #define WCR_WDE 0x04
 
 /* FUSE bank offsets */
-#define IIM0_MAC		0x1a
+#define IIM_MAC			0x1a
 
 #endif				/* _IMX_REGS_H */
arch/arm/include/asm/arch-mx27/imx-regs.h +2 -3
index 6ecddaa..429f893 100644
@@ -202,8 +202,7 @@ struct iim_regs {
 	u32 iim_scs1;
 	u32 iim_scs2;
 	u32 iim_scs3;
-	u32 res[0x1F0];
-	u32 iim_bank_area0[0x100];
+	u32 iim_bank_area[0x100 * 2];
 };
 #endif
 
@@ -513,7 +512,7 @@ struct iim_regs {
 #define IIM_ERR_PARITYE	(1 << 1)
 
 /* Definitions for i.MX27 TO2 */
-#define IIM0_MAC		5
+#define IIM_MAC			5
 #define IIM0_SCC_KEY		11
 #define IIM1_SUID		1
 
arch/arm/include/asm/arch-mx5/imx-regs.h +24 -0
index 3ddda40..892099c 100644
@@ -204,6 +204,9 @@
 #define BOARD_REV_1_0           0x0
 #define BOARD_REV_2_0           0x1
 
+#define IMX_IIM_BASE		(IIM_BASE_ADDR)
+#define IIM_MAC			0x109
+
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 #include <asm/types.h>
 
@@ -274,6 +277,27 @@ struct src {
 	u32	sisr;
 	u32	simr;
 };
+
+struct iim_regs {
+	u32 stat;
+	u32 statm;
+	u32 err;
+	u32 emask;
+	u32 fctl;
+	u32 ua;
+	u32 la;
+	u32 sdat;
+	u32 prev;
+	u32 srev;
+	u32 preg_p;
+	u32 scs0;
+	u32 scs1;
+	u32 scs2;
+	u32 scs3;
+	u32 res[0x1f1];
+	u32 iim_bank_area[0x100 * 4];
+};
+
 #endif /* __ASSEMBLER__*/
 
 #endif				/*  __ASM_ARCH_MXC_MX51_H__ */
drivers/net/fec_mxc.c +5 -12
index 3f09c2b..e8d7b98 100644
@@ -312,21 +312,17 @@ static void fec_rbd_clean(int last, struct fec_bd *pRbd)
 
 static int fec_get_hwaddr(struct eth_device *dev, unsigned char *mac)
 {
-/*
- * The MX27 can store the mac address in internal eeprom
- * This mechanism is not supported now by MX51 or MX25
- */
-#if defined(CONFIG_MX51) || defined(CONFIG_MX25)
-	return -1;
-#else
+	/*
+	 * The MX27 can store the mac address in internal eeprom
+	 * This mechanism is also supported now by MX51 or MX25
+	 */
 	struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
 	int i;
 
 	for (i = 0; i < 6; i++)
-		mac[6-1-i] = readl(&iim->iim_bank_area0[IIM0_MAC + i]);
+		mac[6-1-i] = readl(&iim->iim_bank_area[IIM_MAC + i]);
 
 	return !is_valid_ether_addr(mac);
-#endif
 }
 
 static int fec_set_hwaddr(struct eth_device *dev)
@@ -414,9 +410,6 @@ 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
Signature · 1 line
1.7.0.4
author
#1 lore raw

PATCH 2/2 MX5: board version not printed corretly on MX51EVK

Fix the board version printing issue on MX51EVK. Need to read the board version via get_cpu_rev and not rely on system_rev due to the system_rev not initialized at boardchecking time.

---
 board/freescale/mx51evk/mx51evk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
board/freescale/mx51evk/mx51evk.c +2 -0
index d6bb71c..c532603 100644
@@ -438,6 +438,8 @@ int board_late_init(void)
 
 int checkboard(void)
 {
+	u32 system_rev = get_cpu_rev();
+
 	puts("Board: MX51EVK ");
 
 	switch (system_rev & 0xff) {
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/2 MX5: board version not printed corretly on MX51EVK

Quoted 8 lines · Jason Liu

Fix the board version printing issue on MX51EVK. Need to read the board version via get_cpu_rev and not rely on system_rev due to the system_rev not initialized at boardchecking time.

---
 board/freescale/mx51evk/mx51evk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Hi Jason,

Quoted 6 lines
board/freescale/mx51evk/mx51evk.c +0 -0
index d6bb71c..c532603 100644

board/freescale/mx51evk/mx51evk.c int board_late_init(void) · line 445

Quoted 8 lines
board/freescale/mx51evk/mx51evk.c +2 -0
@@ -438,6 +438,8 @@ int board_late_init(void)
 
 int checkboard(void)
 {
+	u32 system_rev = get_cpu_rev();
+
 	puts("Board: MX51EVK ");
 
 	switch (system_rev & 0xff) {

Then we need to clean up other part of the code: system_rev should be not declared globally in the file and must be removed. In the same time, get_board_rev() should be changed. It seems it is in any case wrong, because it returns the same value, and this means get_cpu_rev().

As this is a cpu revision and not a board revision, it is not correct. If the board revision cannot be determined correctly at runtime, we should return a fixed value. but certainly not the cpu revision.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#3 lore raw

PATCH 2/2 MX5: board version not printed corretly on MX51EVK

Hi? Stefano,

2010/10/26 Stefano Babic <[email protected]>:

Quoted 32 lines · Jason Liu
Quoted 8 lines

Fix the board version printing issue on MX51EVK. Need to read the board version via get_cpu_rev and not rely on system_rev due to the system_rev not initialized at boardchecking time.

---
 board/freescale/mx51evk/mx51evk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Hi Jason,

Quoted 6 lines
board/freescale/mx51evk/mx51evk.c +0 -0
index d6bb71c..c532603 100644

board/freescale/mx51evk/mx51evk.c int board_late_init(void) · line 445

Quoted 8 lines
board/freescale/mx51evk/mx51evk.c +2 -0
@@ -438,6 +438,8 @@ int board_late_init(void)
 
 int checkboard(void)
 {
+     u32 system_rev = get_cpu_rev();
+
      puts("Board: MX51EVK ");
 
      switch (system_rev & 0xff) {

Then we need to clean up other part of the code: system_rev should be not declared globally in the file and must be removed. In the same time, get_board_rev() should be changed. It seems it is in any case wrong, because it returns the same value, and this means get_cpu_rev().

Quoted 3 lines

As this is a cpu revision and not a board revision, it is not correct. If the board revision cannot be determined correctly at runtime, we should return a fixed value. but certainly not the cpu revision.

Yes, agree. Then we need clean up the code for vision2 board too.

Quoted 15 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw

PATCH 2/2 MX5: board version not printed corretly on MX51EVK

Quoted 5 lines · Jason Liu
Quoted 3 lines

As this is a cpu revision and not a board revision, it is not correct. If the board revision cannot be determined correctly at runtime, we should return a fixed value. but certainly not the cpu revision.

Yes, agree. Then we need clean up the code for vision2 board too.

Of course. I will fix it in the vision2 board.

Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#5 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

In reply to Jason Liu
Quoted 3 lines · Jason Liu

The patch is to support getting FEC MAC address from fuse bank.

Hi Jason,

patch is related to a network driver, so Ben should be informed, too.

drivers/net/fec_mxc.c static void fec_rbd_clean(int last, struct fec_bd *pRbd) · line 318

Quoted 4 lines
drivers/net/fec_mxc.c +4 -0
+	/*
+	 * The MX27 can store the mac address in internal eeprom
+	 * This mechanism is also supported now by MX51 or MX25
+	 */

If all supported processors implement the same way, we do not need to distinguish. The comment does not add any further info.

Quoted 14 lines
drivers/net/fec_mxc.c +1 -2
 	struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
 	int i;
 
 	for (i = 0; i < 6; i++)
-		mac[6-1-i] = readl(&iim->iim_bank_area0[IIM0_MAC + i]);
+		mac[6-1-i] = readl(&iim->iim_bank_area[IIM_MAC + i]);
 
 	return !is_valid_ether_addr(mac);
-#endif
 
 }
 
 static int fec_set_hwaddr(struct eth_device *dev)

drivers/net/fec_mxc.c static int fec_init(struct eth_device *dev, bd_t* bd) · line 419

Quoted 6 lines
drivers/net/fec_mxc.c +0 -3
@@ -414,9 +410,6 @@ 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);
-

Not sure. Why is this call removed ? We have changed the storage for the MAC address, but we need always to set the FEC controller. What is the reason to drop it ?

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#6 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

Hi, Stefano,

2010/10/26 Stefano Babic <[email protected]>:

Quoted 8 lines · Jason Liu
Quoted 3 lines

The patch is to support getting FEC MAC address from fuse bank.

Hi Jason,

patch is related to a network driver, so Ben should be informed, too.

OK, I will resend the patch and cc Ben. Thanks for reminder. :)

Quoted 8 lines
Quoted 5 lines

+ ? ? /*
+ ? ? ?* The MX27 can store the mac address in internal eeprom
+ ? ? ?* This mechanism is also supported now by MX51 or MX25
+ ? ? ?*/

If all supported processors implement the same way, we do not need to distinguish. The comment does not add any further info.

OK, will remove it.

Quoted 18 lines
Quoted 18 lines

? ? ? struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE; ? ? ? int i;

? ? ? for (i = 0; i < 6; i++)
- ? ? ? ? ? ? mac[6-1-i] = readl(&iim->iim_bank_area0[IIM0_MAC + i]);
+ ? ? ? ? ? ? mac[6-1-i] = readl(&iim->iim_bank_area[IIM_MAC + i]);

? ? ? return !is_valid_ether_addr(mac);
-#endif

?}

?static int fec_set_hwaddr(struct eth_device *dev)

(quoted diff) +0 -0
@@ -414,9 +410,6 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
 ? ? ? uint32_t base;
 ? ? ? struct fec_priv *fec = (struct fec_priv *)dev->priv;
 
Quoted 7 lines

Review static int fec_init(struct eth_device *dev, bd_t* bd) · line 419

Quoted 3 lines
(quoted diff) +0 -3
- ? ? /* Initialize MAC address */
- ? ? fec_set_hwaddr(dev);
-

Not sure. Why is this call removed ? We have changed the storage for the MAC address, but we need always to set the FEC controller. What is the reason to drop it ?

It's because, it will print some floating value of MAC address when bootup and in fact, we don't need re-set it again here.. The net framework will do that. This is why I remove. it.

Quoted 15 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#7 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

Quoted 13 lines · Jason Liu
Quoted 5 lines
Quoted 5 lines

static int fec_set_hwaddr(struct eth_device *dev)

drivers/net/fec_mxc.c +0 -0
@@ -414,9 +410,6 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
      uint32_t base;
      struct fec_priv *fec = (struct fec_priv *)dev->priv;
 
Quoted 7 lines

drivers/net/fec_mxc.c static int fec_init(struct eth_device *dev, bd_t* bd) · line 419

Quoted 3 lines
drivers/net/fec_mxc.c +0 -3
-     /* Initialize MAC address */
-     fec_set_hwaddr(dev);
-

Not sure. Why is this call removed ? We have changed the storage for the MAC address, but we need always to set the FEC controller. What is the reason to drop it ?

Quoted 3 lines

It's because, it will print some floating value of MAC address when bootup and in fact, we don't need re-set it again here.. The net framework will do that. This is why I remove. it.

The call was added one month ago. It sets the MAC address any time the network is used, to be sure that the correct MAC is taken even if the ethaddr variable is changed. You can take a look at the patch:

http://www.mail-archive.com/u-boot at lists.denx.de/msg37629.html

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#8 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

2010/10/27 Stefano Babic <[email protected]>:

Quoted 18 lines · Jason Liu
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines

?static int fec_set_hwaddr(struct eth_device *dev)

(quoted diff) +0 -0
@@ -414,9 +410,6 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
 ? ? ? uint32_t base;
 ? ? ? struct fec_priv *fec = (struct fec_priv *)dev->priv;
 
Quoted 7 lines

Review static int fec_init(struct eth_device *dev, bd_t* bd) · line 419

Quoted 3 lines
(quoted diff) +0 -3
- ? ? /* Initialize MAC address */
- ? ? fec_set_hwaddr(dev);
-

Not sure. Why is this call removed ? We have changed the storage for the MAC address, but we need always to set the FEC controller. What is the reason to drop it ?

Quoted 3 lines

It's because, it will print some floating ?value ?of MAC address when bootup and in fact, we don't need re-set it again here.. The net framework will do that. This is why I remove. it.

Quoted 5 lines

The call was added one month ago. It sets the MAC address any time the network is used, to be sure that the correct MAC is taken even if the ethaddr variable is changed. You can take a look at the patch:

http://www.mail-archive.com/u-boot at lists.denx.de/msg37629.html

Yes, I haved looked it before and I also tested this patch on MX51babbage 3.0 board. It will printting some confusing information with floating value of MAC address when the board boot up after you set the ethaddr enviorment. The reason is that, when it first call fec_init, the eth address of dev is not intialized and then it using the floating memory value.

Quoted 11 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
=====================================================================

#9 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

Quoted 6 lines · Jason Liu

Yes, I haved looked it before and I also tested this patch on MX51babbage 3.0 board. It will printting some confusing information with floating value of MAC address when the board boot up after you set the ethaddr enviorment. The reason is that, when it first call fec_init, the eth address of dev is not intialized and then it using the floating memory value.

Dropping the call is not the solution and works only on the MX51 if the MAC is set into the fuse. Even on the MX51, this is not a general case:
it should be always possible to set the ethaddr via the environment without using the fuse.

As sure, you should at least see a "Warning : MAC addresses don't match" if the ethaddr is set to a different value as in the fuse.

However, I do not yet understand why the address is not set: fec_probe is called before doing something on the network and at this point the address should be set from fuse.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#10 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

Hi, Stefano,

2010/10/27 Stefano Babic <[email protected]>:

Quoted 11 lines · Jason Liu
Quoted 7 lines

Yes, I haved looked it before and I also tested this patch on MX51babbage 3.0 board. It will printting some confusing information with floating value of MAC address when the board boot up after you set the ethaddr enviorment. The reason is that, when it first call fec_init, the eth address of dev is not intialized and then it using the floating memory value.

Dropping the call is not the solution and works only on the MX51 if the MAC is set into the fuse. Even on the MX51, this is not a general case:

FSL will program all the fuse with MAC address before shipping every chip. This applies to all the i.mx family including imx25/35/51/53/50.

Quoted 2 lines

it should be always possible to set the ethaddr via the environment without using the fuse.

Yes, without call this function, the ethaddr evnviroment still working. It will use the MAC set via ethaddr instead of the mac from FUSE. Net framework will do it.

Quoted 7 lines

As sure, you should at least see a "Warning : MAC addresses don't match" if the ethaddr is set to a different value as in the fuse.

However, I do not yet understand why the address is not set: fec_probe is called before doing something on the network and at this point the address should be set from fuse.

I have tested it and it's no need to add this function call. You can test it and see the result.

Quoted 11 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
=====================================================================

#11 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

Quoted 47 lines · Jason Liu

Hi, Stefano,

2010/10/27 Stefano Babic <[email protected]>:

Quoted 11 lines · Jason Liu
Quoted 7 lines

Yes, I haved looked it before and I also tested this patch on MX51babbage 3.0 board. It will printting some confusing information with floating value of MAC address when the board boot up after you set the ethaddr enviorment. The reason is that, when it first call fec_init, the eth address of dev is not intialized and then it using the floating memory value.

Dropping the call is not the solution and works only on the MX51 if the MAC is set into the fuse. Even on the MX51, this is not a general case:

FSL will program all the fuse with MAC address before shipping every chip. This applies to all the i.mx family including imx25/35/51/53/50.

Quoted 2 lines

it should be always possible to set the ethaddr via the environment without using the fuse.

Yes, without call this function, the ethaddr evnviroment still working. It will use the MAC set via ethaddr instead of ?the mac from FUSE. Net framework will do it.

Quoted 7 lines

As sure, you should at least see a "Warning : MAC addresses don't match" if the ethaddr is set to a different value as in the fuse.

However, I do not yet understand why the address is not set: fec_probe is called before doing something on the network and at this point the address should be set from fuse.

I have tested it and it's no need to add this function call. You can test it and see the result.

Quoted 11 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 ?Email: office at denx.de
====================================================================

Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

The patch fixes the particular case where you have no ethaddr in fuse, nor persistent env. The case is a board where the only persistent storage is an SD card and you set load a boot script from file in a FAT partition that has a setenv ethaddr in it. The other case is if a user sets the ethaddr at the command line it will not take effect until reboot in the case of persistent env or never in the case of no persistent env.

#12 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

Dear John,

Quoted 4 lines · In message <[email protected]> you…

The patch fixes the particular case where you have no ethaddr in fuse, nor persistent env. The case is a board where the only persistent storage is an SD card and you set load a boot script from file in a

Well, if ther eis no MAC address in the fuse, and there is no "ethaddr" setting in the current environment, then nothing should happen until you try to run the first network command, at wich point the command should fail because the MAC address is unset.

Quoted 4 lines

FAT partition that has a setenv ethaddr in it. The other case is if a user sets the ethaddr at the command line it will not take effect until reboot in the case of persistent env or never in the case of no persistent env.

This is broken behaviour; in this case, the network driver needs to be fixed. The driver initialization takes place when you start a network command, and it should pick up the MAC address setting then, mo matter if this was permanently stored or just entered on the command line.

Best regards,

Wolfgang Denk

Signature · 5 lines
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 at denx.de
"A child is a person who can't understand why someone would give away
a perfectly good kitten."                               - Doug Larson
#13 lore raw

PATCH 1/2 imx: Get fec mac address from fuse

Quoted 18 lines · Wolfgang Denk

Dear John,

Quoted 4 lines · In message <[email protected]> you…

The patch fixes the particular case where you have no ethaddr in fuse, nor persistent env. ?The case is a board where the only persistent storage is an SD card and you set load a boot script from file in a

Well, if ther eis no MAC address in the fuse, and there is no "ethaddr" setting in the current environment, then nothing should happen until you try to run the first network command, at wich point the command should fail because the MAC address is unset.

Quoted 4 lines

FAT partition that has a setenv ethaddr in it. ?The other case is if a user sets the ethaddr at the command line it will not take effect until reboot in the case of persistent env or never in the case of no persistent env.

Quoted 4 lines

This is broken behaviour; in this case, the network driver needs to be fixed. The driver initialization takes place when you start a network command, and it should pick up the MAC address setting then, mo matter if this was permanently stored or just entered on the command line.

Thanks for saying this because this is exactly what my original patch fixes. So the fix should stay.

Quoted 12 lines

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 at denx.de "A child is a person who can't understand why someone would give away a perfectly good kitten." ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? - Doug Larson