From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 16 Dec 2011 11:55:01 +0100 Subject: [U-Boot] [PATCH v2 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28 In-Reply-To: <201112161139.47375.marek.vasut@gmail.com> References: <1323966067-28333-1-git-send-email-fabio.estevam@freescale.com> <201112161053.10522.marek.vasut@gmail.com> <4EEB17A9.10605@denx.de> <201112161139.47375.marek.vasut@gmail.com> Message-ID: <4EEB2385.40407@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 16/12/2011 11:39, Marek Vasut wrote: >> >> Hi Marek, > > Hi Stefano, > > DISCLAIMER: I'm terribly tired today, had early class. ok, I understand..;-) > > You disable fuses and use ethaddr. Why do we need them? We don't, but the > hardware is in the CPU and someone might use it so let's support it. Exactly - see also othe IMX SOCs. >> In a standard way, the environment must be adapted for each board to >> store the MAC address in the ethaddr variable. The reason to get the MAC >> directly from the hardware is that it is not required a specific initial >> setup for each board, and that simplifies the production and the >> delivery of the boards. > > Sure, but the OCOTP capacity here is limited. But there was approach from > Fabio/me how to make the OCOTP good enough for two NICs even. And this is nice. > * The idea is to let user configure the top 2 bytes per-device (which is the > most likely case). This is exactly what I meant. > * Introduce mac_modify(int fec, char *mac) function, which will be called from > imx_get_mac_from_fuse() > * The function will adjust the MAC, for example by setting top two bytes to > preconfigured data, bottom four bytes from OCOTP and the last bit of the MAC > from "int fec", which is 0 for FEC0 and 1 for FEC1. This should be sufficient > for most people. Exactly ! > * The function will be weak so it can be overridden to your hearts content. Right ! Stefano -- ===================================================================== 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 =====================================================================