summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-11-24 09:34:29 -0600
committerTom Rini <[email protected]>2025-11-24 09:34:29 -0600
commit4a4871e3dc38f3f771d2713b805e79e6191b4297 (patch)
treef3cbb63c259f8cce92e87bf1a30b69c02b07c2dc /include
parent6e7d2399c8139f8e2d037e446236b8d8bdbca604 (diff)
parentc5e6d2ab7eba68cbfb600cdc131c0c375ced2ec9 (diff)
Merge tag 'v2026.01-rc3' into next
Prepare v2026.01-rc3
Diffstat (limited to 'include')
-rw-r--r--include/dm/root.h2
-rw-r--r--include/linux/mtd/spinand.h1
-rw-r--r--include/scmi_protocols.h37
-rw-r--r--include/smbios.h8
-rw-r--r--include/test/ut.h159
5 files changed, 164 insertions, 43 deletions
diff --git a/include/dm/root.h b/include/dm/root.h
index 286bd9a2ddd..61a61e1ce46 100644
--- a/include/dm/root.h
+++ b/include/dm/root.h
@@ -114,7 +114,7 @@ int dm_extended_scan(bool pre_reloc_only);
*
* Some devices may not be visible to Driver Model. This weak function can
* be provided by boards which wish to create their own devices
- * programmaticaly. They should do this by calling device_bind() on each
+ * programmatically. They should do this by calling device_bind() on each
* device.
*
* @pre_reloc_only: If true, bind only nodes with special devicetree properties,
diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index cf9b9656d05..e9561c0a395 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -361,6 +361,7 @@ struct spinand_manufacturer {
extern const struct spinand_manufacturer alliancememory_spinand_manufacturer;
extern const struct spinand_manufacturer ato_spinand_manufacturer;
extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer;
+extern const struct spinand_manufacturer fmsh_spinand_manufacturer;
extern const struct spinand_manufacturer foresee_spinand_manufacturer;
extern const struct spinand_manufacturer gigadevice_spinand_manufacturer;
extern const struct spinand_manufacturer macronix_spinand_manufacturer;
diff --git a/include/scmi_protocols.h b/include/scmi_protocols.h
index bb74a57f79a..ecab021b472 100644
--- a/include/scmi_protocols.h
+++ b/include/scmi_protocols.h
@@ -399,7 +399,7 @@ int scmi_generic_protocol_version(struct udevice *dev,
int scmi_base_protocol_version(struct udevice *dev, u32 *version);
/**
- * scmi_protocol_attrs - get protocol attributes
+ * scmi_base_protocol_attrs - get protocol attributes
* @dev: SCMI protocol device
* @num_agents: Number of SCMI agents
* @num_protocols: Number of SCMI protocols
@@ -414,7 +414,7 @@ int scmi_base_protocol_attrs(struct udevice *dev, u32 *num_agents,
u32 *num_protocols);
/**
- * scmi_protocol_message_attrs - get message-specific attributes
+ * scmi_base_protocol_message_attrs - get message-specific attributes
* @dev: SCMI protocol device
* @message_id: SCMI message ID
* @attributes: Message-specific attributes
@@ -733,6 +733,7 @@ int scmi_pwd_name_get(struct udevice *dev, u32 domain_id, u8 **name);
/*
* SCMI Clock Protocol
*/
+#define CLOCK_PROTOCOL_VERSION_2_1 0x20001
#define CLOCK_PROTOCOL_VERSION_3_0 0x30000
enum scmi_clock_message_id {
@@ -754,7 +755,7 @@ enum scmi_clock_message_id {
#define SCMI_CLOCK_NAME_LENGTH_MAX 16
/**
- * struct scmi_clk_get_nb_out - Response for SCMI_PROTOCOL_ATTRIBUTES command
+ * struct scmi_clk_protocol_attr_out - Response for SCMI_PROTOCOL_ATTRIBUTES command
* @status: SCMI command status
* @attributes: Attributes of the clock protocol, mainly number of clocks exposed
*/
@@ -772,7 +773,7 @@ struct scmi_clk_attribute_in {
};
/**
- * struct scmi_clk_get_nb_out - Response payload for SCMI_CLOCK_ATTRIBUTES command
+ * struct scmi_clk_attribute_out - Response payload for SCMI_CLOCK_ATTRIBUTES command
* @status: SCMI command status
* @attributes: clock attributes
* @clock_name: name of the clock
@@ -785,7 +786,7 @@ struct scmi_clk_attribute_out {
};
/**
- * struct scmi_clk_get_nb_out_v2 - Response payload for SCMI_CLOCK_ATTRIBUTES command
+ * struct scmi_clk_attribute_out_v2 - Response payload for SCMI_CLOCK_ATTRIBUTES command
* Clock management Protocol 2.0
* @status: SCMI command status
* @attributes: clock attributes
@@ -800,16 +801,28 @@ struct scmi_clk_attribute_out_v2 {
};
/**
- * struct scmi_clk_state_in - Message payload for CLOCK_CONFIG_SET command
+ * struct scmi_clk_state_in_v1 - Message payload for CLOCK_CONFIG_SET command for protocol < 2.1
* @clock_id: SCMI clock ID
* @attributes: Attributes of the targets clock state
*/
-struct scmi_clk_state_in {
+struct scmi_clk_state_in_v1 {
u32 clock_id;
u32 attributes;
};
/**
+ * struct scmi_clk_state_in_v2 - Message payload for CLOCK_CONFIG_SET command for protocol >= 2.1
+ * @clock_id: SCMI clock ID
+ * @attributes: Attributes of the targets clock state
+ * @extended_config_val: Extended and OEM specific configuration
+ */
+struct scmi_clk_state_in_v2 {
+ u32 clock_id;
+ u32 attributes;
+ u32 extended_config_val;
+};
+
+/**
* struct scmi_clk_state_out - Response payload for CLOCK_CONFIG_SET command
* @status: SCMI command status
*/
@@ -818,7 +831,7 @@ struct scmi_clk_state_out {
};
/**
- * struct scmi_clk_state_in - Message payload for CLOCK_RATE_GET command
+ * struct scmi_clk_rate_get_in - Message payload for CLOCK_RATE_GET command
* @clock_id: SCMI clock ID
* @attributes: Attributes of the targets clock state
*/
@@ -839,7 +852,7 @@ struct scmi_clk_rate_get_out {
};
/**
- * struct scmi_clk_state_in - Message payload for CLOCK_RATE_SET command
+ * struct scmi_clk_rate_set_in - Message payload for CLOCK_RATE_SET command
* @flags: Flags for the clock rate set request
* @clock_id: SCMI clock ID
* @rate_lsb: 32bit LSB of the clock rate in Hertz
@@ -861,7 +874,7 @@ struct scmi_clk_rate_set_out {
};
/**
- * struct scmi_clk_parent_state_in - Message payload for CLOCK_PARENT_SET command
+ * struct scmi_clk_parent_set_in - Message payload for CLOCK_PARENT_SET command
* @clock_id: SCMI clock ID
* @parent_clk: SCMI clock ID
*/
@@ -879,6 +892,7 @@ struct scmi_clk_parent_set_out {
};
/**
+ * struct scmi_clk_get_permissions_in - Message payload for CLOCK_GET_PERMISSIONS command
* @clock_id: Identifier for the clock device.
*/
struct scmi_clk_get_permissions_in {
@@ -886,6 +900,7 @@ struct scmi_clk_get_permissions_in {
};
/**
+ * struct scmi_clk_get_permissions_out - Response payload for CLOCK_GET_PERMISSIONS command
* @status: Negative 32-bit integers are used to return error status codes.
* @permissions: Bit[31] Clock state control, Bit[30] Clock parent control,
* Bit[29] Clock rate control, Bits[28:0] Reserved, must be zero.
@@ -1082,7 +1097,7 @@ struct scmi_pin_config {
};
/**
- * struct scmi_pad_config_set_in - Message payload for PAD_CONFIG_SET command
+ * struct scmi_pinctrl_config_set_in - Message payload for PAD_CONFIG_SET command
* @identifier: Identifier for the pin or group.
* @function_id: Identifier for the function selected to be enabled
* for the selected pin or group. This field is set to
diff --git a/include/smbios.h b/include/smbios.h
index b5fed57aba2..f2f7483bce5 100644
--- a/include/smbios.h
+++ b/include/smbios.h
@@ -204,7 +204,7 @@ struct __packed smbios_type4 {
char eos[SMBIOS_STRUCT_EOS_BYTES];
};
-union cache_config {
+union __packed cache_config {
struct {
u16 level:3;
u16 bsocketed:1;
@@ -217,7 +217,7 @@ union cache_config {
u16 data;
};
-union cache_size_word {
+union __packed cache_size_word {
struct {
u16 size:15;
u16 granu:1;
@@ -225,7 +225,7 @@ union cache_size_word {
u16 data;
};
-union cache_size_dword {
+union __packed cache_size_dword {
struct {
u32 size:31;
u32 granu:1;
@@ -233,7 +233,7 @@ union cache_size_dword {
u32 data;
};
-union cache_sram_type {
+union __packed cache_sram_type {
struct {
u16 other:1;
u16 unknown:1;
diff --git a/include/test/ut.h b/include/test/ut.h
index be5502e03a1..6510c35997f 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -130,18 +130,28 @@ int ut_check_console_end(struct unit_test_state *uts);
*
* This only supports a byte dump.
*
- * @total_bytes: Size of the expected dump in bytes`
- * Return: 0 if OK (looks like a dump and the length matches), other value on
- * error
+ * @uts: Test state
+ * @total_bytes: Size of the expected dump in bytes
+ * Return: 0 if OK (looks like a dump and the length matches),
+ * other value on error
*/
int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
-/* Report a failure, with printf() string */
+/**
+ * ut_report() - Report a failure, with printf() string
+ *
+ * @fmt: format string
+ * @args: arguments to be printed
+ */
#define ut_reportf(fmt, args...) \
ut_failf(uts, __FILE__, __LINE__, __func__, "report", \
fmt, ##args)
-/* Assert that a condition is non-zero */
+/**
+ * ut_assert() - Assert that a condition is true (not 0)
+ *
+ * @cond: condition
+ */
#define ut_assert(cond) ({ \
int __ret = 0; \
\
@@ -152,7 +162,13 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that a condition is non-zero, with printf() string */
+/**
+ * ut_assertf() - Assert that a condition is true with printf string
+ *
+ * @cond: condition
+ * @fmt: format string
+ * @args: arguments to be printed
+ */
#define ut_assertf(cond, fmt, args...) ({ \
int __ret = 0; \
\
@@ -164,7 +180,12 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that two int expressions are equal */
+/**
+ * ut_asserteq() - Assert that two int32 expressions are equal
+ *
+ * @expr1: expected value
+ * @expr2: actual value
+ */
#define ut_asserteq(expr1, expr2) ({ \
unsigned int _val1 = (expr1), _val2 = (expr2); \
int __ret = 0; \
@@ -179,7 +200,12 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that two 64 int expressions are equal */
+/**
+ * ut_asserteq_64() - Assert that two int64 expressions are equal
+ *
+ * @expr1: expected value
+ * @expr2: actual value
+ */
#define ut_asserteq_64(expr1, expr2) ({ \
u64 _val1 = (expr1), _val2 = (expr2); \
int __ret = 0; \
@@ -197,7 +223,12 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that two string expressions are equal */
+/**
+ * ut_asserteq_str() - Assert that two string expressions are equal
+ *
+ * @expr1: expected value
+ * @expr2: actual value
+ */
#define ut_asserteq_str(expr1, expr2) ({ \
const char *_val1 = (expr1), *_val2 = (expr2); \
int __ret = 0; \
@@ -211,9 +242,12 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/*
- * Assert that two string expressions are equal, up to length of the
- * first
+/**
+ * ut_asserteq_strn() - Assert that two string expressions are equal
+ * up to the length of the first expression
+ *
+ * @expr1: expected value
+ * @expr2: actual value
*/
#define ut_asserteq_strn(expr1, expr2) ({ \
const char *_val1 = (expr1), *_val2 = (expr2); \
@@ -230,7 +264,13 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that two memory areas are equal */
+/**
+ * ut_asserteq_mem() - Assert that two memory areas are equal
+ *
+ * @expr1: expected value
+ * @expr2: actual value
+ * @len: length of the memory areas
+ */
#define ut_asserteq_mem(expr1, expr2, len) ({ \
const u8 *_val1 = (u8 *)(expr1), *_val2 = (u8 *)(expr2); \
const uint __len = len; \
@@ -250,7 +290,12 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that two pointers are equal */
+/**
+ * ut_asserteq_ptr() - Assert that two string pointers are equal
+ *
+ * @expr1: expected value
+ * @expr2: actual value
+ */
#define ut_asserteq_ptr(expr1, expr2) ({ \
const void *_val1 = (expr1), *_val2 = (expr2); \
int __ret = 0; \
@@ -264,7 +309,13 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that two addresses (converted from pointers) are equal */
+/**
+ * ut_asserteq_addr() - Assert that two addresses (converted from pointers)
+ * are equal
+ *
+ * @expr1: expected value
+ * @expr2: actual value
+ */
#define ut_asserteq_addr(expr1, expr2) ({ \
ulong _val1 = map_to_sysmem(expr1); \
ulong _val2 = map_to_sysmem(expr2); \
@@ -279,7 +330,11 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that a pointer is NULL */
+/**
+ * ut_assertnull() - Assert that a pointer is NULL
+ *
+ * @expr: pointer
+ */
#define ut_assertnull(expr) ({ \
const void *_val = (expr); \
int __ret = 0; \
@@ -293,7 +348,11 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that a pointer is not NULL */
+/**
+ * ut_assertnonnull() - Assert that a pointer is not NULL
+ *
+ * @expr: pointer
+ */
#define ut_assertnonnull(expr) ({ \
const void *_val = (expr); \
int __ret = 0; \
@@ -307,7 +366,11 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that a pointer is not an error pointer */
+/**
+ * ut_assertok_ptr() - Assert that a pointer is not an error pointer
+ *
+ * @expr: pointer
+ */
#define ut_assertok_ptr(expr) ({ \
const void *_val = (expr); \
int __ret = 0; \
@@ -322,10 +385,19 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that an operation succeeds (returns 0) */
+/**
+ * ut_assertok() - Assert that an operation succeeds (returns 0)
+ *
+ * @cond: expression
+ */
#define ut_assertok(cond) ut_asserteq(0, cond)
-/* Assert that the next console output line matches */
+/**
+ * ut_assert_nextline() - Assert that the next console output line matches
+ *
+ * @fmt: format string
+ * @args: print arguments
+ */
#define ut_assert_nextline(fmt, args...) ({ \
int __ret = 0; \
\
@@ -338,7 +410,13 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that the next console output line matches up to the length */
+/**
+ * ut_assert_nextlinen() - Assert that the next console output line matches
+ * up to the length of the expected string.
+ *
+ * @fmt: format string
+ * @args: print arguments
+ */
#define ut_assert_nextlinen(fmt, args...) ({ \
int __ret = 0; \
\
@@ -351,7 +429,10 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that there is a 'next' console output line, and skip it */
+/**
+ * ut_assert_skipline() - Assert that there is a 'next' console output line,
+ * and skip it
+ */
#define ut_assert_skipline() ({ \
int __ret = 0; \
\
@@ -363,7 +444,13 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that a following console output line matches */
+/**
+ * ut_assert_skip_to_line() - Assert that a following console output line
+ * matches
+ *
+ * @fmt: format string
+ * @args: print arguments
+ */
#define ut_assert_skip_to_line(fmt, args...) ({ \
int __ret = 0; \
\
@@ -376,7 +463,13 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that a following console output line matches */
+/**
+ * ut_assert_skip_to_linen() - Assert that a following console output line
+ * matches up to the length of the expected string
+ *
+ * @fmt: format string
+ * @args: print arguments
+ */
#define ut_assert_skip_to_linen(fmt, args...) ({ \
int __ret = 0; \
\
@@ -389,7 +482,9 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that there is no more console output */
+/**
+ * ut_assert_console_end() - Assert that there is no more console output
+ */
#define ut_assert_console_end() ({ \
int __ret = 0; \
\
@@ -402,7 +497,12 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that the next lines are print_buffer() dump at an address */
+/**
+ * ut_assert_nextlines_are_dump - Assert that the next lines are print_buffer()
+ * dump at an address
+ *
+ * @total_bytes: Size of the expected dump in bytes
+ */
#define ut_assert_nextlines_are_dump(total_bytes) ({ \
int __ret = 0; \
\
@@ -416,7 +516,10 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
__ret; \
})
-/* Assert that the next console output line is empty */
+/**
+ * ut_assert_nextline_empty() - Assert that the next console output line is
+ * empty
+ */
#define ut_assert_nextline_empty() \
ut_assert_nextline("%s", "")
@@ -451,6 +554,8 @@ void ut_silence_console(struct unit_test_state *uts);
*
* This restarts console output again and turns off console recording. This
* happens on all boards, including sandbox.
+ *
+ * @uts: Test state
*/
void ut_unsilence_console(struct unit_test_state *uts);