aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-04-06 08:36:11 -0400
committerTom Rini <trini@konsulko.com>2021-04-06 08:36:11 -0400
commit779786dac366ab83161843a248a5c639af10e540 (patch)
tree3c0f2a6a4eb0e61fa26c6bfe24f36e6609f538e8 /include
parent472fd5a35af3308f97de0376a6c25f5368035557 (diff)
parentd4a1592a9908f4278f306ff9f11e63c010e05704 (diff)
downloadu-boot-779786dac366ab83161843a248a5c639af10e540.tar.gz
Merge tag 'dm-pull-6apr21' of https://source.denx.de/u-boot/custodians/u-boot-dm
ENOSYS clean-up Minor dtoc improvements Convert CONFIG_MISC_INIT_F to Kconfig Allow unit tests to run on any board pylibfdt build-rule fix
Diffstat (limited to 'include')
-rw-r--r--include/configs/MPC8349ITX.h2
-rw-r--r--include/configs/kmp204x.h2
-rw-r--r--include/configs/sandbox.h2
-rw-r--r--include/log.h11
-rw-r--r--include/os.h4
-rw-r--r--include/spi-mem.h2
-rw-r--r--include/test/test.h9
-rw-r--r--include/tlv_eeprom.h6
8 files changed, 23 insertions, 15 deletions
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index f50cdd717cb..586c1e9ae84 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -39,8 +39,6 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#define CONFIG_MISC_INIT_F
-
/*
* On-board devices
*/
diff --git a/include/configs/kmp204x.h b/include/configs/kmp204x.h
index 90e3702bd80..af3b03be490 100644
--- a/include/configs/kmp204x.h
+++ b/include/configs/kmp204x.h
@@ -177,8 +177,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_QRIO_BR_PRELIM /* QRIO Base Address */
#define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_QRIO_OR_PRELIM /* QRIO Options */
-#define CONFIG_MISC_INIT_F
-
#define CONFIG_HWCONFIG
/* define to use L1 as initial stack */
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index e0708fe5739..bbb7d12ad14 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -130,6 +130,4 @@
#define CONFIG_SYS_SATA_MAX_DEVICE 2
-#define CONFIG_MISC_INIT_F
-
#endif
diff --git a/include/log.h b/include/log.h
index 6ef891d4d2d..add3a1e4a0c 100644
--- a/include/log.h
+++ b/include/log.h
@@ -222,11 +222,14 @@ static inline int _log_nop(enum log_category_t cat, enum log_level_t level,
#define _SPL_BUILD 0
#endif
-#if !_DEBUG && CONFIG_IS_ENABLED(LOG)
+#if CONFIG_IS_ENABLED(LOG)
-#define debug_cond(cond, fmt, args...) \
-({ \
- log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \
+#define debug_cond(cond, fmt, args...) \
+({ \
+ if (cond) \
+ log(LOG_CATEGORY, \
+ (enum log_level_t)(LOGL_FORCE_DEBUG | _LOG_DEBUG), \
+ fmt, ##args); \
})
#else /* _DEBUG */
diff --git a/include/os.h b/include/os.h
index 77d8bd89d0f..bd1096eb8b3 100644
--- a/include/os.h
+++ b/include/os.h
@@ -134,7 +134,9 @@ void os_free(void *ptr);
* This follows the semantics of realloc(), so can perform an os_malloc() or
* os_free() depending on @ptr and @length.
*
- * Return: Pointer to reallocated memory or NULL if @length is 0
+ * @ptr: pointer to previously allocated memory of NULL
+ * @length: number of bytes to allocate
+ * Return: pointer to reallocated memory or NULL if @length is 0
*/
void *os_realloc(void *ptr, size_t length);
diff --git a/include/spi-mem.h b/include/spi-mem.h
index 8be3e2bf6b5..e354c388979 100644
--- a/include/spi-mem.h
+++ b/include/spi-mem.h
@@ -222,7 +222,7 @@ spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
const struct spi_mem_op *op,
struct sg_table *sg)
{
- return -ENOTSUPP;
+ return -ENOSYS;
}
static inline void
diff --git a/include/test/test.h b/include/test/test.h
index 0b124edd601..bf7d785d8ed 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -124,4 +124,13 @@ enum {
*/
struct udevice *testbus_get_clear_removed(void);
+static inline void arch_reset_for_test(void)
+{
+#ifdef CONFIG_SANDBOX
+#include <asm/state.h>
+
+ state_reset_for_test(state_get_current());
+#endif
+}
+
#endif /* __TEST_TEST_H */
diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h
index 1de2fe2337c..a2c333e7446 100644
--- a/include/tlv_eeprom.h
+++ b/include/tlv_eeprom.h
@@ -114,19 +114,19 @@ int read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr,
static inline int read_tlv_eeprom(void *eeprom, int offset, int len, int dev)
{
- return -ENOTSUPP;
+ return -ENOSYS;
}
static inline int write_tlv_eeprom(void *eeprom, int len)
{
- return -ENOTSUPP;
+ return -ENOSYS;
}
static inline int
read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr,
struct tlvinfo_tlv **first_entry, int dev)
{
- return -ENOTSUPP;
+ return -ENOSYS;
}
#endif /* CONFIG_IS_ENABLED(CMD_TLV_EEPROM) */