[U-Boot] [PATCH v2 1/1] imx: Get fec mac address from fuse

Stefano Babic sbabic at denx.de
Wed Nov 17 09:13:21 CET 2010


On 11/17/2010 03:22 AM, Jason Liu wrote:

> It's OK, I think. But there will change a lot of code for the platform
> other than i.mx51.

You have already posted changes for the whole i.MX family we currently
support.

However, I understand you do not want to specify the whole layout for
all processors, that means more effort. At least you must specify in the
structure where we cann access the mac address.

You could do in this way

typedef union fuse_bank {
        struct {
                u32 fuses_0[..]
                u32 mac_addr[6];
                u32 other_fuses[...];
                u32 reserved_filled[..]; /* to fill the 0x80-0xFF*/
        };
        /*
         * If we do not want to set now the layout, we can distinguish
         * only between real register and reserved addresses
         * as you already did
         */
         struct {
                u32 fuse_regs[0x20];
                u32 reserved[0xe0];
        }
 }

This still allows to have an array of fuse_banks in the iim structure.

When someone will implement functions to manage the fuses, he will
change the fuse_bank structure naming all fields as specified in the
i.MX manuals.

> In fact, the rule of my every commit patch is to solve one problem or
> add one feature with the minimum code change to the exist code  base.

To solve one single problem, yes. With minimum code change, no. This
rule does not apply. Changing code searching for the best solution, yes.
Even if we have to change much more code.

> If need some code clean-up or restructure, then use another commit to
> fix it. This will give us a clear track of the code change. If you
> insist on changing it in this patch, I will follow your rule to change
> it.

Check my proposal. I think you need to change slightly the code.

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
=====================================================================


More information about the U-Boot mailing list