[U-Boot] [PATCH] fdt: Correct global_data condition in main

We need an extra condition here in case we want to use fdt without the silent console/cmdline editing/post options.
Note: It might be acceptable instead to just always declare this here.
From what I can tell it has no code size impact to declare it on any
architecture.
Signed-off-by: Simon Glass sjg@chromium.org --- common/main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/common/main.c b/common/main.c index 8052d42..4734820 100644 --- a/common/main.c +++ b/common/main.c @@ -53,7 +53,8 @@ #include <linux/ctype.h> #include <menu.h>
-#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING) +#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || \ + defined(CONFIG_CMDLINE_EDITING) || defined(CONFIG_OF_CONTROL) DECLARE_GLOBAL_DATA_PTR; #endif

Dear Simon Glass,
In message 1354116325-2567-1-git-send-email-sjg@chromium.org you wrote:
We need an extra condition here in case we want to use fdt without the silent console/cmdline editing/post options.
Note: It might be acceptable instead to just always declare this here. From what I can tell it has no code size impact to declare it on any architecture.
I think we should get rid of the #ifdef
Best regards,
Wolfgang Denk

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 11/28/12 11:06, Wolfgang Denk wrote:
Dear Simon Glass,
In message 1354116325-2567-1-git-send-email-sjg@chromium.org you wrote:
We need an extra condition here in case we want to use fdt without the silent console/cmdline editing/post options.
Note: It might be acceptable instead to just always declare this here. From what I can tell it has no code size impact to declare it on any architecture.
I think we should get rid of the #ifdef
Agreed.
- -- Tom

We need an extra condition here in case we want to use fdt without the silent console/cmdline editing/post options. It is easier to just remove the #ifdef.
Signed-off-by: Simon Glass sjg@chromium.org --- Changes in v2: - Remove the #ifdef as it is getting out of hand
common/main.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/common/main.c b/common/main.c index 8052d42..5362781 100644 --- a/common/main.c +++ b/common/main.c @@ -53,9 +53,7 @@ #include <linux/ctype.h> #include <menu.h>
-#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING) DECLARE_GLOBAL_DATA_PTR; -#endif
/* * Board-specific Platform code can reimplement show_boot_progress () if needed

Hi Simon,
On 11/28/2012 12:54 PM, Simon Glass wrote:
We need an extra condition here in case we want to use fdt without the silent console/cmdline editing/post options. It is easier to just remove the #ifdef.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v2:
- Remove the #ifdef as it is getting out of hand
common/main.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/common/main.c b/common/main.c index 8052d42..5362781 100644 --- a/common/main.c +++ b/common/main.c @@ -53,9 +53,7 @@ #include <linux/ctype.h> #include <menu.h>
-#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING) DECLARE_GLOBAL_DATA_PTR; -#endif
/*
- Board-specific Platform code can reimplement show_boot_progress () if needed
Applied to u-boot-fdt, pull request coming.
Thanks, gvb
participants (4)
-
Jerry Van Baren
-
Simon Glass
-
Tom Rini
-
Wolfgang Denk