public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/1] imx: Get fec mac address from fuse
Date: Wed, 17 Nov 2010 09:13:21 +0100	[thread overview]
Message-ID: <4CE38EA1.9050107@denx.de> (raw)
In-Reply-To: <AANLkTimYdL-Zb4JRPOkzMHQsrTp5NR-zvaosEDebELOC@mail.gmail.com>

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

  reply	other threads:[~2010-11-17  8:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14  3:26 [U-Boot] [PATCH v2 1/1] imx: Get fec mac address from fuse Jason Liu
2010-11-14 10:04 ` Wolfgang Denk
2010-11-14 16:59 ` Stefano Babic
2010-11-15  4:11   ` Jason Liu
2010-11-16  6:41   ` Jason Liu
2010-11-16  6:53     ` Wolfgang Denk
2010-11-16  7:16       ` Jason Liu
2010-11-16  9:34         ` Stefano Babic
2010-11-17  2:22           ` Jason Liu
2010-11-17  8:13             ` Stefano Babic [this message]
2010-11-17  8:44               ` Jason Liu
2010-11-16  9:47         ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE38EA1.9050107@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox