[imx51evk ] no ethN device if ethaddr is not set in u-boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro U-Boot |
Fix Released
|
Medium
|
Unassigned | ||
u-boot-linaro (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When installing u-boot on my imx51evk board (following the instructions here: http://
After talking with AmitK, he suggested setting the ethaddr value before building u-boot, as seen here: http://
Once ethaddr is set in u-boot, the kernel boots and the ethN device is present. So linaro u-boot builds will need to make sure ethaddr value is set.
The complication here would be, if ethaddr is statically set in u-boot, it would cause problems if there are multiple boards on the same network with the same MAC addr. Either some unique value from the board itself should be used, or the linaro-media-create may need to have some way of providing a unique value that u-boot can use.
affects: | linaro → u-boot-linaro |
affects: | ubuntu → u-boot-linaro (Ubuntu) |
tags: | added: imx51evk |
Changed in u-boot-linaro: | |
status: | New → Incomplete |
status: | Incomplete → In Progress |
importance: | Undecided → Medium |
The following patch is verified working on mx51evk to read FEC MAC address from i.mx fuse bank.
It consolidated the definition of iim_bank_area in iim_regs across i.mx family. As different i.mx SoC could have MAC bits defined in different fuse bank, it may be reasonable to consolidate iim_bank_area as one and use IIM_MAC as offset to address the MAC field, so that the same fec_get_hwaddr code can be shared across i.mx family.
From e68670542d01825 006fa0eb3e11b22 086f327eb3 Mon Sep 17 00:00:00 2001
From: Shawn Guo <email address hidden>
Date: Fri, 8 Oct 2010 19:11:48 +0800
Subject: [PATCH] Consolidate the ethaddr read from i.MX fuse
Signed-off-by: Shawn Guo <email address hidden> include/ asm/arch- mx25/imx- regs.h | 10 +++------- include/ asm/arch- mx27/imx- regs.h | 4 ++-- include/ asm/arch- mx51/imx- regs.h | 23 +++++++ +++++++ +++++++ ++ net/fec_ mxc.c | 10 +---------
---
arch/arm/
arch/arm/
arch/arm/
drivers/
4 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/arch/ arm/include/ asm/arch- mx25/imx- regs.h b/arch/ arm/include/ asm/arch- mx25/imx- regs.h arm/include/ asm/arch- mx25/imx- regs.h arm/include/ asm/arch- mx25/imx- regs.h area0[0x20] ; area1[0x20] ; area2[0x20] ;
index f709bd8..35eb303 100644
--- a/arch/
+++ b/arch/
@@ -128,12 +128,8 @@ struct iim_regs {
u32 iim_prev;
u32 iim_srev;
u32 iim_prog_p;
- u32 res1[0x1f5];
- u32 iim_bank_
- u32 res2[0xe0];
- u32 iim_bank_
- u32 res3[0xe0];
- u32 iim_bank_
+ 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 */ arm/include/ asm/arch- mx27/imx- regs.h b/arch/ arm/include/ asm/arch- mx27/imx- regs.h arm/include/ asm/arch- mx27/imx- regs.h arm/include/ asm/arch- mx27/imx- regs.h area0[0x100] ;
diff --git a/arch/
index 6ecddaa..9fdd5c5 100644
--- a/arch/
+++ b/arch/
@@ -203,7 +203,7 @@ struct iim_regs {
u32 iim_scs2;
u32 iim_scs3;
u32 res[0x1F0];
- u32 iim_bank_
+ u32 iim_bank_area[0x100 * 2];
};
#endif
@@ -513,7 +513,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
diff --git a/arch/ arm/include/ asm/arch- mx51/imx- regs.h b/arch/ arm/include/ asm/arch- mx51/imx- regs.h arm/include/ asm/arch- mx51/imx- regs.h arm/include/ asm/arch- mx51/imx- regs.h
index 3887d3c..07a6e6d 100644
--- a/arch/
+++ b/arch/
@@ -207,6 +207,10 @@
#define BOARD_REV_1_0 0x0
#define BOARD_REV_2_0 0x1
+/* FUSE */
+#define IMX_IIM_BASE (IIM_BASE_ADDR)
+#define IIM_MAC 0x109
+
#ifndef __ASSEMBLY__
struct clkctl {
@@ -256,6 +260,25 @@ struct weim {
u32 cswcr2;
};
+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__ */ net/fec_ mxc.c b/drivers/ net/fec_ mxc.c net/fec_ mxc...
diff --git a/drivers/
index 050c0e1..e5a2376 100644
--- a/drivers/