Commit 4b9206ed authored by wdenk's avatar wdenk

* Patches by Thomas Viehweger, 16 Mar 2004:

  - show PCI clock frequency on MPC8260 systems
  - add FCC_PSMR_RMII flag for HiP7 processors
  - in do_jffs2_fsload(), take load address from load_addr if not set
    explicit, update load_addr otherwise
  - replaced printf by putc/puts when no formatting is needed
    (smaller code size, faster execution)
parent 109c0e3a
......@@ -2,6 +2,14 @@
Changes for U-Boot 1.0.2:
======================================================================
* Patches by Thomas Viehweger, 16 Mar 2004:
- show PCI clock frequency on MPC8260 systems
- add FCC_PSMR_RMII flag for HiP7 processors
- in do_jffs2_fsload(), take load address from load_addr if not set
explicit, update load_addr otherwise
- replaced printf by putc/puts when no formatting is needed
(smaller code size, faster execution)
* Patch by Phillippe Robin, 16 Mar 2004:
avoid dereferencing NULL pointer in lib_arm/armlinux.c
......
......@@ -68,7 +68,7 @@ autoscript (ulong addr)
memmove (hdr, (char *)addr, sizeof(image_header_t));
if (ntohl(hdr->ih_magic) != IH_MAGIC) {
printf ("Bad magic number\n");
puts ("Bad magic number\n");
return 1;
}
......@@ -77,7 +77,7 @@ autoscript (ulong addr)
len = sizeof (image_header_t);
data = (ulong)hdr;
if (crc32(0, (char *)data, len) != crc) {
printf ("Bad header crc\n");
puts ("Bad header crc\n");
return 1;
}
......@@ -86,13 +86,13 @@ autoscript (ulong addr)
if (verify) {
if (crc32(0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
printf ("Bad data crc\n");
puts ("Bad data crc\n");
return 1;
}
}
if (hdr->ih_type != IH_TYPE_SCRIPT) {
printf ("Bad image type\n");
puts ("Bad image type\n");
return 1;
}
......@@ -100,7 +100,7 @@ autoscript (ulong addr)
len_ptr = (ulong *)data;
if ((len = ntohl(*len_ptr)) == 0) {
printf ("Empty Script\n");
puts ("Empty Script\n");
return 1;
}
......
......@@ -77,19 +77,19 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif
print_str ("busfreq", strmhz(buf, bd->bi_busfreq));
#endif /* CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300 */
printf ("ethaddr =");
puts ("ethaddr =");
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
#if (defined CONFIG_PN62) || (defined CONFIG_PPCHAMELEONEVB) \
|| (defined CONFIG_MPC8540ADS) || (defined CONFIG_MPC8560ADS)
printf ("\neth1addr =");
puts ("\neth1addr =");
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enet1addr[i]);
}
#endif /* CONFIG_PN62 */
#if defined(CONFIG_MPC8540ADS) || defined(CONFIG_MPC8560ADS)
printf ("\neth2addr =");
puts ("\neth2addr =");
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enet2addr[i]);
}
......@@ -97,7 +97,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#ifdef CONFIG_HERMES
print_str ("ethspeed", strmhz(buf, bd->bi_ethspeed));
#endif
printf ("\nIP addr = "); print_IPaddr (bd->bi_ip_addr);
puts ("\nIP addr = "); print_IPaddr (bd->bi_ip_addr);
printf ("\nbaudrate = %6ld bps\n", bd->bi_baudrate );
return 0;
}
......@@ -117,11 +117,11 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_num ("flashsize", (ulong)bd->bi_flashsize);
print_num ("flashoffset", (ulong)bd->bi_flashoffset);
printf ("ethaddr =");
puts ("ethaddr =");
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
printf ("\nip_addr = ");
puts ("\nip_addr = ");
print_IPaddr (bd->bi_ip_addr);
printf ("\nbaudrate = %ld bps\n", bd->bi_baudrate);
......@@ -145,11 +145,11 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_num ("flashsize", (ulong)bd->bi_flashsize);
print_num ("flashoffset", (ulong)bd->bi_flashoffset);
printf ("ethaddr =");
puts ("ethaddr =");
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
printf ("\nip_addr = ");
puts ("\nip_addr = ");
print_IPaddr (bd->bi_ip_addr);
printf ("\nbaudrate = %d bps\n", bd->bi_baudrate);
......@@ -176,14 +176,14 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_num("-> size", bd->bi_dram[i].size);
}
printf ("ethaddr =");
puts ("ethaddr =");
for (i=0; i<6; ++i) {
printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
}
printf ("\n"
puts ( "\n"
"ip_addr = ");
print_IPaddr (bd->bi_ip_addr);
printf ("\n"
puts ( "\n"
"baudrate = %d bps\n", bd->bi_baudrate);
return 0;
......
......@@ -184,7 +184,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
} else
#endif /* __I386__ */
{
printf ("Bad Magic Number\n");
puts ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-1);
return 1;
}
......@@ -198,7 +198,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
hdr->ih_hcrc = 0;
if (crc32 (0, (char *)data, len) != checksum) {
printf ("Bad Header Checksum\n");
puts ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-2);
return 1;
}
......@@ -218,13 +218,13 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif
if (verify) {
printf (" Verifying Checksum ... ");
puts (" Verifying Checksum ... ");
if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
printf ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-3);
return 1;
}
printf ("OK\n");
puts ("OK\n");
}
SHOW_BOOT_PROGRESS (4);
......@@ -325,7 +325,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf (" Uncompressing %s ... ", name);
if (gunzip ((void *)ntohl(hdr->ih_load), unc_len,
(uchar *)data, (int *)&len) != 0) {
printf ("GUNZIP ERROR - must RESET board to recover\n");
puts ("GUNZIP ERROR - must RESET board to recover\n");
SHOW_BOOT_PROGRESS (-6);
do_reset (cmdtp, flag, argc, argv);
}
......@@ -356,7 +356,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
SHOW_BOOT_PROGRESS (-7);
return 1;
}
printf ("OK\n");
puts ("OK\n");
SHOW_BOOT_PROGRESS (7);
switch (hdr->ih_type) {
......@@ -435,7 +435,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
SHOW_BOOT_PROGRESS (-9);
#ifdef DEBUG
printf ("\n## Control returned to monitor - resetting...\n");
puts ("\n## Control returned to monitor - resetting...\n");
do_reset (cmdtp, flag, argc, argv);
#endif
return 1;
......@@ -597,7 +597,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
memmove (&header, (char *)addr, sizeof(image_header_t));
if (hdr->ih_magic != IH_MAGIC) {
printf ("Bad Magic Number\n");
puts ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-10);
do_reset (cmdtp, flag, argc, argv);
}
......@@ -609,7 +609,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
hdr->ih_hcrc = 0;
if (crc32 (0, (char *)data, len) != checksum) {
printf ("Bad Header Checksum\n");
puts ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-11);
do_reset (cmdtp, flag, argc, argv);
}
......@@ -627,7 +627,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
ulong cdata = data, edata = cdata + len;
#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
printf (" Verifying Checksum ... ");
puts (" Verifying Checksum ... ");
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
......@@ -646,11 +646,11 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
if (csum != hdr->ih_dcrc) {
printf ("Bad Data CRC\n");
puts ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-12);
do_reset (cmdtp, flag, argc, argv);
}
printf ("OK\n");
puts ("OK\n");
}
SHOW_BOOT_PROGRESS (11);
......@@ -658,7 +658,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_PPC) ||
(hdr->ih_type != IH_TYPE_RAMDISK) ) {
printf ("No Linux PPC Ramdisk Image\n");
puts ("No Linux PPC Ramdisk Image\n");
SHOW_BOOT_PROGRESS (-13);
do_reset (cmdtp, flag, argc, argv);
}
......@@ -756,7 +756,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
memmove ((void *)initrd_start, (void *)data, len);
#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
printf ("OK\n");
puts ("OK\n");
}
} else {
initrd_start = 0;
......@@ -1014,7 +1014,7 @@ static int image_info (ulong addr)
memmove (&header, (char *)addr, sizeof(image_header_t));
if (ntohl(hdr->ih_magic) != IH_MAGIC) {
printf (" Bad Magic Number\n");
puts (" Bad Magic Number\n");
return 1;
}
......@@ -1025,7 +1025,7 @@ static int image_info (ulong addr)
hdr->ih_hcrc = 0;
if (crc32 (0, (char *)data, len) != checksum) {
printf (" Bad Header Checksum\n");
puts (" Bad Header Checksum\n");
return 1;
}
......@@ -1035,12 +1035,12 @@ static int image_info (ulong addr)
data = addr + sizeof(image_header_t);
len = ntohl(hdr->ih_size);
printf (" Verifying Checksum ... ");
puts (" Verifying Checksum ... ");
if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
printf (" Bad Data CRC\n");
puts (" Bad Data CRC\n");
return 1;
}
printf ("OK\n");
puts ("OK\n");
return 0;
}
......@@ -1091,11 +1091,11 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
data = (ulong)hdr + sizeof(image_header_t);
len = ntohl(hdr->ih_size);
printf (" Verifying Checksum ... ");
puts (" Verifying Checksum ... ");
if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
printf (" Bad Data CRC\n");
puts (" Bad Data CRC\n");
}
printf ("OK\n");
puts ("OK\n");
next_sector: ;
}
next_bank: ;
......@@ -1128,18 +1128,19 @@ print_image_hdr (image_header_t *hdr)
tm.tm_year, tm.tm_mon, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
#endif /* CFG_CMD_DATE, CONFIG_TIMESTAMP */
printf (" Image Type: "); print_type(hdr); printf ("\n");
printf (" Data Size: %d Bytes = ", ntohl(hdr->ih_size));
puts (" Image Type: "); print_type(hdr);
printf ("\n Data Size: %d Bytes = ", ntohl(hdr->ih_size));
print_size (ntohl(hdr->ih_size), "\n");
printf (" Load Address: %08x\n", ntohl(hdr->ih_load));
printf (" Entry Point: %08x\n", ntohl(hdr->ih_ep));
printf (" Load Address: %08x\n"
" Entry Point: %08x\n",
ntohl(hdr->ih_load), ntohl(hdr->ih_ep));
if (hdr->ih_type == IH_TYPE_MULTI) {
int i;
ulong len;
ulong *len_ptr = (ulong *)((ulong)hdr + sizeof(image_header_t));
printf (" Contents:\n");
puts (" Contents:\n");
for (i=0; (len = ntohl(*len_ptr)); ++i, ++len_ptr) {
printf (" Image %d: %8ld Bytes = ", i, len);
print_size (len, "\n");
......@@ -1244,7 +1245,7 @@ int gunzip(void *dst, int dstlen, unsigned char *src, int *lenp)
i = 10;
flags = src[3];
if (src[2] != DEFLATED || (flags & RESERVED) != 0) {
printf ("Error: Bad gzipped data\n");
puts ("Error: Bad gzipped data\n");
return (-1);
}
if ((flags & EXTRA_FIELD) != 0)
......@@ -1258,7 +1259,7 @@ int gunzip(void *dst, int dstlen, unsigned char *src, int *lenp)
if ((flags & HEAD_CRC) != 0)
i += 2;
if (i >= *lenp) {
printf ("Error: gunzip out of data in header\n");
puts ("Error: gunzip out of data in header\n");
return (-1);
}
......
......@@ -47,14 +47,14 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
switch (argc) {
case 2: /* set date & time */
if (strcmp(argv[1],"reset") == 0) {
printf ("Reset RTC...\n");
puts ("Reset RTC...\n");
rtc_reset ();
} else {
/* initialize tm with current time */
rtc_get (&tm);
/* insert new date & time */
if (mk_date (argv[1], &tm) != 0) {
printf ("## Bad date format\n");
puts ("## Bad date format\n");
return 1;
}
/* and write to RTC */
......
......@@ -37,11 +37,11 @@ int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
if (argc == 1 || strcmp (argv[1], "run") != 0) {
/* List test info */
if (argc == 1) {
printf ("Available hardware tests:\n");
puts ("Available hardware tests:\n");
post_info (NULL);
printf ("Use 'diag [<test1> [<test2> ...]]'"
puts ("Use 'diag [<test1> [<test2> ...]]'"
" to get more info.\n");
printf ("Use 'diag run [<test1> [<test2> ...]]'"
puts ("Use 'diag run [<test1> [<test2> ...]]'"
" to run tests.\n");
} else {
for (i = 1; i < argc; i++) {
......
......@@ -75,7 +75,7 @@ int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
rcode = eeprom_read (dev_addr, off, (uchar *) addr, cnt);
printf ("done\n");
puts ("done\n");
return rcode;
} else if (strcmp (argv[1], "write") == 0) {
int rcode;
......@@ -84,7 +84,7 @@ int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
rcode = eeprom_write (dev_addr, off, (uchar *) addr, cnt);
printf ("done\n");
puts ("done\n");
return rcode;
}
}
......@@ -295,7 +295,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn
#endif
}
if (i == MAX_ACKNOWLEDGE_POLLS) {
printf("EEPROM poll acknowledge failed\n");
puts ("EEPROM poll acknowledge failed\n");
rcode = 1;
}
}
......
......@@ -103,7 +103,7 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if ((tmp = getenv ("loadaddr")) != NULL) {
addr = simple_strtoul (tmp, NULL, 16);
} else {
printf ("No load address provided\n");
puts ("No load address provided\n");
return 1;
}
......@@ -133,7 +133,7 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
tmp = (char *) CFG_ETHERNET_MAC_ADDR;
memcpy ((char *) tmp, (char *) &gd->bd->bi_enetaddr[0], 6);
#else
printf ("## Ethernet MAC address not copied to NV RAM\n");
puts ("## Ethernet MAC address not copied to NV RAM\n");
#endif
/*
......@@ -200,7 +200,7 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* to just copy
*/
printf ("No bootargs defined\n");
puts ("No bootargs defined\n");
return 1;
#endif
}
......@@ -214,7 +214,7 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (valid_elf_image (addr)) {
addr = load_elf_image (addr);
} else {
printf ("## Not an ELF image, assuming binary\n");
puts ("## Not an ELF image, assuming binary\n");
/* leave addr as load_addr */
}
......@@ -224,7 +224,7 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
((void (*)(void)) addr) ();
printf ("## vxWorks terminated\n");
puts ("## vxWorks terminated\n");
return 1;
}
......
......@@ -149,14 +149,14 @@ flash_fill_sect_ranges (ulong addr_first, ulong addr_last,
if (addr_last > b_end) {
s_last[bank] = s_end;
} else {
printf ("Error: end address"
puts ("Error: end address"
" not on sector boundary\n");
rcode = 1;
break;
}
}
if (s_last[bank] < s_first[bank]) {
printf ("Error: end sector"
puts ("Error: end sector"
" precedes start sector\n");
rcode = 1;
break;
......@@ -165,7 +165,7 @@ flash_fill_sect_ranges (ulong addr_first, ulong addr_last,
addr_first = (sect == s_end) ? b_end + 1: info->start[sect + 1];
(*s_count) += s_last[bank] - s_first[bank] + 1;
} else if (s_last[bank] >= 0) {
printf("Error: cannot span across banks when they are"
puts ("Error: cannot span across banks when they are"
" mapped in reverse order\n");
rcode = 1;
break;
......@@ -225,7 +225,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if ((n = abbrev_spec(argv[1], &info, &sect_first, &sect_last)) != 0) {
if (n < 0) {
printf("Bad sector specification\n");
puts ("Bad sector specification\n");
return 1;
}
printf ("Erase Flash Sectors %d-%d in Bank # %d ",
......@@ -294,7 +294,7 @@ int flash_sect_erase (ulong addr_first, ulong addr_last)
}
printf ("Erased %d sectors\n", erased);
} else if (rcode == 0) {
printf ("Error: start and/or end address"
puts ("Error: start and/or end address"
" not on sector boundary\n");
rcode = 1;
}
......@@ -332,7 +332,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (addr_dataflash(addr_first) && addr_dataflash(addr_last)) {
status = dataflash_real_protect(p,addr_first,addr_last);
if (status < 0){
printf("Bad DataFlash sector specification\n");
puts ("Bad DataFlash sector specification\n");
return 1;
}
printf("%sProtect %d DataFlash Sectors\n",
......@@ -371,7 +371,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if ((n = abbrev_spec(argv[2], &info, &sect_first, &sect_last)) != 0) {
if (n < 0) {
printf("Bad sector specification\n");
puts ("Bad sector specification\n");
return 1;
}
printf("%sProtect Flash Sectors %d-%d in Bank # %d\n",
......@@ -411,7 +411,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
info = &flash_info[bank-1];
if (info->flash_id == FLASH_UNKNOWN) {
printf ("missing or unknown FLASH type\n");
puts ("missing or unknown FLASH type\n");
return 1;
}
for (i=0; i<info->sector_count; ++i) {
......@@ -485,7 +485,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
printf ("%sProtected %d sectors\n",
p ? "" : "Un-", protected);
} else if (rcode == 0) {
printf ("Error: start and/or end address"
puts ("Error: start and/or end address"
" not on sector boundary\n");
rcode = 1;
}
......
This diff is collapsed.
......@@ -107,7 +107,7 @@ do_memcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#if defined(CONFIG_8xx)
printf (" MCR = %08x\n", memctl->memc_mcr);
#elif defined(CONFIG_8260)
printf ("\n");
putc ('\n');
#endif
printf ("MAMR = %08x MBMR = %08x",
memctl->memc_mamr, memctl->memc_mbmr);
......@@ -325,7 +325,7 @@ do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
iopin_t iopin;
if (argc != 5) {
printf ("iopset PORT PIN CMD VALUE\n");
puts ("iopset PORT PIN CMD VALUE\n");
return 1;
}
port = argv[1][0] - 'A';
......@@ -529,7 +529,7 @@ do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf ("I2CER = %02x I2CMR = %02x\n", i2c->i2c_i2cer, i2c->i2c_i2cmr);
if (iip == NULL)
printf ("i2c parameter ram not allocated\n");
puts ("i2c parameter ram not allocated\n");
else {
printf ("RBASE = %08x TBASE = %08x\n",
iip->iic_rbase, iip->iic_tbase);
......
......@@ -98,7 +98,7 @@ do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char *fsname;
char *filename = "uImage";
ulong offset = CFG_LOAD_ADDR;
ulong offset = load_addr;
int size;
struct part_info *part;
......@@ -107,6 +107,7 @@ do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
if (argc == 3) {
offset = simple_strtoul(argv[1], NULL, 16);
load_addr = offset;
filename = argv[2];
}
......@@ -135,7 +136,7 @@ do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return !(size > 0);
}
printf("Active partition not valid\n");
puts ("Active partition not valid\n");
return 0;
}
......@@ -164,7 +165,7 @@ do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return (ret == 1);
}
printf("Active partition not valid\n");
puts ("Active partition not valid\n");
return 0;
}
......@@ -192,7 +193,7 @@ do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return (ret == 1);
}
printf("Active partition not valid\n");
puts ("Active partition not valid\n");
return 0;
}
......@@ -206,7 +207,7 @@ do_jffs2_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (argc >= 2) {
tmp_part = simple_strtoul(argv[1], NULL, 16);
}else{
printf("Need partition number in argument list\n");
puts ("Need partition number in argument list\n");
return 0;
}
......
......@@ -178,16 +178,16 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#ifdef CONFIG_HAS_DATAFLASH
}
#endif
printf(" ");
puts (" ");
cp = linebuf;
for (i=0; i<linebytes; i++) {
if ((*cp < 0x20) || (*cp > 0x7e))
printf(".");
putc ('.');
else
printf("%c", *cp);
cp++;
}
printf("\n");
putc ('\n');
nbytes -= linebytes;
if (ctrlc()) {
rc = 1;
......@@ -279,7 +279,7 @@ int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#ifdef CONFIG_HAS_DATAFLASH
if (addr_dataflash(addr1) | addr_dataflash(addr2)){
printf("Comparison with DataFlash space not supported.\n\r");
puts ("Comparison with DataFlash space not supported.\n\r");
return 0;
}
#endif
......@@ -368,7 +368,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
) {
int rc;
printf ("Copy to Flash... ");
puts ("Copy to Flash... ");
rc = flash_write ((uchar *)addr, dest, count*size);
if (rc != 0) {
......@@ -384,13 +384,13 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (mmc2info(dest)) {
int rc;
printf ("Copy to MMC... ");
puts ("Copy to MMC... ");
switch (rc = mmc_write ((uchar *)addr, dest, count*size)) {
case 0:
printf ("\n");
putc ('\n');
return 1;
case -1:
printf("failed\n");
puts ("failed\n");
return 1;
default:
printf ("%s[%d] FIXME: rc=%d\n",__FILE__,__LINE__,rc);
......@@ -403,13 +403,13 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (mmc2info(addr)) {
int rc;
printf ("Copy from MMC... ");
puts ("Copy from MMC... ");
switch (rc = mmc_read (addr, (uchar *)dest, count*size)) {
case 0:
printf ("\n");
putc ('\n');
return 1;
case -1:
printf("failed\n");
puts ("failed\n");
return 1;
default:
printf ("%s[%d] FIXME: rc=%d\n",__FILE__,__LINE__,rc);
......@@ -425,7 +425,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (addr_dataflash(dest) && !addr_dataflash(addr)){
int rc;
printf ("Copy to DataFlash... ");
puts ("Copy to DataFlash... ");
rc = write_dataflash (dest, addr, count*size);
......@@ -449,7 +449,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
if (addr_dataflash(addr) && addr_dataflash(dest)){
printf("Unsupported combination of source/destination.\n\r");
puts ("Unsupported combination of source/destination.\n\r");
return 1;
}
#endif
......@@ -828,7 +828,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
val += incr;
}
printf("Reading...");
puts ("Reading...");
for (addr=start,val=pattern; addr<end; addr++) {
readback = *addr;
......@@ -902,7 +902,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
#ifdef CONFIG_HAS_DATAFLASH
if (addr_dataflash(addr)){
printf("Can't modify DataFlash in place. Use cp instead.\n\r");
puts ("Can't modify DataFlash in place. Use cp instead.\n\r");
return 0;
}
#endif
......
......@@ -109,13 +109,13 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
}
} else if (op == 'r') {
if (miiphy_read (addr, reg, &data) != 0) {
printf ("Error reading from the PHY\n");
puts ("Error reading from the PHY\n");
rcode = 1;
}
printf ("%04X\n", data & 0x0000FFFF);
} else if (op == 'w') {
if (miiphy_write (addr, reg, data) != 0) {
printf ("Error writing to the PHY\n");
puts ("Error writing to the PHY\n");
rcode = 1;
}
} else {
......
......@@ -44,9 +44,9 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* other useful registers
*/
printf("\nSystem Configuration registers\n");
printf ("\nSystem Configuration registers\n"
printf("\tIMMR\t0x%08X\n", get_immr(0));
"\tIMMR\t0x%08X\n", get_immr(0));
printf("\tSIUMCR\t0x%08X", sysconf->sc_siumcr);
printf("\tSYPCR\t0x%08X\n",sysconf->sc_sypcr);
......@@ -61,9 +61,9 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf("\tTESR\t0x%08X\tSDCR\t0x%08X\n",
sysconf->sc_tesr, sysconf->sc_sdcr);
printf(