From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= Date: Tue, 27 Nov 2012 19:27:31 +0100 (CET) Subject: [U-Boot] [PATCH 3/5] Add fuse API and commands In-Reply-To: <50B4F12B.7030703@boundarydevices.com> Message-ID: <7447268.2249019.1354040851118.JavaMail.root@advansee.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Eric, Dirk, On Tuesday, November 27, 2012 5:58:19 PM, Eric Nelson wrote: > I don't have strong feelings one way or the other. If left to > me, I'd probably stick with the imxotp command, but Beno?t has > clearly walked through the details and we're not talking about > a lot of code either way. OK. The more code is in common, the easier it is to maintain. > Either way, this needs a general 'readme' for the fuse command > conventions Sure. I'll add a doc/README.fuse to v3. > and some per-arch documentation about how to translate > between the reference manual and the command. Yes. Should this documentation be located in the README.fuse, or in separate README files, or in the drivers themselves, e.g. fsl_iim.c? > It also seems appropriate to have documentation somewhere about > the conventions used for things like mac address storage. AFAIK, > the only place to find the mapping of OTP locations used for this > is in the various bits of code that implement it. Yes. Currently, it can be found in the various imx-regs.h, in the fuse_bankx_regs structures. This information could be added to README.imx*. There is also an imx_get_mac_from_fuse() function implemented for each i.MX SoC to load the MAC address from the fuses for the FEC. Perhaps a similar function with a default implementation could be created by each applicable SoC and used by a new command in cmd_fuse.c to handle MAC addresses read/write operations. But this would perhaps be too specific for cmd_fuse.c. It might be better to either have only the README.imx* documentation, or to have SoC-specific commands for the MAC addresses, like for the clock commands. What do you think? Best regards, Beno?t