9
0
Fork 0

Merge branch 'for-next/pr_print'

This commit is contained in:
Sascha Hauer 2013-04-04 14:20:33 +02:00
commit 2143dfda8b
7 changed files with 23 additions and 21 deletions

View File

@ -756,7 +756,7 @@ static int at91_clock_display(void)
if (pll_overclock)
pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000);
printf("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
pr_info("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
cpu_freq / 1000000, (unsigned) mck.rate_hz / 1000000,
(unsigned) main_clk.rate_hz / 1000000,
((unsigned) main_clk.rate_hz % 1000000) / 1000);

View File

@ -10,9 +10,9 @@ static int display_meminfo(void)
ulong mend = mem_malloc_end();
ulong msize = mend - mstart + 1;
debug("barebox code: 0x%p -> 0x%p\n", _stext, _etext - 1);
debug("bss segment: 0x%p -> 0x%p\n", __bss_start, __bss_stop - 1);
printf("malloc space: 0x%08lx -> 0x%08lx (size %s)\n",
pr_debug("barebox code: 0x%p -> 0x%p\n", _stext, _etext - 1);
pr_debug("bss segment: 0x%p -> 0x%p\n", __bss_start, __bss_stop - 1);
pr_info("malloc space: 0x%08lx -> 0x%08lx (size %s)\n",
mstart, mend, size_human_readable(msize));
return 0;
}

View File

@ -105,14 +105,14 @@ void __noreturn start_barebox(void)
for (initcall = __barebox_initcalls_start;
initcall < __barebox_initcalls_end; initcall++) {
debug("initcall-> %pS\n", *initcall);
pr_debug("initcall-> %pS\n", *initcall);
result = (*initcall)();
if (result)
pr_err("initcall %pS failed: %s\n", *initcall,
strerror(-result));
}
debug("initcalls done\n");
pr_debug("initcalls done\n");
if (IS_ENABLED(CONFIG_ENV_HANDLING)) {
int ret;
@ -120,7 +120,7 @@ void __noreturn start_barebox(void)
ret = envfs_load(default_environment_path, "/env", 0);
if (ret && IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT)) {
printf("no valid environment found on %s. "
pr_err("no valid environment found on %s. "
"Using default environment\n",
default_environment_path);
envfs_load("/dev/defaultenv", "/env", 0);
@ -128,17 +128,17 @@ void __noreturn start_barebox(void)
}
if (IS_ENABLED(CONFIG_COMMAND_SUPPORT)) {
printf("running /env/bin/init...\n");
pr_info("running /env/bin/init...\n");
if (!stat("/env/bin/init", &s)) {
run_command("source /env/bin/init", 0);
} else {
printf("not found\n");
pr_err("/env/bin/init not found\n");
}
}
if (!barebox_main) {
printf("No main function! aborting.\n");
pr_err("No main function! aborting.\n");
hang();
}

View File

@ -16,6 +16,6 @@ void barebox_banner (void)
if (!board)
board = CONFIG_BOARDINFO;
printf("\n\n%s\n\n", version_string);
printf("Board: %s\n", board);
pr_info("\n\n%s\n\n", version_string);
pr_info("Board: %s\n", board);
}

View File

@ -49,7 +49,7 @@ int phy_update_status(struct phy_device *dev)
dev->adjust_link(edev);
if (dev->link)
printf("%dMbps %s duplex link detected\n", dev->speed,
pr_info("%dMbps %s duplex link detected\n", dev->speed,
dev->duplex ? "full" : "half");
return 0;

View File

@ -89,7 +89,7 @@ static int ext4fs_blockgroup(struct ext2_data *data, int group,
group / desc_per_blk;
blkoff = (group % desc_per_blk) * sizeof(struct ext2_block_group);
debug("ext4fs read %d group descriptor (blkno %ld blkoff %u)\n",
dev_dbg(fs->dev, "read %d group descriptor (blkno %ld blkoff %u)\n",
group, blkno, blkoff);
return ext4fs_devread(fs, blkno << LOG2_EXT2_BLOCK_SIZE(data),
@ -139,7 +139,7 @@ int ext4fs_get_indir_block(struct ext2fs_node *node, struct ext4fs_indir_block *
ret = ext4fs_devread(fs, blkno, 0, blksz, (void *)indir->data);
if (ret) {
printf("** SI ext2fs read block (indir 1)"
dev_err(fs->dev, "** SI ext2fs read block (indir 1)"
"failed. **\n");
return ret;
}
@ -177,7 +177,7 @@ long int read_allocated_block(struct ext2fs_node *node, int fileblock)
(struct ext4_extent_header *)inode->b.blocks.dir_blocks,
fileblock, log2_blksz);
if (!ext_block) {
printf("invalid extent block\n");
pr_err("invalid extent block\n");
free(buf);
return -EINVAL;
}
@ -269,10 +269,10 @@ int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name,
unsigned int fpos = 0;
int status, ret;
struct ext2fs_node *diro = (struct ext2fs_node *) dir;
struct ext_filesystem *fs = dir->data->fs;
if (name != NULL)
debug("Iterate dir %s\n", name);
dev_dbg(fs->dev, "Iterate dir %s\n", name);
if (!diro->inode_read) {
ret = ext4fs_read_inode(diro->data, diro->ino, &diro->inode);
@ -345,7 +345,7 @@ int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name,
}
}
debug("iterate >%s<\n", filename);
dev_dbg(fs->dev, "iterate >%s<\n", filename);
if (strcmp(filename, name) == 0) {
*ftype = type;

View File

@ -17,6 +17,8 @@
*
*/
#define pr_fmt(fmt) "netconsole: " fmt
#include <common.h>
#include <command.h>
#include <fs.h>
@ -185,7 +187,7 @@ static int netconsole_init(void)
ret = console_register(cdev);
if (ret) {
printf("netconsole: registering failed with %s\n", strerror(-ret));
pr_err("registering failed with %s\n", strerror(-ret));
kfree(priv);
return ret;
}
@ -194,7 +196,7 @@ static int netconsole_init(void)
dev_add_param(&cdev->class_dev, "port", nc_port_set, NULL, 0);
dev_set_param(&cdev->class_dev, "port", "6666");
printf("registered netconsole as %s%d\n", cdev->class_dev.name, cdev->class_dev.id);
pr_info("registered as %s%d\n", cdev->class_dev.name, cdev->class_dev.id);
return 0;
}