From 16c4bbe7040154d8d29103c2ab4c3262b407d511 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Tue, 10 Dec 2024 10:51:46 +0100 Subject: [PATCH] [review] drivers: stm32_i2c: rely on DT compat ID for secure/non-secure bus state Move non_secure_bus to source file top. By the way, I will shorten the header line to: drivers: stm32_i2c: use compatible st,stm32mp15-i2c-non-secure Signed-off-by: Etienne Carriere --- core/drivers/stm32_i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/drivers/stm32_i2c.c b/core/drivers/stm32_i2c.c index 1087a4472ce..8e0fcac9340 100644 --- a/core/drivers/stm32_i2c.c +++ b/core/drivers/stm32_i2c.c @@ -297,6 +297,9 @@ struct i2c_request { unsigned int timeout_ms; }; +/* Place holder for STM32MP15 non-secure I2C bus compat data */ +static const int non_secure_bus; + static vaddr_t get_base(struct i2c_handle_s *hi2c) { return io_pa_or_va_secure(&hi2c->base, hi2c->reg_size); @@ -1627,8 +1630,6 @@ static TEE_Result stm32_get_i2c_dev(struct dt_pargs *args, void *data, return TEE_SUCCESS; } -static const int non_secure_bus; - static TEE_Result stm32_i2c_probe(const void *fdt, int node, const void *compat_data) {