All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Rubini <rubini-list@gnudd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Breakage on arm/next
Date: Tue, 1 Dec 2009 17:05:55 +0100	[thread overview]
Message-ID: <20091201160555.GA4646@mail.gnudd.com> (raw)
In-Reply-To: <4B152AAE.8090900@windriver.com>

> Could the macros defined in apollo.h also be defined in the
> other target board's config file ?

I don't think so (my board is one of the affected ones).

The macros are CONFIG_ENV_ADDR_FLEX and CONFIG_ENV_SIZE_FLEX . I just
don't have the flex device.

In the commit that introduced the problem, I see  code like this:


           env_addr = CONFIG_ENV_ADDR;
   +       if (FLEXONENAND(this))
   +               env_addr = CONFIG_ENV_ADDR_FLEX;

So why should CONFIG_ENV_ADDR_FLEX have a different name from CONFIG_ENV_ADDR ?
Same applies to CONFIG_ENV_SIZE_FLEX.

I think c758e947aa7d39a2be607ecdedd818ad300807b2 should be reverted
and done differently. If I got my reasoning right, the first hunk
should go and the next one:

        instr.len = CONFIG_ENV_SIZE;
+       if (FLEXONENAND(this)) {
+               env_addr = CONFIG_ENV_ADDR_FLEX;
+               instr.len = CONFIG_ENV_SIZE_FLEX;
+               instr.len <<= onenand_mtd.eraseregions[0].numblocks == 1 ?
+                               1 : 0;
+       }


Shoul just become

+       if (FLEXONENAND(this))
+               instr.len <<= onenand_mtd.eraseregions[0].numblocks == 1 ? 1 : 0;

This has no adverse effect on other boards and handles the flex specifics,
withouth adding two unneeded macros.

/alessandro

  reply	other threads:[~2009-12-01 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 14:22 [U-Boot] Breakage on arm/next apgmoorthy
2009-12-01 14:39 ` Tom
2009-12-01 16:05   ` Alessandro Rubini [this message]
2009-12-02 12:13     ` apgmoorthy
2009-12-02 17:07       ` Scott Wood
2009-12-07 12:13         ` apgmoorthy
2009-12-07 17:26           ` Scott Wood
2009-12-10  4:15             ` apgmoorthy
2009-12-10 17:17               ` Scott Wood
2009-12-21 11:00                 ` apgmoorthy
2010-01-06 22:47                   ` Scott Wood
2009-12-17 15:53   ` Premi, Sanjeev
2009-12-18 11:01     ` apgmoorthy
  -- strict thread matches above, loose matches on Subject: below --
2009-11-28  3:48 Tom

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=20091201160555.GA4646@mail.gnudd.com \
    --to=rubini-list@gnudd.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.