diff options
author | Fugang Duan <b38611@freescale.com> | 2014-10-15 09:36:40 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-23 16:42:31 +0300 |
commit | 8b2b3d649d3e3d937271767de9f9d621a8fc6203 (patch) | |
tree | 9eaf99a3f01ca669e09eb3120d3ee1c598b8ac54 /arch/arm/mach-imx/mach-imx6sl.c | |
parent | d464a00029f6edc6fd80b7ee13984849dbe08c28 (diff) |
MLK-9694 ARM: imx6: init enet MAC address
Enet get MAC address order:
From module parameters or kernel command line -> device tree ->
pfuse -> mac registers set by bootloader -> random mac address.
When there have no "fec.macaddr" parameters set in kernel command
line, enet driver get MAC address from device tree. And then if
the MAC address set in device tree and is valid, enet driver get
MAC address from device tree. Otherwise,enet get MAarch/arm/mach-imx
/mach-imx6q.cC address from
pfuse. So, in the condition, update the MAC address (read from pfuse)
to device tree.
Cherry-pick & Merge patches from:
149ac988a25b8d8eb86d05679cbb7b42819ff7a1 &
3269e5c06bdb2f7ab9bd5afa9bbfe46d872197d3
Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/mach-imx6sl.c')
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index 04084900d810..4ed2fb8bf686 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c @@ -19,7 +19,7 @@ #include "common.h" #include "cpuidle.h" -static void __init imx6sl_fec_init(void) +static void __init imx6sl_fec_clk_init(void) { struct regmap *gpr; @@ -30,9 +30,14 @@ static void __init imx6sl_fec_init(void) IMX6SL_GPR1_FEC_CLOCK_MUX2_SEL_MASK, 0); regmap_update_bits(gpr, IOMUXC_GPR1, IMX6SL_GPR1_FEC_CLOCK_MUX1_SEL_MASK, 0); - } else { + } else pr_err("failed to find fsl,imx6sl-iomux-gpr regmap\n"); - } +} + +static inline void imx6sl_fec_init(void) +{ + imx6sl_fec_clk_init(); + imx6_enet_mac_init("fsl,imx6sl-fec", "fsl,imx6sl-ocotp"); } static void __init imx6sl_init_late(void) |