summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/cmd_autoscript.c10
-rw-r--r--common/cmd_bdinfo.c22
-rw-r--r--common/cmd_bootm.c59
-rw-r--r--common/cmd_date.c4
-rw-r--r--common/cmd_diag.c6
-rw-r--r--common/cmd_eeprom.c6
-rw-r--r--common/cmd_elf.c10
-rw-r--r--common/cmd_flash.c18
-rw-r--r--common/cmd_i2c.c228
-rw-r--r--common/cmd_immap.c6
-rw-r--r--common/cmd_jffs2.c11
-rw-r--r--common/cmd_mem.c30
-rw-r--r--common/cmd_mii.c4
-rw-r--r--common/cmd_reginfo.c51
-rw-r--r--common/console.c24
-rw-r--r--common/main.c10
-rw-r--r--common/miiphybb.c2
-rw-r--r--common/miiphyutil.c16
18 files changed, 259 insertions, 258 deletions
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
index 4894dab..2d1f431 100644
--- a/common/cmd_autoscript.c
+++ b/common/cmd_autoscript.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;
}
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index cd192b0..2a653d8 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -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;
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 72553aa..b060491 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -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);
}
diff --git a/common/cmd_date.c b/common/cmd_date.c
index 4648a0e..a569d78 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -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 */
diff --git a/common/cmd_diag.c b/common/cmd_diag.c
index 861f005..45c4b31 100644
--- a/common/cmd_diag.c
+++ b/common/cmd_diag.c
@@ -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++) {
diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c
index 5193b13..80b8ccc 100644
--- a/common/cmd_eeprom.c
+++ b/common/cmd_eeprom.c
@@ -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;
}
}
diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index f039724..eb0cc71 100644
--- a/common/cmd_elf.c
+++ b/common/cmd_elf.c
@@ -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;
}
diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index e5b1ca1..5ecf888 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -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;
}
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 6a9c77a..9c02ceb 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -186,7 +186,7 @@ int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
if(i2c_read(chip, addr, alen, linebuf, linebytes) != 0) {
- printf("Error reading the chip.\n");
+ puts ("Error reading the chip.\n");
} else {
printf("%04x:", addr);
cp = linebuf;
@@ -194,16 +194,16 @@ int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf(" %02x", *cp++);
addr++;
}
- printf(" ");
+ puts (" ");
cp = linebuf;
for (j=0; j<linebytes; j++) {
if ((*cp < 0x20) || (*cp > 0x7e))
- printf(".");
+ puts (".");
else
printf("%c", *cp);
cp++;
}
- printf("\n");
+ putc ('\n');
}
nbytes -= linebytes;
} while (nbytes > 0);
@@ -285,7 +285,7 @@ int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
while (count-- > 0) {
if(i2c_write(chip, addr++, alen, &byte, 1) != 0) {
- printf("Error writing the chip.\n");
+ puts ("Error writing the chip.\n");
}
/*
* Wait for the write to complete. The write can take
@@ -374,7 +374,7 @@ int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
if(err > 0)
{
- printf("Error reading the chip,\n");
+ puts ("Error reading the chip,\n");
} else {
printf ("%08lx\n", crc);
}
@@ -456,7 +456,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
do {
printf("%08lx:", addr);
if(i2c_read(chip, addr, alen, (char *)&data, size) != 0) {
- printf("\nError reading the chip,\n");
+ puts ("\nError reading the chip,\n");
} else {
data = cpu_to_be32(data);
if(size == 1) {
@@ -505,7 +505,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
reset_cmd_timeout();
#endif
if(i2c_write(chip, addr, alen, (char *)&data, size) != 0) {
- printf("Error writing the chip.\n");
+ puts ("Error writing the chip.\n");
}
#ifdef CFG_EEPROM_PAGE_WRITE_DELAY_MS
udelay(CFG_EEPROM_PAGE_WRITE_DELAY_MS * 1000);
@@ -534,7 +534,7 @@ int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int k, skip;
#endif
- printf("Valid chip addresses:");
+ puts ("Valid chip addresses:");
for(j = 0; j < 128; j++) {
#if defined(CFG_I2C_NOPROBES)
skip = 0;
@@ -551,13 +551,13 @@ int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf(" %02X", j);
}
}
- printf("\n");
+ putc ('\n');
#if defined(CFG_I2C_NOPROBES)
puts ("Excluded chip addresses:");
for( k = 0; k < sizeof(i2c_no_probes); k++ )
printf(" %02X", i2c_no_probes[k] );
- puts ("\n");
+ putc ('\n');
#endif
return 0;
@@ -629,7 +629,7 @@ int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
*/
while(1) {
if(i2c_read(chip, addr, alen, bytes, length) != 0) {
- printf("Error reading the chip.\n");
+ puts ("Error reading the chip.\n");
}
udelay(delay);
}
@@ -666,7 +666,7 @@ int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
chip = simple_strtoul(argv[1], NULL, 16);
if(i2c_read(chip, 0, 1, data, sizeof(data)) != 0) {
- printf("No SDRAM Serial Presence Detect found.\n");
+ puts ("No SDRAM Serial Presence Detect found.\n");
return 1;
}
@@ -683,19 +683,19 @@ int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
(data[62] >> 4) & 0x0F, data[62] & 0x0F);
printf("Bytes used 0x%02X\n", data[0]);
printf("Serial memory size 0x%02X\n", 1 << data[1]);
- printf("Memory type ");
+ puts ("Memory type ");
switch(data[2]) {
- case 2: printf("EDO\n"); break;
- case 4: printf("SDRAM\n"); break;
- default: printf("unknown\n"); break;
+ case 2: puts ("EDO\n"); break;
+ case 4: puts ("SDRAM\n"); break;
+ default: puts ("unknown\n"); break;
}
- printf("Row address bits ");
+ puts ("Row address bits ");
if((data[3] & 0x00F0) == 0) {
printf("%d\n", data[3] & 0x0F);
} else {
printf("%d/%d\n", data[3] & 0x0F, (data[3] >> 4) & 0x0F);
}
- printf("Column address bits ");
+ puts ("Column address bits ");
if((data[4] & 0x00F0) == 0) {
printf("%d\n", data[4] & 0x0F);
} else {
@@ -703,39 +703,39 @@ int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
printf("Module rows %d\n", data[5]);
printf("Module data width %d bits\n", (data[7] << 8) | data[6]);
- printf("Interface signal levels ");
+ puts ("Interface signal levels ");
switch(data[8]) {
- case 0: printf("5.0v/TTL\n"); break;
- case 1: printf("LVTTL\n"); break;
- case 2: printf("HSTL 1.5\n"); break;
- case 3: printf("SSTL 3.3\n"); break;
- case 4: printf("SSTL 2.5\n"); break;
- default: printf("unknown\n"); break;
+ case 0: puts ("5.0v/TTL\n"); break;
+ case 1: puts ("LVTTL\n"); break;
+ case 2: puts ("HSTL 1.5\n"); break;
+ case 3: puts ("SSTL 3.3\n"); break;
+ case 4: puts ("SSTL 2.5\n"); break;
+ default: puts ("unknown\n"); break;
}
printf("SDRAM cycle time %d.%d nS\n",
(data[9] >> 4) & 0x0F, data[9] & 0x0F);
printf("SDRAM access time %d.%d nS\n",
(data[10] >> 4) & 0x0F, data[10] & 0x0F);
- printf("EDC configuration ");
+ puts ("EDC configuration ");
switch(data[11]) {
- case 0: printf("None\n"); break;
- case 1: printf("Parity\n"); break;
- case 2: printf("ECC\n"); break;
- default: printf("unknown\n"); break;
+ case 0: puts ("None\n"); break;
+ case 1: puts ("Parity\n"); break;
+ case 2: puts ("ECC\n"); break;
+ default: puts ("unknown\n"); break;
}
if((data[12] & 0x80) == 0) {
- printf("No self refresh, rate ");
+ puts ("No self refresh, rate ");
} else {
- printf("Self refresh, rate ");
+ puts ("Self refresh, rate ");
}
switch(data[12] & 0x7F) {
- case 0: printf("15.625uS\n"); break;
- case 1: printf("3.9uS\n"); break;
- case 2: printf("7.8uS\n"); break;
- case 3: printf("31.3uS\n"); break;
- case 4: printf("62.5uS\n"); break;
- case 5: printf("125uS\n"); break;
- default: printf("unknown\n"); break;
+ case 0: puts ("15.625uS\n"); break;
+ case 1: puts ("3.9uS\n"); break;
+ case 2: puts ("7.8uS\n"); break;
+ case 3: puts ("31.3uS\n"); break;
+ case 4: puts ("62.5uS\n"); break;
+ case 5: puts ("125uS\n"); break;
+ default: puts ("unknown\n"); break;
}
printf("SDRAM width (primary) %d\n", data[13] & 0x7F);
if((data[13] & 0x80) != 0) {
@@ -752,65 +752,65 @@ int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
printf("Min clock delay, back-to-back random column addresses %d\n",
data[15]);
- printf("Burst length(s) ");
- if(data[16] & 0x80) printf(" Page");
- if(data[16] & 0x08) printf(" 8");
- if(data[16] & 0x04) printf(" 4");
- if(data[16] & 0x02) printf(" 2");
- if(data[16] & 0x01) printf(" 1");
- printf("\n");
+ puts ("Burst length(s) ");
+ if (data[16] & 0x80) puts (" Page");
+ if (data[16] & 0x08) puts (" 8");
+ if (data[16] & 0x04) puts (" 4");
+ if (data[16] & 0x02) puts (" 2");
+ if (data[16] & 0x01) puts (" 1");
+ putc ('\n');
printf("Number of banks %d\n", data[17]);
- printf("CAS latency(s) ");
- if(data[18] & 0x80) printf(" TBD");
- if(data[18] & 0x40) printf(" 7");
- if(data[18] & 0x20) printf(" 6");
- if(data[18] & 0x10) printf(" 5");
- if(data[18] & 0x08) printf(" 4");
- if(data[18] & 0x04) printf(" 3");
- if(data[18] & 0x02) printf(" 2");
- if(data[18] & 0x01) printf(" 1");
- printf("\n");
- printf("CS latency(s) ");
- if(data[19] & 0x80) printf(" TBD");
- if(data[19] & 0x40) printf(" 6");
- if(data[19] & 0x20) printf(" 5");
- if(data[19] & 0x10) printf(" 4");
- if(data[19] & 0x08) printf(" 3");
- if(data[19] & 0x04) printf(" 2");
- if(data[19] & 0x02) printf(" 1");
- if(data[19] & 0x01) printf(" 0");
- printf("\n");
- printf("WE latency(s) ");
- if(data[20] & 0x80) printf(" TBD");
- if(data[20] & 0x40) printf(" 6");
- if(data[20] & 0x20) printf(" 5");
- if(data[20] & 0x10) printf(" 4");
- if(data[20] & 0x08) printf(" 3");
- if(data[20] & 0x04) printf(" 2");
- if(data[20] & 0x02) printf(" 1");
- if(data[20] & 0x01) printf(" 0");
- printf("\n");
- printf("Module attributes:\n");
- if(!data[21]) printf(" (none)\n");
- if(data[21] & 0x80) printf(" TBD (bit 7)\n");
- if(data[21] & 0x40) printf(" Redundant row address\n");
- if(data[21] & 0x20) printf(" Differential clock input\n");
- if(data[21] & 0x10) printf(" Registerd DQMB inputs\n");
- if(data[21] & 0x08) printf(" Buffered DQMB inputs\n");
- if(data[21] & 0x04) printf(" On-card PLL\n");
- if(data[21] & 0x02) printf(" Registered address/control lines\n");
- if(data[21] & 0x01) printf(" Buffered address/control lines\n");
- printf("Device attributes:\n");
- if(data[22] & 0x80) printf(" TBD (bit 7)\n");
- if(data[22] & 0x40) printf(" TBD (bit 6)\n");
- if(data[22] & 0x20) printf(" Upper Vcc tolerance 5%%\n");
- else printf(" Upper Vcc tolerance 10%%\n");
- if(data[22] & 0x10) printf(" Lower Vcc tolerance 5%%\n");
- else printf(" Lower Vcc tolerance 10%%\n");
- if(data[22] & 0x08) printf(" Supports write1/read burst\n");
- if(data[22] & 0x04) printf(" Supports precharge all\n");
- if(data[22] & 0x02) printf(" Supports auto precharge\n");
- if(data[22] & 0x01) printf(" Supports early RAS# precharge\n");
+ puts ("CAS latency(s) ");
+ if (data[18] & 0x80) puts (" TBD");
+ if (data[18] & 0x40) puts (" 7");
+ if (data[18] & 0x20) puts (" 6");
+ if (data[18] & 0x10) puts (" 5");
+ if (data[18] & 0x08) puts (" 4");
+ if (data[18] & 0x04) puts (" 3");
+ if (data[18] & 0x02) puts (" 2");
+ if (data[18] & 0x01) puts (" 1");
+ putc ('\n');
+ puts ("CS latency(s) ");
+ if (data[19] & 0x80) puts (" TBD");
+ if (data[19] & 0x40) puts (" 6");
+ if (data[19] & 0x20) puts (" 5");
+ if (data[19] & 0x10) puts (" 4");
+ if (data[19] & 0x08) puts (" 3");
+ if (data[19] & 0x04) puts (" 2");
+ if (data[19] & 0x02) puts (" 1");
+ if (data[19] & 0x01) puts (" 0");
+ putc ('\n');
+ puts ("WE latency(s) ");
+ if (data[20] & 0x80) puts (" TBD");
+ if (data[20] & 0x40) puts (" 6");
+ if (data[20] & 0x20) puts (" 5");
+ if (data[20] & 0x10) puts (" 4");
+ if (data[20] & 0x08) puts (" 3");
+ if (data[20] & 0x04) puts (" 2");
+ if (data[20] & 0x02) puts (" 1");
+ if (data[20] & 0x01) puts (" 0");
+ putc ('\n');
+ puts ("Module attributes:\n");
+ if (!data[21]) puts (" (none)\n");
+ if (data[21] & 0x80) puts (" TBD (bit 7)\n");
+ if (data[21] & 0x40) puts (" Redundant row address\n");
+ if (data[21] & 0x20) puts (" Differential clock input\n");
+ if (data[21] & 0x10) puts (" Registerd DQMB inputs\n");
+ if (data[21] & 0x08) puts (" Buffered DQMB inputs\n");
+ if (data[21] & 0x04) puts (" On-card PLL\n");
+ if (data[21] & 0x02) puts (" Registered address/control lines\n");
+ if (data[21] & 0x01) puts (" Buffered address/control lines\n");
+ puts ("Device attributes:\n");
+ if (data[22] & 0x80) puts (" TBD (bit 7)\n");
+ if (data[22] & 0x40) puts (" TBD (bit 6)\n");
+ if (data[22] & 0x20) puts (" Upper Vcc tolerance 5%\n");
+ else puts (" Upper Vcc tolerance 10%\n");
+ if (data[22] & 0x10) puts (" Lower Vcc tolerance 5%\n");
+ else puts (" Lower Vcc tolerance 10%\n");
+ if (data[22] & 0x08) puts (" Supports write1/read burst\n");
+ if (data[22] & 0x04) puts (" Supports precharge all\n");
+ if (data[22] & 0x02) puts (" Supports auto precharge\n");
+ if (data[22] & 0x01) puts (" Supports early RAS# precharge\n");
printf("SDRAM cycle time (2nd highest CAS latency) %d.%d nS\n",
(data[23] >> 4) & 0x0F, data[23] & 0x0F);
printf("SDRAM access from clock (2nd highest CAS latency) %d.%d nS\n",
@@ -823,16 +823,16 @@ int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf("Row active to row active min %d nS\n", data[28]);
printf("RAS to CAS delay min %d nS\n", data[29]);
printf("Minimum RAS pulse width %d nS\n", data[30]);
- printf("Density of each row ");
- if(data[31] & 0x80) printf(" 512MByte");
- if(data[31] & 0x40) printf(" 256MByte");
- if(data[31] & 0x20) printf(" 128MByte");
- if(data[31] & 0x10) printf(" 64MByte");
- if(data[31] & 0x08) printf(" 32MByte");
- if(data[31] & 0x04) printf(" 16MByte");
- if(data[31] & 0x02) printf(" 8MByte");
- if(data[31] & 0x01) printf(" 4MByte");
- printf("\n");
+ puts ("Density of each row ");
+ if (data[31] & 0x80) puts (" 512");
+ if (data[31] & 0x40) puts (" 256");
+ if (data[31] & 0x20) puts (" 128");
+ if (data[31] & 0x10) puts (" 64");
+ if (data[31] & 0x08) puts (" 32");
+ if (data[31] & 0x04) puts (" 16");
+ if (data[31] & 0x02) puts (" 8");
+ if (data[31] & 0x01) puts (" 4");
+ puts ("MByte\n");
printf("Command and Address setup %c%d.%d nS\n",
(data[32] & 0x80) ? '-' : '+',
(data[32] >> 4) & 0x07, data[32] & 0x0F);
@@ -845,21 +845,21 @@ int do_sdram ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf("Data signal input hold %c%d.%d nS\n",
(data[35] & 0x80) ? '-' : '+',
(data[35] >> 4) & 0x07, data[35] & 0x0F);
- printf("Manufacturer's JEDEC ID ");
+ puts ("Manufacturer's JEDEC ID ");
for(j = 64; j <= 71; j++)
printf("%02X ", data[j]);
- printf("\n");
+ putc ('\n');
printf("Manufacturing Location %02X\n", data[72]);
- printf("Manufacturer's Part Number ");
+ puts ("Manufacturer's Part Number ");
for(j = 73; j <= 90; j++)
printf("%02X ", data[j]);
- printf("\n");
+ putc ('\n');
printf("Revision Code %02X %02X\n", data[91], data[92]);
printf("Manufacturing Date %02X %02X\n", data[93], data[94]);
- printf("Assembly Serial Number ");
+ puts ("Assembly Serial Number ");
for(j = 95; j <= 98; j++)
printf("%02X ", data[j]);
- printf("\n");
+ putc ('\n');
printf("Speed rating PC%d\n",
data[126] == 0x66 ? 66 : data[126]);
diff --git a/common/cmd_immap.c b/common/cmd_immap.c
index 252bdfb..abf5590 100644
--- a/common/cmd_immap.c
+++ b/common/cmd_immap.c
@@ -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);
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index 6ebd46f..c4f5a97 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -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;
}
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 39fc180..f18bfde 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -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
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index cbad7db..ef53e13 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -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 {
diff --git a/common/cmd_reginfo.c b/common/cmd_reginfo.c
index 2b84dd9..ee5e14f 100644
--- a/common/cmd_reginfo.c
+++ b/common/cmd_reginfo.c
@@ -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("Memory Controller Registers\n");
+ printf ("Memory Controller Registers\n"
- printf("\tBR0\t0x%08X\tOR0\t0x%08X \n", memctl->memc_br0, memctl->memc_or0);
+ "\tBR0\t0x%08X\tOR0\t0x%08X \n", memctl->memc_br0, memctl->memc_or0);
printf("\tBR1\t0x%08X\tOR1\t0x%08X \n", memctl->memc_br1, memctl->memc_or1);
printf("\tBR2\t0x%08X\tOR2\t0x%08X \n", memctl->memc_br2, memctl->memc_or2);
printf("\tBR3\t0x%08X\tOR3\t0x%08X \n", memctl->memc_br3, memctl->memc_or3);
@@ -71,16 +71,15 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf("\tBR5\t0x%08X\tOR5\t0x%08X \n", memctl->memc_br5, memctl->memc_or5);
printf("\tBR6\t0x%08X\tOR6\t0x%08X \n", memctl->memc_br6, memctl->memc_or6);
printf("\tBR7\t0x%08X\tOR7\t0x%08X \n", memctl->memc_br7, memctl->memc_or7);
- printf("\n");
-
- printf("\tmamr\t0x%08X\tmbmr\t0x%08X \n",
+ printf ("\n"
+ "\tmamr\t0x%08X\tmbmr\t0x%08X \n",
memctl->memc_mamr, memctl->memc_mbmr );
printf("\tmstat\t0x%08X\tmptpr\t0x%08X \n",
memctl->memc_mstat, memctl->memc_mptpr );
printf("\tmdr\t0x%08X \n", memctl->memc_mdr);
- printf("\nSystem Integration Timers\n");
- printf("\tTBSCR\t0x%08X\tRTCSC\t0x%08X \n",
+ printf ("\nSystem Integration Timers\n"
+ "\tTBSCR\t0x%08X\tRTCSC\t0x%08X \n",
timers->sit_tbscr, timers->sit_rtcsc);
printf("\tPISCR\t0x%08X \n", timers->sit_piscr);
@@ -105,7 +104,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mfdcr(uicvr),
mfdcr(uicvcr));
- printf ("\nMemory (SDRAM) Configuration\n"
+ puts ("\nMemory (SDRAM) Configuration\n"
"besra besrsa besrb besrsb bear mcopt1 rtr pmit\n");
mtdcr(memcfga,mem_besra); printf ("%08x ", mfdcr(memcfgd));
@@ -117,7 +116,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mtdcr(memcfga,mem_rtr); printf ("%08x ", mfdcr(memcfgd));
mtdcr(memcfga,mem_pmit); printf ("%08x ", mfdcr(memcfgd));
- printf ("\n"
+ puts ("\n"
"mb0cf mb1cf mb2cf mb3cf sdtr1 ecccf eccerr\n");
mtdcr(memcfga,mem_mb0cf); printf ("%08x ", mfdcr(memcfgd));
mtdcr(memcfga,mem_mb1cf); printf ("%08x ", mfdcr(memcfgd));
@@ -145,7 +144,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mfdcr(dmacr2), mfdcr(dmact2),mfdcr(dmada2), mfdcr(dmasa2), mfdcr(dmasb2),
mfdcr(dmacr3), mfdcr(dmact3),mfdcr(dmada3), mfdcr(dmasa3), mfdcr(dmasb3) );
- printf ("\n"
+ puts ("\n"
"External Bus\n"
"pbear pbesr0 pbesr1 epcr\n");
mtdcr(ebccfga,pbear); printf ("%08x ", mfdcr(ebccfgd));
@@ -153,7 +152,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mtdcr(ebccfga,pbesr1); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,epcr); printf ("%08x ", mfdcr(ebccfgd));
- printf ("\n"
+ puts ("\n"
"pb0cr pb0ap pb1cr pb1ap pb2cr pb2ap pb3cr pb3ap\n");
mtdcr(ebccfga,pb0cr); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,pb0ap); printf ("%08x ", mfdcr(ebccfgd));
@@ -164,7 +163,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mtdcr(ebccfga,pb3cr); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,pb3ap); printf ("%08x ", mfdcr(ebccfgd));
- printf ("\n"
+ puts ("\n"
"pb4cr pb4ap pb5cr bp5ap pb6cr pb6ap pb7cr pb7ap\n");
mtdcr(ebccfga,pb4cr); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,pb4ap); printf ("%08x ", mfdcr(ebccfgd));
@@ -175,7 +174,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mtdcr(ebccfga,pb7cr); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,pb7ap); printf ("%08x ", mfdcr(ebccfgd));
- printf ("\n\n");
+ puts ("\n\n");
/* For the BUBINGA (IBM 405EP eval) but should be generically 405ep */
#elif defined(CONFIG_405EP)
printf ("\n405EP registers; MSR=%08x\n",mfmsr());
@@ -192,7 +191,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mfdcr(uicvr),
mfdcr(uicvcr));
- printf ("\nMemory (SDRAM) Configuration\n"
+ puts ("\nMemory (SDRAM) Configuration\n"
"mcopt1 rtr pmit mb0cf mb1cf sdtr1\n");
mtdcr(memcfga,mem_mcopt1); printf ("%08x ", mfdcr(memcfgd));
@@ -217,7 +216,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mfdcr(dmacr2), mfdcr(dmact2),mfdcr(dmada2), mfdcr(dmasa2), mfdcr(dmasb2),
mfdcr(dmacr3), mfdcr(dmact3),mfdcr(dmada3), mfdcr(dmasa3), mfdcr(dmasb3) );
- printf ("\n"
+ puts ("\n"
"External Bus\n"
"pbear pbesr0 pbesr1 epcr\n");
mtdcr(ebccfga,pbear); printf ("%08x ", mfdcr(ebccfgd));
@@ -225,7 +224,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mtdcr(ebccfga,pbesr1); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,epcr); printf ("%08x ", mfdcr(ebccfgd));
- printf ("\n"
+ puts ("\n"
"pb0cr pb0ap pb1cr pb1ap pb2cr pb2ap pb3cr pb3ap\n");
mtdcr(ebccfga,pb0cr); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,pb0ap); printf ("%08x ", mfdcr(ebccfgd));
@@ -236,12 +235,12 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
mtdcr(ebccfga,pb3cr); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,pb3ap); printf ("%08x ", mfdcr(ebccfgd));
- printf ("\n"
+ puts ("\n"
"pb4cr pb4ap\n");
mtdcr(ebccfga,pb4cr); printf ("%08x ", mfdcr(ebccfgd));
mtdcr(ebccfga,pb4ap); printf ("%08x ", mfdcr(ebccfgd));
- printf ("\n\n");
+ puts ("\n\n");
#elif defined(CONFIG_5xx)
volatile immap_t *immap = (immap_t *)CFG_IMMR;
@@ -251,14 +250,14 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
volatile car5xx_t *car = &immap->im_clkrst;
volatile uimb5xx_t *uimb = &immap->im_uimb;
- printf("\nSystem Configuration registers\n");
+ puts ("\nSystem Configuration registers\n");
printf("\tIMMR\t0x%08X\tSIUMCR\t0x%08X \n", get_immr(0), sysconf->sc_siumcr);
printf("\tSYPCR\t0x%08X\tSWSR\t0x%04X \n" ,sysconf->sc_sypcr, sysconf->sc_swsr);
printf("\tSIPEND\t0x%08X\tSIMASK\t0x%08X \n", sysconf->sc_sipend, sysconf->sc_simask);
printf("\tSIEL\t0x%08X\tSIVEC\t0x%08X \n", sysconf->sc_siel, sysconf->sc_sivec);
printf("\tTESR\t0x%08X\n", sysconf->sc_tesr);
- printf("\nMemory Controller Registers\n");
+ puts ("\nMemory Controller Registers\n");
printf("\tBR0\t0x%08X\tOR0\t0x%08X \n", memctl->memc_br0, memctl->memc_or0);
printf("\tBR1\t0x%08X\tOR1\t0x%08X \n", memctl->memc_br1, memctl->memc_or1);
printf("\tBR2\t0x%08X\tOR2\t0x%08X \n", memctl->memc_br2, memctl->memc_or2);
@@ -266,16 +265,16 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf("\tDMBR\t0x%08X\tDMOR\t0x%08X \n", memctl->memc_dmbr, memctl->memc_dmor );
printf("\tMSTAT\t0x%08X\n", memctl->memc_mstat);
- printf("\nSystem Integration Timers\n");
+ puts ("\nSystem Integration Timers\n");
printf("\tTBSCR\t0x%08X\tRTCSC\t0x%08X \n", timers->sit_tbscr, timers->sit_rtcsc);
printf("\tPISCR\t0x%08X \n", timers->sit_piscr);
- printf("\nClocks and Reset\n");
+ puts ("\nClocks and Reset\n");
printf("\tSCCR\t0x%08X\tPLPRCR\t0x%08X \n", car->car_sccr, car->car_plprcr);
- printf("\nU-Bus to IMB3 Bus Interface\n");
+ puts ("\nU-Bus to IMB3 Bus Interface\n");
printf("\tUMCR\t0x%08X\tUIPEND\t0x%08X \n", uimb->uimb_umcr, uimb->uimb_uipend);
- printf ("\n\n");
+ puts ("\n\n");
#endif /* CONFIG_5xx */
return 0;
}
diff --git a/common/console.c b/common/console.c
index 5fe364e..f858fb3 100644
--- a/common/console.c
+++ b/common/console.c
@@ -456,23 +456,23 @@ int console_init_r (void)
#ifndef CFG_CONSOLE_INFO_QUIET
/* Print information */
- printf ("In: ");
+ puts ("In: ");
if (stdio_devices[stdin] == NULL) {
- printf ("No input devices available!\n");
+ puts ("No input devices available!\n");
} else {
printf ("%s\n", stdio_devices[stdin]->name);
}
- printf ("Out: ");
+ puts ("Out: ");
if (stdio_devices[stdout] == NULL) {
- printf ("No output devices available!\n");
+ puts ("No output devices available!\n");
} else {
printf ("%s\n", stdio_devices[stdout]->name);
}
- printf ("Err: ");
+ puts ("Err: ");
if (stdio_devices[stderr] == NULL) {
- printf ("No error devices available!\n");
+ puts ("No error devices available!\n");
} else {
printf ("%s\n", stdio_devices[stderr]->name);
}
@@ -546,23 +546,23 @@ int console_init_r (void)
#ifndef CFG_CONSOLE_INFO_QUIET
/* Print information */
- printf ("In: ");
+ puts ("In: ");
if (stdio_devices[stdin] == NULL) {
- printf ("No input devices available!\n");
+ puts ("No input devices available!\n");
} else {
printf ("%s\n", stdio_devices[stdin]->name);
}
- printf ("Out: ");
+ puts ("Out: ");
if (stdio_devices[stdout] == NULL) {
- printf ("No output devices available!\n");
+ puts ("No output devices available!\n");
} else {
printf ("%s\n", stdio_devices[stdout]->name);
}
- printf ("Err: ");
+ puts ("Err: ");
if (stdio_devices[stderr] == NULL) {
- printf ("No error devices available!\n");
+ puts ("No error devices available!\n");
} else {
printf ("%s\n", stdio_devices[stderr]->name);
}
diff --git a/common/main.c b/common/main.c
index f465e2c..817c1b4 100644
--- a/common/main.c
+++ b/common/main.c
@@ -189,7 +189,7 @@ static __inline__ int abortboot(int bootdelay)
}
# if DEBUG_BOOTKEYS
if (!abort)
- printf("key timeout\n");
+ puts ("key timeout\n");
# endif
#ifdef CONFIG_SILENT_CONSOLE
@@ -246,7 +246,7 @@ static __inline__ int abortboot(int bootdelay)
if (bootdelay >= 0) {
if (tstc()) { /* we got a key press */
(void) getc(); /* consume input */
- printf ("\b\b\b 0");
+ puts ("\b\b\b 0");
abort = 1; /* don't auto boot */
}
}
@@ -473,7 +473,7 @@ void main_loop (void)
else if (len == -2) {
/* -2 means timed out, retry autoboot
*/
- printf("\nTimed out waiting for command\n");
+ puts ("\nTimed out waiting for command\n");
# ifdef CONFIG_RESET_TO_RETRY
/* Reinit board to run initialization code again */
do_reset (NULL, 0, 0, NULL);
@@ -484,7 +484,7 @@ void main_loop (void)
#endif
if (len == -1)
- printf ("<INTERRUPT>\n");
+ puts ("<INTERRUPT>\n");
else
rc = run_command (lastcommand, flag);
@@ -925,7 +925,7 @@ int run_command (const char *cmd, int flag)
printf ("[%s]\n", finaltoken);
#endif
if (flag & CMD_FLAG_BOOTD) {
- printf ("'bootd' recursion detected\n");
+ puts ("'bootd' recursion detected\n");
rc = -1;
continue;
}
diff --git a/common/miiphybb.c b/common/miiphybb.c
index 8d18919..b4cbb70 100644
--- a/common/miiphybb.c
+++ b/common/miiphybb.c
@@ -134,7 +134,7 @@ int miiphy_read(unsigned char addr,
/* check the turnaround bit: the PHY should be driving it to zero */
if(MDIO_READ != 0)
{
- /* printf("PHY didn't drive TA low\n"); */
+ /* puts ("PHY didn't drive TA low\n"); */
for(j = 0; j < 32; j++)
{
MDC(0);
diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index b45ab06..f6436cf 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -51,7 +51,7 @@ int miiphy_info (unsigned char addr,
if (miiphy_read (addr, PHY_PHYIDR2, &tmp) != 0) {
#ifdef DEBUG
- printf ("PHY ID register 2 read failed\n");
+ puts ("PHY ID register 2 read failed\n");
#endif
return (-1);
}
@@ -67,7 +67,7 @@ int miiphy_info (unsigned char addr,
if (miiphy_read (addr, PHY_PHYIDR1, &tmp) != 0) {
#ifdef DEBUG
- printf ("PHY ID register 1 read failed\n");
+ puts ("PHY ID register 1 read failed\n");
#endif
return (-1);
}
@@ -95,7 +95,7 @@ int miiphy_reset (unsigned char addr)
if (miiphy_write (addr, PHY_BMCR, 0x8000) != 0) {
#ifdef DEBUG
- printf ("PHY reset failed\n");
+ puts ("PHY reset failed\n");
#endif
return (-1);
}
@@ -112,7 +112,7 @@ int miiphy_reset (unsigned char addr)
while (((reg & 0x8000) != 0) && (loop_cnt++ < 1000000)) {
if (miiphy_read (addr, PHY_BMCR, &reg) != 0) {
# ifdef DEBUG
- printf ("PHY status read failed\n");
+ puts ("PHY status read failed\n");
# endif
return (-1);
}
@@ -120,7 +120,7 @@ int miiphy_reset (unsigned char addr)
if ((reg & 0x8000) == 0) {
return (0);
} else {
- printf ("PHY reset timed out\n");
+ puts ("PHY reset timed out\n");
return (-1);
}
return (0);
@@ -146,7 +146,7 @@ int miiphy_speed (unsigned char addr)
}
if (miiphy_read (addr, PHY_ANLPAR, &reg)) {
- printf ("PHY speed1 read failed, assuming 10bT\n");
+ puts ("PHY speed1 read failed, assuming 10bT\n");
return (_10BASET);
}
if ((reg & PHY_ANLPAR_100) != 0) {
@@ -180,7 +180,7 @@ int miiphy_duplex (unsigned char addr)
}
if (miiphy_read (addr, PHY_ANLPAR, &reg)) {
- printf ("PHY duplex read failed, assuming half duplex\n");
+ puts ("PHY duplex read failed, assuming half duplex\n");
return (HALF);
}
@@ -201,7 +201,7 @@ int miiphy_link (unsigned char addr)
unsigned short reg;
if (miiphy_read (addr, PHY_BMSR, &reg)) {
- printf ("PHY_BMSR read failed, assuming no link\n");
+ puts ("PHY_BMSR read failed, assuming no link\n");
return (0);
}