diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_bootm.c | 6 | ||||
-rw-r--r-- | common/cmd_load.c | 15 | ||||
-rw-r--r-- | common/cmd_mp.c | 4 | ||||
-rw-r--r-- | common/cmd_onenand.c | 6 | ||||
-rw-r--r-- | common/env_onenand.c | 3 | ||||
-rw-r--r-- | common/image.c | 3 | ||||
-rw-r--r-- | common/lcd.c | 2 |
7 files changed, 14 insertions, 25 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 18d7100..5295969 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -138,7 +138,6 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) memset ((void *)&images, 0, sizeof (images)); images.verify = getenv_yesno ("verify"); - images.autostart = getenv_yesno ("autostart"); images.lmb = &lmb; lmb_init(&lmb); @@ -362,10 +361,9 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) show_boot_progress (-9); #ifdef DEBUG puts ("\n## Control returned to monitor - resetting...\n"); - if (images.autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); #endif - if (!images.autostart && iflag) + if (iflag) enable_interrupts(); return 1; diff --git a/common/cmd_load.c b/common/cmd_load.c index 1b75a7b..ab167f5 100644 --- a/common/cmd_load.c +++ b/common/cmd_load.c @@ -424,7 +424,6 @@ write_record (char *buf) #define untochar(x) ((int) (((x) - SPACE) & 0xff)) extern int os_data_count; -extern int os_data_header[8]; static void set_kerm_bin_mode(unsigned long *); static int k_recv(void); @@ -631,11 +630,6 @@ void send_nack (int n) } -/* os_data_* takes an OS Open image and puts it into memory, and - puts the boot header in an array named os_data_header - - if image is binary, no header is stored in os_data_header. -*/ void (*os_data_init) (void); void (*os_data_char) (char new_char); static int os_data_state, os_data_state_saved; @@ -643,25 +637,28 @@ int os_data_count; static int os_data_count_saved; static char *os_data_addr, *os_data_addr_saved; static char *bin_start_address; -int os_data_header[8]; + static void bin_data_init (void) { os_data_state = 0; os_data_count = 0; os_data_addr = bin_start_address; } + static void os_data_save (void) { os_data_state_saved = os_data_state; os_data_count_saved = os_data_count; os_data_addr_saved = os_data_addr; } + static void os_data_restore (void) { os_data_state = os_data_state_saved; os_data_count = os_data_count_saved; os_data_addr = os_data_addr_saved; } + static void bin_data_char (char new_char) { switch (os_data_state) { @@ -671,6 +668,7 @@ static void bin_data_char (char new_char) break; } } + static void set_kerm_bin_mode (unsigned long *addr) { bin_start_address = (char *) addr; @@ -686,16 +684,19 @@ void k_data_init (void) k_data_escape = 0; os_data_init (); } + void k_data_save (void) { k_data_escape_saved = k_data_escape; os_data_save (); } + void k_data_restore (void) { k_data_escape = k_data_escape_saved; os_data_restore (); } + void k_data_char (char new_char) { if (k_data_escape) { diff --git a/common/cmd_mp.c b/common/cmd_mp.c index b2a397c..c8444fb 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -34,9 +34,9 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } cpuid = simple_strtoul(argv[1], NULL, 10); - if (cpuid >= CONFIG_NR_CPUS) { + if (cpuid >= CONFIG_NUM_CPUS) { printf ("Core num: %lu is out of range[0..%d]\n", - cpuid, CONFIG_NR_CPUS - 1); + cpuid, CONFIG_NUM_CPUS - 1); return 1; } diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c index ce99a38..d6d3376 100644 --- a/common/cmd_onenand.c +++ b/common/cmd_onenand.c @@ -58,8 +58,6 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } else { start = simple_strtoul(argv[2], NULL, 10); end = simple_strtoul(argv[3], NULL, 10); - start -= (unsigned long)onenand_chip.base; - end -= (unsigned long)onenand_chip.base; start >>= onenand_chip.erase_shift; end >>= onenand_chip.erase_shift; @@ -92,8 +90,6 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) size_t retlen = 0; int oob = strncmp(argv[1], "read.oob", 8) ? 0 : 1; - ofs -= (unsigned long)onenand_chip.base; - if (oob) onenand_read_oob(&onenand_mtd, ofs, len, &retlen, (u_char *) addr); @@ -111,8 +107,6 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) size_t len = simple_strtoul(argv[4], NULL, 16); size_t retlen = 0; - ofs -= (unsigned long)onenand_chip.base; - onenand_write(&onenand_mtd, ofs, len, &retlen, (u_char *) addr); printf("Done\n"); diff --git a/common/env_onenand.c b/common/env_onenand.c index ad5b1d7..dbd0883 100644 --- a/common/env_onenand.c +++ b/common/env_onenand.c @@ -66,7 +66,6 @@ void env_relocate_spec(void) size_t retlen; env_addr = CFG_ENV_ADDR; - env_addr -= (unsigned long) onenand_chip.base; /* Check OneNAND exist */ if (onenand_mtd.oobblock) @@ -101,7 +100,6 @@ int saveenv(void) instr.len = CFG_ENV_SIZE; instr.addr = env_addr; - instr.addr -= (unsigned long)onenand_chip.base; if (onenand_erase(&onenand_mtd, &instr)) { printf("OneNAND: erase failed at 0x%08lx\n", env_addr); return 1; @@ -111,7 +109,6 @@ int saveenv(void) env_ptr->crc = crc32(0, env_ptr->data, ONENAND_ENV_SIZE(onenand_mtd)); - env_addr -= (unsigned long)onenand_chip.base; if (onenand_write(&onenand_mtd, env_addr, onenand_mtd.oobblock, &retlen, (u_char *) env_ptr)) { printf("OneNAND: write failed at 0x%08x\n", instr.addr); diff --git a/common/image.c b/common/image.c index 535c302..6d2ce32 100644 --- a/common/image.c +++ b/common/image.c @@ -189,7 +189,6 @@ int image_check_dcrc (image_header_t *hdr) return (dcrc == image_get_dcrc (hdr)); } - /** * image_multi_count - get component (sub-image) count * @hdr: pointer to the header of the multi component image @@ -833,7 +832,7 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, rd_noffset = fit_conf_get_ramdisk_node (fit_hdr, cfg_noffset); if (rd_noffset < 0) { debug ("* ramdisk: no ramdisk in config\n"); - return 1; + return 0; } } #endif diff --git a/common/lcd.c b/common/lcd.c index e3347ec..8d770f3 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -793,7 +793,7 @@ static void *lcd_logo (void) sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__); lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info)); - sprintf (info, "(C) 2004 DENX Software Engineering"); + sprintf (info, "(C) 2008 DENX Software Engineering GmbH"); lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT, (uchar *)info, strlen(info)); |