summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-at91/clock.c2
-rw-r--r--common/meminfo.c6
-rw-r--r--common/startup.c12
-rw-r--r--common/version.c4
-rw-r--r--drivers/net/phy/phy.c2
-rw-r--r--fs/ext4/ext4_common.c12
-rw-r--r--net/netconsole.c6
7 files changed, 23 insertions, 21 deletions
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 2dde6325a7..296f5d5d0e 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -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);
diff --git a/common/meminfo.c b/common/meminfo.c
index ad9bbd98ed..d239fde582 100644
--- a/common/meminfo.c
+++ b/common/meminfo.c
@@ -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;
}
diff --git a/common/startup.c b/common/startup.c
index 52a8996cdf..ff00ca78ae 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -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();
}
diff --git a/common/version.c b/common/version.c
index 22e111ab4f..d33f4d0078 100644
--- a/common/version.c
+++ b/common/version.c
@@ -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);
}
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 12739ff361..112ff13f77 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -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;
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index f426118c53..ceb965f492 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -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;
diff --git a/net/netconsole.c b/net/netconsole.c
index 7d0f3f4c13..960de8d437 100644
--- a/net/netconsole.c
+++ b/net/netconsole.c
@@ -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;
}