* Copyright (c) 2016 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_RAM
+
#include <common.h>
#include <dm.h>
#include <init.h>
ret = gpio_request_list_by_name(dev, "board-id-gpios", desc,
ARRAY_SIZE(desc), GPIOD_IS_IN);
- if (ret < 0) {
- debug("%s: gpio ret=%d\n", __func__, ret);
- return ret;
- }
+ if (ret < 0)
+ return log_msg_ret("gpio", ret);
spd_index = dm_gpio_get_values_as_int(desc, ret);
- debug("spd index %d\n", spd_index);
+ log_debug("spd index %d\n", spd_index);
node = fdt_first_subnode(blob, dev_of_offset(dev));
if (node < 0)
* Copyright (C) 2011 Google Inc.
*/
+#define LOG_CATEGORY UCLASS_RAM
+
#include <common.h>
#include <dm.h>
#include <errno.h>
ret = mrc_locate_spd(dev, sizeof(peid->spd_data[0]), &data);
if (ret) {
- debug("%s: Could not locate SPD (ret=%d)\n", __func__, ret);
+ log_debug("Could not locate SPD (err=%d)\n", ret);
return ret;
}
* Copyright (C) 2015 Bin Meng <bmeng.cn@gmail.com>
*/
+#define LOG_CATEGORY UCLASS_RAM
+
#include <common.h>
#include <dm.h>
#include <errno.h>
cache->signature = MRC_DATA_SIGNATURE;
cache->data_size = mrc->len;
checksum = compute_ip_checksum(mrc->buf, cache->data_size);
- debug("Saving %d bytes for MRC output data, checksum %04x\n",
- cache->data_size, checksum);
+ log_debug("Saving %d bytes for MRC output data, checksum %04x\n",
+ cache->data_size, checksum);
cache->checksum = checksum;
cache->reserved = 0;
memcpy(cache->data, mrc->buf, cache->data_size);
* Copyright (c) 2016 Google, Inc
*/
+#define LOG_CATEGORY LOGC_BOOT
+
#include <common.h>
#include <cpu_func.h>
#include <debug_uart.h>
#endif
int ret;
- debug("%s starting\n", __func__);
+ log_debug("x86 spl starting\n");
if (IS_ENABLED(TPL))
ret = x86_cpu_reinit_f();
else
ret = x86_cpu_init_f();
ret = spl_init();
if (ret) {
- debug("%s: spl_init() failed\n", __func__);
+ log_debug("spl_init() failed (err=%d)\n", ret);
return ret;
}
ret = arch_cpu_init();
if (ret) {
- debug("%s: arch_cpu_init() failed\n", __func__);
+ log_debug("arch_cpu_init() failed (err=%d)\n", ret);
return ret;
}
#ifndef CONFIG_TPL
ret = fsp_setup_pinctrl(NULL, NULL);
if (ret) {
- debug("%s: fsp_setup_pinctrl() failed\n", __func__);
+ log_debug("fsp_setup_pinctrl() failed (err=%d)\n", ret);
return ret;
}
#endif
#if !defined(CONFIG_TPL) && !CONFIG_IS_ENABLED(CPU)
ret = print_cpuinfo();
if (ret) {
- debug("%s: print_cpuinfo() failed\n", __func__);
+ log_debug("print_cpuinfo() failed (err=%d)\n", ret);
return ret;
}
#endif
ret = dram_init();
if (ret) {
- debug("%s: dram_init() failed\n", __func__);
+ log_debug("dram_init() failed (err=%d)\n", ret);
return ret;
}
+ log_debug("mrc\n");
if (IS_ENABLED(CONFIG_ENABLE_MRC_CACHE)) {
ret = mrccache_spl_save();
if (ret)
- debug("%s: Failed to write to mrccache (err=%d)\n",
- __func__, ret);
+ log_debug("Failed to write to mrccache (err=%d)\n",
+ ret);
}
#ifndef CONFIG_SYS_COREBOOT
+ log_debug("bss\n");
debug("BSS clear from %lx to %lx len %lx\n", (ulong)&__bss_start,
(ulong)&__bss_end, (ulong)&__bss_end - (ulong)&__bss_start);
memset(&__bss_start, 0, (ulong)&__bss_end - (ulong)&__bss_start);
gd->new_gd = (struct global_data *)ptr;
memcpy(gd->new_gd, gd, sizeof(*gd));
+ log_debug("logging\n");
/*
* Make sure logging is disabled when we switch, since the log system
* list head will move
debug("Failed to set CPU frequency (err=%d)\n", ret);
# endif
#endif
+ log_debug("done\n");
return 0;
}
* reserved or subject to arcane restrictions.
*/
+#define LOG_CATEGORY UCLASS_GPIO
+
#include <common.h>
#include <dm.h>
#include <errno.h>
*/
tmplong = inl(bank->use_sel);
if (!(tmplong & (1UL << offset))) {
- debug("%s: gpio %d is reserved for internal use\n", __func__,
- offset);
+ log_debug("gpio %d is reserved for internal use\n", offset);
return -EPERM;
}
* Copyright (C) 2014 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_PCH
+
#include <common.h>
#include <dm.h>
#include <log.h>
*/
dm_pci_read_config32(dev, GPIO_BASE, &base);
if (base == 0x00000000 || base == 0xffffffff) {
- debug("%s: unexpected BASE value\n", __func__);
+ log_debug("unexpected BASE value\n");
return -ENODEV;
}
dm_pci_read_config32(dev, IO_BASE, &base);
if (base == 0x00000000 || base == 0xffffffff) {
- debug("%s: unexpected BASE value\n", __func__);
+ log_debug("unexpected BASE value\n");
return -ENODEV;
}