public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] hwconfig: Move HWCONFIG_BUFFER_SIZE into hwconfig.h
@ 2012-08-16  0:53 York Sun
  2012-08-17 17:54 ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: York Sun @ 2012-08-16  0:53 UTC (permalink / raw)
  To: u-boot

Before proper environment is setup, we extract hwconfig and put it into a
buffer with size HWCONFIG_BUFFER_SIZE. We need to enlarge the buffer to
accommodate longer string. Since this macro is used in multiple files, we
move it into hwconfig.h.

Signed-off-by: York Sun <yorksun@freescale.com>
---

 arch/powerpc/cpu/mpc85xx/cpu_init.c           |    2 --
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |    2 --
 arch/powerpc/cpu/mpc8xxx/ddr/options.c        |    1 -
 include/hwconfig.h                            |    2 ++
 4 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index c13c45f..2397547 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -56,8 +56,6 @@
 
 #include "../../../../drivers/block/fsl_sata.h"
 
-#define HWCONFIG_BUFFER_SIZE 128
-
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_SECURE_BOOT
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index 9300e7f..69399aa 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -46,8 +46,6 @@
 
 static u32 serdes_prtcl_map;
 
-#define HWCONFIG_BUFFER_SIZE	128
-
 #ifdef DEBUG
 static const char *serdes_prtcl_str[] = {
 	[NONE] = "NA",
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/options.c b/arch/powerpc/cpu/mpc8xxx/ddr/options.c
index 00ec57b..24c8a51 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/options.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/options.c
@@ -19,7 +19,6 @@
  * This is pretty fragile on both the use of stack and if the buffer is big
  * enough. However we will get a warning from getenv_f for the later.
  */
-#define HWCONFIG_BUFFER_SIZE	128
 
 /* Board-specific functions defined in each board's ddr.c */
 extern void fsl_ddr_board_options(memctl_options_t *popts,
diff --git a/include/hwconfig.h b/include/hwconfig.h
index a037ed8..64861c4 100644
--- a/include/hwconfig.h
+++ b/include/hwconfig.h
@@ -18,6 +18,8 @@
 #include <linux/types.h>
 #include <asm/errno.h>
 
+#define HWCONFIG_BUFFER_SIZE 256
+
 #ifdef CONFIG_HWCONFIG
 
 extern int hwconfig_f(const char *opt, char *buf);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-04 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16  0:53 [U-Boot] [PATCH] hwconfig: Move HWCONFIG_BUFFER_SIZE into hwconfig.h York Sun
2012-08-17 17:54 ` Kumar Gala
2012-08-17 18:00   ` York Sun
2012-09-02 12:43     ` Wolfgang Denk
2012-09-04 16:16       ` York Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox