From a8421600d1d1a03a322e45b00db318dbf80fa03f Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 5 Jul 2007 18:01:28 +0200 Subject: svn_rev_152 remove global data gd_t and board info bd_t entirely for arm --- arch/arm/lib/armlinux.c | 33 ++++++++++++++++----------------- arch/arm/lib/board.c | 8 -------- 2 files changed, 16 insertions(+), 25 deletions(-) (limited to 'arch/arm/lib') diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index 432b4fb8c2..323948f204 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -40,18 +40,18 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); defined (CONFIG_REVISION_TAG) || \ defined (CONFIG_VFD) || \ defined (CONFIG_LCD) -static void setup_start_tag (bd_t *bd); +static void setup_start_tag (void); # ifdef CONFIG_SETUP_MEMORY_TAGS -static void setup_memory_tags (bd_t *bd); +static void setup_memory_tags (void); # endif -static void setup_commandline_tag (bd_t *bd, char *commandline); +static void setup_commandline_tag (char *commandline); # ifdef CONFIG_INITRD_TAG -static void setup_initrd_tag (bd_t *bd, ulong initrd_start, +static void setup_initrd_tag (ulong initrd_start, ulong initrd_end); # endif -static void setup_end_tag (bd_t *bd); +static void setup_end_tag (void); # if defined (CONFIG_VFD) || defined (CONFIG_LCD) static void setup_videolfb_tag (gd_t *gd); @@ -79,7 +79,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], ulong data; void (*theKernel)(int zero, int arch, uint params); image_header_t *hdr = &header; - bd_t *bd = gd->bd; #ifdef CONFIG_CMDLINE_TAG char *commandline = getenv ("bootargs"); @@ -214,7 +213,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], defined (CONFIG_REVISION_TAG) || \ defined (CONFIG_LCD) || \ defined (CONFIG_VFD) - setup_start_tag (bd); + setup_start_tag (); #ifdef CONFIG_SERIAL_TAG setup_serial_tag (¶ms); #endif @@ -222,19 +221,19 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], setup_revision_tag (¶ms); #endif #ifdef CONFIG_SETUP_MEMORY_TAGS - setup_memory_tags (bd); + setup_memory_tags (); #endif #ifdef CONFIG_CMDLINE_TAG - setup_commandline_tag (bd, commandline); + setup_commandline_tag (commandline); #endif #ifdef CONFIG_INITRD_TAG if (initrd_start && initrd_end) - setup_initrd_tag (bd, initrd_start, initrd_end); + setup_initrd_tag (initrd_start, initrd_end); #endif #if defined (CONFIG_VFD) || defined (CONFIG_LCD) setup_videolfb_tag ((gd_t *) gd); #endif - setup_end_tag (bd); + setup_end_tag (); #endif /* we assume that the kernel is in place */ @@ -260,9 +259,9 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], defined (CONFIG_REVISION_TAG) || \ defined (CONFIG_LCD) || \ defined (CONFIG_VFD) -static void setup_start_tag (bd_t *bd) +static void setup_start_tag (void) { - params = (struct tag *) bd->bi_boot_params; + params = (struct tag *) CONFIG_BOOT_PARAMS; params->hdr.tag = ATAG_CORE; params->hdr.size = tag_size (tag_core); @@ -276,7 +275,7 @@ static void setup_start_tag (bd_t *bd) #ifdef CONFIG_SETUP_MEMORY_TAGS -static void setup_memory_tags (bd_t *bd) +static void setup_memory_tags (void) { struct device_d *dev = NULL; @@ -298,7 +297,7 @@ static void setup_memory_tags (bd_t *bd) #endif /* CONFIG_SETUP_MEMORY_TAGS */ -static void setup_commandline_tag (bd_t *bd, char *commandline) +static void setup_commandline_tag (char *commandline) { char *p; @@ -325,7 +324,7 @@ static void setup_commandline_tag (bd_t *bd, char *commandline) #ifdef CONFIG_INITRD_TAG -static void setup_initrd_tag (bd_t *bd, ulong initrd_start, ulong initrd_end) +static void setup_initrd_tag (ulong initrd_start, ulong initrd_end) { /* an ATAG_INITRD node tells the kernel where the compressed * ramdisk can be found. ATAG_RDIMG is a better name, actually. @@ -396,7 +395,7 @@ void setup_revision_tag(struct tag **in_params) #endif /* CONFIG_REVISION_TAG */ -static void setup_end_tag (bd_t *bd) +static void setup_end_tag (void) { params->hdr.tag = ATAG_NONE; params->hdr.size = 0; diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index b573b5a068..8dc42ab905 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -147,15 +147,9 @@ void start_armboot (void) int result; int i = 'a'; - /* Pointer is writable since we allocated a register for it */ - gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t)); /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __volatile__("": : :"memory"); - memset ((void*)gd, 0, sizeof (gd_t)); - gd->bd = (bd_t*)((char*)gd - sizeof(bd_t)); - memset (gd->bd, 0, sizeof (bd_t)); - monitor_flash_len = _bss_start - _armboot_start; /* armboot_start is defined in the board-specific linker script */ @@ -170,8 +164,6 @@ void start_armboot (void) display_banner(); - jumptable_init (); - /* enable exceptions */ enable_interrupts (); -- cgit v1.2.3