public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/08] include/configs: Better utilize CONFIG_SYS_NO_FLASH
Date: Sat, 14 Apr 2012 08:22:23 +0200	[thread overview]
Message-ID: <20120414062224.4190920022F@gemini.denx.de> (raw)
In-Reply-To: <1334355606-16491-9-git-send-email-trini@ti.com>

Dear Tom Rini,

In message <1334355606-16491-9-git-send-email-trini@ti.com> you wrote:
> In config files which it is clear when CONFIG_SYS_NO_FLASH will be set

s/which it is clear when/where it is clear that/ ?

> (either unconditionally or based on logic that can happen early in the
> config file), ensure that we set that _before_ we include
> config_cmd_default.h so that the logic in that file will not enable
> CONFIG_CMD_(FLASH|IMLS).  This saves us from having to undef it in the
> board files.

I'm not sure if I like that.  It makes the code not easier to
understand, but actually less obvious.

> --- a/include/configs/PN62.h
> +++ b/include/configs/PN62.h
> @@ -56,13 +56,12 @@
>  /*
>   * Command line configuration.
>   */
> +#define CONFIG_SYS_NO_FLASH		/* There is no FLASH memory	*/
>  #include <config_cmd_default.h>
...
> -#define CONFIG_SYS_NO_FLASH		1		/* There is no FLASH memory	*/
> -
>  #define CONFIG_ENV_IS_NOWHERE	1		/* Store ENV in memory only	*/
>  #define CONFIG_ENV_OFFSET		0x00004000	/* Offset of Environment Sector */
>  #define CONFIG_ENV_SIZE		0x00002000	/* Total Size of Environment Sector */

Logically, it makes more sense to me to look for the NO_FLASH setting
close to where we are dfinging such things - the relation to the
"Command line configuration" is pretty obscure.


> diff --git a/include/configs/SIMPC8313.h b/include/configs/SIMPC8313.h
> index 0976077..8b51f6c 100644
> --- a/include/configs/SIMPC8313.h
> +++ b/include/configs/SIMPC8313.h
> @@ -105,8 +105,6 @@
>  /*
>   * FLASH on the Local Bus
>   */
> -#define CONFIG_SYS_NO_FLASH
> -
>  #if !defined(CONFIG_NAND_SPL)
>  #define CONFIG_SYS_RAMBOOT
>  #endif
> @@ -347,9 +345,8 @@
>  /*
>   * Command line configuration.
>   */
> +#define CONFIG_SYS_NO_FLASH
>  #include <config_cmd_default.h>
> -#undef CONFIG_CMD_IMLS
> -#undef CONFIG_CMD_FLASH

That's even worse here.

I actually tend to believe it is a bad idea to have the #ifdef for
CONFIG_SYS_NO_FLASH in <config_cmd_default.h>


Sorry, but I don't think this patch is a good idea.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Wish not to seem, but to be, the best."                  - Aeschylus

  reply	other threads:[~2012-04-14  6:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 22:19 [U-Boot] [PATCH 00/08]: Config cleanups Tom Rini
2012-04-13 22:19 ` [U-Boot] [PATCH 01/08] omap4: Remove CONFIG_SYS_MMC_SET_DEV Tom Rini
2012-04-13 22:20 ` [U-Boot] [PATCH 02/08] omap4+: Remove CONFIG_ARCH_CPU_INIT Tom Rini
2012-04-13 22:20 ` [U-Boot] [PATCH 03/08] omap5912osk: Remove empty misc_init_r Tom Rini
2012-04-13 22:20 ` [U-Boot] [PATCH 04/08] omap730p2: " Tom Rini
2012-04-13 22:20 ` [U-Boot] [PATCH 05/08] omap3: Introduce weak misc_init_r Tom Rini
2012-04-15  7:32   ` Igor Grinberg
2012-04-15  8:48   ` stefano babic
2012-04-13 22:20 ` [U-Boot] [PATCH 06/08] include/configs: Remove CONFIG_SYS_64BIT_VSPRINTF Tom Rini
2012-04-13 22:20 ` [U-Boot] [PATCH 07/08] include/configs: Remove CONFIG_SYS_64BIT_STRTOUL Tom Rini
2012-04-13 22:20 ` [U-Boot] [PATCH 08/08] include/configs: Better utilize CONFIG_SYS_NO_FLASH Tom Rini
2012-04-14  6:22   ` Wolfgang Denk [this message]
2012-04-16 15:09     ` Tom Rini
2012-04-16 20:56       ` Wolfgang Denk
2012-04-16 23:52         ` Tom Rini

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=20120414062224.4190920022F@gemini.denx.de \
    --to=wd@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