summaryrefslogtreecommitdiff
path: root/board/trab/trab.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/trab/trab.c')
-rw-r--r--board/trab/trab.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/board/trab/trab.c b/board/trab/trab.c
index e8dfd2ceb0b..346406eaad4 100644
--- a/board/trab/trab.c
+++ b/board/trab/trab.c
@@ -28,7 +28,7 @@
#include <s3c2400.h>
#include <command.h>
-/* ------------------------------------------------------------------------- */
+DECLARE_GLOBAL_DATA_PTR;
#ifdef CFG_BRIGHTNESS
static void spi_init(void);
@@ -52,8 +52,6 @@ extern int do_mdm_init; /* defined in common/main.c */
#define KBD_MDELAY 5000
static void udelay_no_timer (int usec)
{
- DECLARE_GLOBAL_DATA_PTR;
-
int i;
int delay = usec * 3;
@@ -70,7 +68,6 @@ int board_init ()
#if defined(CONFIG_VFD)
extern int vfd_init_clocks(void);
#endif
- DECLARE_GLOBAL_DATA_PTR;
S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER();
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
@@ -141,8 +138,6 @@ int board_init ()
int dram_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
return 0;
@@ -166,6 +161,19 @@ int misc_init_r (void)
uchar *str;
int i;
+#ifdef CONFIG_VERSION_VARIABLE
+ {
+ /* Set version variable. Please note, that this variable is
+ * also set in main_loop() later in the boot process. The
+ * version variable has to be set this early, because so it
+ * could be used in script files on an usb stick, which
+ * might be called during do_auto_update() */
+ extern char version_string[];
+
+ setenv ("ver", version_string);
+ }
+#endif /* CONFIG_VERSION_VARIABLE */
+
#ifdef CONFIG_AUTO_UPDATE
extern int do_auto_update(void);
/* this has priority over all else */