All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support
@ 2021-02-24 10:19 Patrick Delaunay
  2021-02-24 10:19 ` [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver Patrick Delaunay
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Patrick Delaunay @ 2021-02-24 10:19 UTC (permalink / raw)
  To: u-boot


This Serie is a preliminary step to allow support of secured clocks
provided by SCMI server running in secure world (TF-A or OP-TEE).

This serie only activate the needed drivers in the trusted defconfig
before alignment with device tree including SCMI support [1] and
upstream of SCMI server in TF-A/OP-TEE.

[1] current patch for SCMI clock support in device tree
 "ARM: dts: stm32: move clocks/resets to SCMI resources for stm32mp15"
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210126090120.19900-13-gabriel.fernandez at foss.st.com/



Etienne Carriere (2):
  ARM: dts: stm32mp1: explicit clock reference needed by RCC clock
    driver
  clk: stm32mp1: gets root clocks from fdt

Patrick Delaunay (4):
  scmi: Include device_compat.h
  scmi: define LOG_CATEGORY
  scmi: cosmetic: reorder include files
  configs: stm32mp1_trusted_defconfig rely on SCMI support

 arch/arm/dts/stm32mp151.dtsi                 |  4 ++
 configs/stm32mp15_trusted_defconfig          |  2 +
 drivers/clk/clk_stm32mp1.c                   | 62 ++++++++------------
 drivers/firmware/scmi/mailbox_agent.c        |  4 +-
 drivers/firmware/scmi/sandbox-scmi_agent.c   |  2 +
 drivers/firmware/scmi/sandbox-scmi_devices.c |  2 +
 drivers/firmware/scmi/scmi_agent-uclass.c    |  5 +-
 drivers/firmware/scmi/smccc_agent.c          |  3 +
 drivers/firmware/scmi/smt.c                  |  2 +
 9 files changed, 44 insertions(+), 42 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver
  2021-02-24 10:19 [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
@ 2021-02-24 10:19 ` Patrick Delaunay
  2021-03-09 12:57   ` Patrice CHOTARD
  2021-02-24 10:19 ` [PATCH 2/6] clk: stm32mp1: gets root clocks from fdt Patrick Delaunay
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Patrick Delaunay @ 2021-02-24 10:19 UTC (permalink / raw)
  To: u-boot

From: Etienne Carriere <etienne.carriere@st.com>

Define in the RCC clock provider node which root clocks the driver
depends on. These are root oscillators, which may be present or
not, upon FDT content.

This update binding is introduced in Linux kernel device tree by patch
"ARM: dts: stm32: move clocks/resets to SCMI resources for stm32mp15"

This patch is a preliminary step for SCMI support of stm32mp15
boards with trusted boot chain, based on TF-A or OP-TEE.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

Reference:

https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210126090120.19900-13-gabriel.fernandez at foss.st.com/


 arch/arm/dts/stm32mp151.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
index eedea6f4b8..b564fc6269 100644
--- a/arch/arm/dts/stm32mp151.dtsi
+++ b/arch/arm/dts/stm32mp151.dtsi
@@ -1136,6 +1136,10 @@
 			reg = <0x50000000 0x1000>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
+
+			clock-names = "hse", "hsi", "csi", "lse", "lsi";
+			clocks = <&clk_hse>, <&clk_hsi>, <&clk_csi>,
+				 <&clk_lse>, <&clk_lsi>;
 		};
 
 		pwr_regulators: pwr at 50001000 {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/6] clk: stm32mp1: gets root clocks from fdt
  2021-02-24 10:19 [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
  2021-02-24 10:19 ` [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver Patrick Delaunay
@ 2021-02-24 10:19 ` Patrick Delaunay
  2021-03-09 13:02   ` Patrice CHOTARD
  2021-02-24 10:19 ` [PATCH 3/6] scmi: Include device_compat.h Patrick Delaunay
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Patrick Delaunay @ 2021-02-24 10:19 UTC (permalink / raw)
  To: u-boot

From: Etienne Carriere <etienne.carriere@st.com>

This change makes stm32mp1 clock driver to get the root clocks
reference from the device node in the FDT rather than fetching
straight these clocks by their name. Driver now stores the
clock reference and use it to know if a root clock is present,
get its rate or gets its related udevice reference.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 drivers/clk/clk_stm32mp1.c | 62 ++++++++++++++------------------------
 1 file changed, 23 insertions(+), 39 deletions(-)

diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index 848e33f4e8..0c0ef366a1 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -250,7 +250,7 @@ DECLARE_GLOBAL_DATA_PTR;
 enum stm32mp1_parent_id {
 /*
  * _HSI, _HSE, _CSI, _LSI, _LSE should not be moved
- * they are used as index in osc[] as entry point
+ * they are used as index in osc_clk[] as clock reference
  */
 	_HSI,
 	_HSE,
@@ -430,8 +430,7 @@ struct stm32mp1_clk_data {
 struct stm32mp1_clk_priv {
 	fdt_addr_t base;
 	const struct stm32mp1_clk_data *data;
-	ulong osc[NB_OSC];
-	struct udevice *osc_dev[NB_OSC];
+	struct clk osc_clk[NB_OSC];
 };
 
 #define STM32MP1_CLK(off, b, idx, s)		\
@@ -790,7 +789,7 @@ static ulong stm32mp1_clk_get_fixed(struct stm32mp1_clk_priv *priv, int idx)
 		return 0;
 	}
 
-	return priv->osc[idx];
+	return clk_get_rate(&priv->osc_clk[idx]);
 }
 
 static int stm32mp1_clk_get_id(struct stm32mp1_clk_priv *priv, unsigned long id)
@@ -1545,7 +1544,7 @@ static int stm32mp1_hsidiv(fdt_addr_t rcc, ulong hsifreq)
 			break;
 
 	if (hsidiv == 4) {
-		log_err("clk-hsi frequency invalid");
+		log_err("hsi frequency invalid");
 		return -1;
 	}
 
@@ -1952,13 +1951,13 @@ static int stm32mp1_clktree(struct udevice *dev)
 	 * switch ON oscillator found in device-tree,
 	 * HSI already ON after bootrom
 	 */
-	if (priv->osc[_LSI])
+	if (clk_valid(&priv->osc_clk[_LSI]))
 		stm32mp1_lsi_set(rcc, 1);
 
-	if (priv->osc[_LSE]) {
+	if (clk_valid(&priv->osc_clk[_LSE])) {
 		int bypass, digbyp;
 		u32 lsedrv;
-		struct udevice *dev = priv->osc_dev[_LSE];
+		struct udevice *dev = priv->osc_clk[_LSE].dev;
 
 		bypass = dev_read_bool(dev, "st,bypass");
 		digbyp = dev_read_bool(dev, "st,digbypass");
@@ -1969,9 +1968,9 @@ static int stm32mp1_clktree(struct udevice *dev)
 		stm32mp1_lse_enable(rcc, bypass, digbyp, lsedrv);
 	}
 
-	if (priv->osc[_HSE]) {
+	if (clk_valid(&priv->osc_clk[_HSE])) {
 		int bypass, digbyp, css;
-		struct udevice *dev = priv->osc_dev[_HSE];
+		struct udevice *dev = priv->osc_clk[_HSE].dev;
 
 		bypass = dev_read_bool(dev, "st,bypass");
 		digbyp = dev_read_bool(dev, "st,digbypass");
@@ -1996,8 +1995,8 @@ static int stm32mp1_clktree(struct udevice *dev)
 
 	/* configure HSIDIV */
 	dev_dbg(dev, "configure HSIDIV\n");
-	if (priv->osc[_HSI]) {
-		stm32mp1_hsidiv(rcc, priv->osc[_HSI]);
+	if (clk_valid(&priv->osc_clk[_HSI])) {
+		stm32mp1_hsidiv(rcc, clk_get_rate(&priv->osc_clk[_HSI]));
 		stgen_config(priv);
 	}
 
@@ -2043,7 +2042,7 @@ static int stm32mp1_clktree(struct udevice *dev)
 	}
 
 	/* wait LSE ready before to use it */
-	if (priv->osc[_LSE])
+	if (clk_valid(&priv->osc_clk[_LSE]))
 		stm32mp1_lse_wait(rcc);
 
 	/* configure with expected clock source */
@@ -2082,7 +2081,7 @@ static int stm32mp1_clktree(struct udevice *dev)
 
 	dev_dbg(dev, "oscillator off\n");
 	/* switch OFF HSI if not found in device-tree */
-	if (!priv->osc[_HSI])
+	if (!clk_valid(&priv->osc_clk[_HSI]))
 		stm32mp1_hsi_set(rcc, 0);
 
 	/* Software Self-Refresh mode (SSR) during DDR initilialization */
@@ -2178,40 +2177,25 @@ static ulong stm32mp1_clk_set_rate(struct clk *clk, unsigned long clk_rate)
 	return -EINVAL;
 }
 
-static void stm32mp1_osc_clk_init(const char *name,
-				  struct stm32mp1_clk_priv *priv,
-				  int index)
-{
-	struct clk clk;
-	struct udevice *dev = NULL;
-
-	priv->osc[index] = 0;
-	clk.id = 0;
-	if (!uclass_get_device_by_name(UCLASS_CLK, name, &dev)) {
-		if (clk_request(dev, &clk))
-			log_err("%s request", name);
-		else
-			priv->osc[index] = clk_get_rate(&clk);
-	}
-	priv->osc_dev[index] = dev;
-}
-
 static void stm32mp1_osc_init(struct udevice *dev)
 {
 	struct stm32mp1_clk_priv *priv = dev_get_priv(dev);
 	int i;
 	const char *name[NB_OSC] = {
-		[_LSI] = "clk-lsi",
-		[_LSE] = "clk-lse",
-		[_HSI] = "clk-hsi",
-		[_HSE] = "clk-hse",
-		[_CSI] = "clk-csi",
+		[_LSI] = "lsi",
+		[_LSE] = "lse",
+		[_HSI] = "hsi",
+		[_HSE] = "hse",
+		[_CSI] = "csi",
 		[_I2S_CKIN] = "i2s_ckin",
 	};
 
 	for (i = 0; i < NB_OSC; i++) {
-		stm32mp1_osc_clk_init(name[i], priv, i);
-		dev_dbg(dev, "%d: %s => %x\n", i, name[i], (u32)priv->osc[i]);
+		if (clk_get_by_name(dev, name[i], &priv->osc_clk[i]))
+			dev_dbg(dev, "No source clock \"%s\"", name[i]);
+		else
+			dev_dbg(dev, "%s clock rate: %luHz\n",
+				name[i], clk_get_rate(&priv->osc_clk[i]));
 	}
 }
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/6] scmi: Include device_compat.h
  2021-02-24 10:19 [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
  2021-02-24 10:19 ` [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver Patrick Delaunay
  2021-02-24 10:19 ` [PATCH 2/6] clk: stm32mp1: gets root clocks from fdt Patrick Delaunay
@ 2021-02-24 10:19 ` Patrick Delaunay
  2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
  2021-03-09 13:03   ` Patrice CHOTARD
  2021-02-24 10:19 ` [PATCH 4/6] scmi: define LOG_CATEGORY Patrick Delaunay
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 22+ messages in thread
From: Patrick Delaunay @ 2021-02-24 10:19 UTC (permalink / raw)
  To: u-boot

Include the file needed for log function prototype, this patch solves the
compilation issue for undefined reference to `dev_err'.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 drivers/firmware/scmi/smccc_agent.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
index 64d0929f69..81c2884bb7 100644
--- a/drivers/firmware/scmi/smccc_agent.c
+++ b/drivers/firmware/scmi/smccc_agent.c
@@ -9,6 +9,7 @@
 #include <scmi_agent.h>
 #include <scmi_agent-uclass.h>
 #include <dm/devres.h>
+#include <dm/device_compat.h>
 #include <dm/device-internal.h>
 #include <linux/arm-smccc.h>
 #include <linux/compat.h>
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/6] scmi: define LOG_CATEGORY
  2021-02-24 10:19 [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
                   ` (2 preceding siblings ...)
  2021-02-24 10:19 ` [PATCH 3/6] scmi: Include device_compat.h Patrick Delaunay
@ 2021-02-24 10:19 ` Patrick Delaunay
  2021-02-25 19:31   ` Simon Glass
  2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
  2021-02-24 10:19 ` [PATCH 5/6] scmi: cosmetic: reorder include files Patrick Delaunay
  2021-02-24 10:19 ` [PATCH 6/6] configs: stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
  5 siblings, 2 replies; 22+ messages in thread
From: Patrick Delaunay @ 2021-02-24 10:19 UTC (permalink / raw)
  To: u-boot

Define LOG_CATEGORY to allow filtering with log command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 drivers/firmware/scmi/mailbox_agent.c        | 2 ++
 drivers/firmware/scmi/sandbox-scmi_agent.c   | 2 ++
 drivers/firmware/scmi/sandbox-scmi_devices.c | 2 ++
 drivers/firmware/scmi/scmi_agent-uclass.c    | 2 ++
 drivers/firmware/scmi/smccc_agent.c          | 2 ++
 drivers/firmware/scmi/smt.c                  | 2 ++
 6 files changed, 12 insertions(+)

diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
index 3f4b04a4ae..8043e2c2de 100644
--- a/drivers/firmware/scmi/mailbox_agent.c
+++ b/drivers/firmware/scmi/mailbox_agent.c
@@ -3,6 +3,8 @@
  * Copyright (C) 2020 Linaro Limited.
  */
 
+#define LOG_CATEGORY UCLASS_SCMI_AGENT
+
 #include <common.h>
 #include <dm.h>
 #include <dm/device_compat.h>
diff --git a/drivers/firmware/scmi/sandbox-scmi_agent.c b/drivers/firmware/scmi/sandbox-scmi_agent.c
index 35de68c75d..97a5dace15 100644
--- a/drivers/firmware/scmi/sandbox-scmi_agent.c
+++ b/drivers/firmware/scmi/sandbox-scmi_agent.c
@@ -3,6 +3,8 @@
  * Copyright (C) 2020, Linaro Limited
  */
 
+#define LOG_CATEGORY UCLASS_SCMI_AGENT
+
 #include <common.h>
 #include <dm.h>
 #include <malloc.h>
diff --git a/drivers/firmware/scmi/sandbox-scmi_devices.c b/drivers/firmware/scmi/sandbox-scmi_devices.c
index 1a6fafbf53..69239a198f 100644
--- a/drivers/firmware/scmi/sandbox-scmi_devices.c
+++ b/drivers/firmware/scmi/sandbox-scmi_devices.c
@@ -3,6 +3,8 @@
  * Copyright (C) 2020, Linaro Limited
  */
 
+#define LOG_CATEGORY UCLASS_MISC
+
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index 516e690ac2..2491e0a747 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -3,6 +3,8 @@
  * Copyright (C) 2020 Linaro Limited.
  */
 
+#define LOG_CATEGORY UCLASS_SCMI_AGENT
+
 #include <common.h>
 #include <dm.h>
 #include <dm/device_compat.h>
diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
index 81c2884bb7..f185891e8f 100644
--- a/drivers/firmware/scmi/smccc_agent.c
+++ b/drivers/firmware/scmi/smccc_agent.c
@@ -3,6 +3,8 @@
  * Copyright (C) 2020 Linaro Limited.
  */
 
+#define LOG_CATEGORY UCLASS_SCMI_AGENT
+
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c
index d25478796a..60b9d499b7 100644
--- a/drivers/firmware/scmi/smt.c
+++ b/drivers/firmware/scmi/smt.c
@@ -4,6 +4,8 @@
  * Copyright (C) 2019-2020 Linaro Limited.
  */
 
+#define LOG_CATEGORY UCLASS_SCMI_AGENT
+
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 5/6] scmi: cosmetic: reorder include files
  2021-02-24 10:19 [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
                   ` (3 preceding siblings ...)
  2021-02-24 10:19 ` [PATCH 4/6] scmi: define LOG_CATEGORY Patrick Delaunay
@ 2021-02-24 10:19 ` Patrick Delaunay
  2021-03-09 13:04   ` [Uboot-stm32] " Patrice CHOTARD
  2021-02-24 10:19 ` [PATCH 6/6] configs: stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
  5 siblings, 1 reply; 22+ messages in thread
From: Patrick Delaunay @ 2021-02-24 10:19 UTC (permalink / raw)
  To: u-boot

Reorder include files in expected order.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 drivers/firmware/scmi/mailbox_agent.c     | 2 +-
 drivers/firmware/scmi/scmi_agent-uclass.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
index 8043e2c2de..ea35e7e09e 100644
--- a/drivers/firmware/scmi/mailbox_agent.c
+++ b/drivers/firmware/scmi/mailbox_agent.c
@@ -7,11 +7,11 @@
 
 #include <common.h>
 #include <dm.h>
-#include <dm/device_compat.h>
 #include <errno.h>
 #include <mailbox.h>
 #include <scmi_agent.h>
 #include <scmi_agent-uclass.h>
+#include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/compat.h>
 
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index 2491e0a747..527163b5ce 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -7,11 +7,10 @@
 
 #include <common.h>
 #include <dm.h>
-#include <dm/device_compat.h>
 #include <errno.h>
 #include <scmi_agent-uclass.h>
 #include <scmi_protocols.h>
-
+#include <dm/device_compat.h>
 #include <dm/device-internal.h>
 #include <linux/compat.h>
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 6/6] configs: stm32mp1_trusted_defconfig rely on SCMI support
  2021-02-24 10:19 [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
                   ` (4 preceding siblings ...)
  2021-02-24 10:19 ` [PATCH 5/6] scmi: cosmetic: reorder include files Patrick Delaunay
@ 2021-02-24 10:19 ` Patrick Delaunay
  2021-03-09 13:05   ` Patrice CHOTARD
  5 siblings, 1 reply; 22+ messages in thread
From: Patrick Delaunay @ 2021-02-24 10:19 UTC (permalink / raw)
  To: u-boot

Enable SCMI clock and reset domain support for stm32mp1 platform
and ARM SMC mailbox driver used as communication channel for
SCMI messages between non-secure world and secure SCMI server.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 configs/stm32mp15_trusted_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index da31b74cde..e1746332e6 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -51,6 +51,7 @@ CONFIG_ENV_UBI_VOLUME="uboot_config"
 CONFIG_ENV_UBI_VOLUME_REDUND="uboot_config_r"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_STM32_ADC=y
+CONFIG_CLK_SCMI=y
 CONFIG_SET_DFU_ALT_INFO=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0xC0000000
@@ -107,6 +108,7 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_REGULATOR_STM32_VREFBUF=y
 CONFIG_DM_REGULATOR_STPMIC1=y
 CONFIG_REMOTEPROC_STM32_COPRO=y
+CONFIG_RESET_SCMI=y
 CONFIG_DM_RNG=y
 CONFIG_RNG_STM32MP1=y
 CONFIG_DM_RTC=y
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/6] scmi: define LOG_CATEGORY
  2021-02-24 10:19 ` [PATCH 4/6] scmi: define LOG_CATEGORY Patrick Delaunay
@ 2021-02-25 19:31   ` Simon Glass
  2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
  1 sibling, 0 replies; 22+ messages in thread
From: Simon Glass @ 2021-02-25 19:31 UTC (permalink / raw)
  To: u-boot

On Wed, 24 Feb 2021 at 05:20, Patrick Delaunay
<patrick.delaunay@foss.st.com> wrote:
>
> Define LOG_CATEGORY to allow filtering with log command.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
>  drivers/firmware/scmi/mailbox_agent.c        | 2 ++
>  drivers/firmware/scmi/sandbox-scmi_agent.c   | 2 ++
>  drivers/firmware/scmi/sandbox-scmi_devices.c | 2 ++
>  drivers/firmware/scmi/scmi_agent-uclass.c    | 2 ++
>  drivers/firmware/scmi/smccc_agent.c          | 2 ++
>  drivers/firmware/scmi/smt.c                  | 2 ++
>  6 files changed, 12 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver
  2021-02-24 10:19 ` [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver Patrick Delaunay
@ 2021-03-09 12:57   ` Patrice CHOTARD
  2021-03-12 12:24     ` Patrice CHOTARD
  2021-03-12 12:24     ` Patrice CHOTARD
  0 siblings, 2 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-09 12:57 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 2/24/21 11:19 AM, Patrick Delaunay wrote:
> From: Etienne Carriere <etienne.carriere@st.com>
> 
> Define in the RCC clock provider node which root clocks the driver
> depends on. These are root oscillators, which may be present or
> not, upon FDT content.
> 
> This update binding is introduced in Linux kernel device tree by patch
> "ARM: dts: stm32: move clocks/resets to SCMI resources for stm32mp15"
> 
> This patch is a preliminary step for SCMI support of stm32mp15
> boards with trusted boot chain, based on TF-A or OP-TEE.
> 
> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
> Reference:
> 
> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210126090120.19900-13-gabriel.fernandez at foss.st.com/
> 
> 
>  arch/arm/dts/stm32mp151.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
> index eedea6f4b8..b564fc6269 100644
> --- a/arch/arm/dts/stm32mp151.dtsi
> +++ b/arch/arm/dts/stm32mp151.dtsi
> @@ -1136,6 +1136,10 @@
>  			reg = <0x50000000 0x1000>;
>  			#clock-cells = <1>;
>  			#reset-cells = <1>;
> +
> +			clock-names = "hse", "hsi", "csi", "lse", "lsi";
> +			clocks = <&clk_hse>, <&clk_hsi>, <&clk_csi>,
> +				 <&clk_lse>, <&clk_lsi>;
>  		};
>  
>  		pwr_regulators: pwr at 50001000 {
> 

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/6] clk: stm32mp1: gets root clocks from fdt
  2021-02-24 10:19 ` [PATCH 2/6] clk: stm32mp1: gets root clocks from fdt Patrick Delaunay
@ 2021-03-09 13:02   ` Patrice CHOTARD
  2021-03-12 12:24     ` [Uboot-stm32] " Patrice CHOTARD
  0 siblings, 1 reply; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-09 13:02 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 2/24/21 11:19 AM, Patrick Delaunay wrote:
> From: Etienne Carriere <etienne.carriere@st.com>
> 
> This change makes stm32mp1 clock driver to get the root clocks
> reference from the device node in the FDT rather than fetching
> straight these clocks by their name. Driver now stores the
> clock reference and use it to know if a root clock is present,
> get its rate or gets its related udevice reference.
> 
> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  drivers/clk/clk_stm32mp1.c | 62 ++++++++++++++------------------------
>  1 file changed, 23 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
> index 848e33f4e8..0c0ef366a1 100644
> --- a/drivers/clk/clk_stm32mp1.c
> +++ b/drivers/clk/clk_stm32mp1.c
> @@ -250,7 +250,7 @@ DECLARE_GLOBAL_DATA_PTR;
>  enum stm32mp1_parent_id {
>  /*
>   * _HSI, _HSE, _CSI, _LSI, _LSE should not be moved
> - * they are used as index in osc[] as entry point
> + * they are used as index in osc_clk[] as clock reference
>   */
>  	_HSI,
>  	_HSE,
> @@ -430,8 +430,7 @@ struct stm32mp1_clk_data {
>  struct stm32mp1_clk_priv {
>  	fdt_addr_t base;
>  	const struct stm32mp1_clk_data *data;
> -	ulong osc[NB_OSC];
> -	struct udevice *osc_dev[NB_OSC];
> +	struct clk osc_clk[NB_OSC];
>  };
>  
>  #define STM32MP1_CLK(off, b, idx, s)		\
> @@ -790,7 +789,7 @@ static ulong stm32mp1_clk_get_fixed(struct stm32mp1_clk_priv *priv, int idx)
>  		return 0;
>  	}
>  
> -	return priv->osc[idx];
> +	return clk_get_rate(&priv->osc_clk[idx]);
>  }
>  
>  static int stm32mp1_clk_get_id(struct stm32mp1_clk_priv *priv, unsigned long id)
> @@ -1545,7 +1544,7 @@ static int stm32mp1_hsidiv(fdt_addr_t rcc, ulong hsifreq)
>  			break;
>  
>  	if (hsidiv == 4) {
> -		log_err("clk-hsi frequency invalid");
> +		log_err("hsi frequency invalid");
>  		return -1;
>  	}
>  
> @@ -1952,13 +1951,13 @@ static int stm32mp1_clktree(struct udevice *dev)
>  	 * switch ON oscillator found in device-tree,
>  	 * HSI already ON after bootrom
>  	 */
> -	if (priv->osc[_LSI])
> +	if (clk_valid(&priv->osc_clk[_LSI]))
>  		stm32mp1_lsi_set(rcc, 1);
>  
> -	if (priv->osc[_LSE]) {
> +	if (clk_valid(&priv->osc_clk[_LSE])) {
>  		int bypass, digbyp;
>  		u32 lsedrv;
> -		struct udevice *dev = priv->osc_dev[_LSE];
> +		struct udevice *dev = priv->osc_clk[_LSE].dev;
>  
>  		bypass = dev_read_bool(dev, "st,bypass");
>  		digbyp = dev_read_bool(dev, "st,digbypass");
> @@ -1969,9 +1968,9 @@ static int stm32mp1_clktree(struct udevice *dev)
>  		stm32mp1_lse_enable(rcc, bypass, digbyp, lsedrv);
>  	}
>  
> -	if (priv->osc[_HSE]) {
> +	if (clk_valid(&priv->osc_clk[_HSE])) {
>  		int bypass, digbyp, css;
> -		struct udevice *dev = priv->osc_dev[_HSE];
> +		struct udevice *dev = priv->osc_clk[_HSE].dev;
>  
>  		bypass = dev_read_bool(dev, "st,bypass");
>  		digbyp = dev_read_bool(dev, "st,digbypass");
> @@ -1996,8 +1995,8 @@ static int stm32mp1_clktree(struct udevice *dev)
>  
>  	/* configure HSIDIV */
>  	dev_dbg(dev, "configure HSIDIV\n");
> -	if (priv->osc[_HSI]) {
> -		stm32mp1_hsidiv(rcc, priv->osc[_HSI]);
> +	if (clk_valid(&priv->osc_clk[_HSI])) {
> +		stm32mp1_hsidiv(rcc, clk_get_rate(&priv->osc_clk[_HSI]));
>  		stgen_config(priv);
>  	}
>  
> @@ -2043,7 +2042,7 @@ static int stm32mp1_clktree(struct udevice *dev)
>  	}
>  
>  	/* wait LSE ready before to use it */
> -	if (priv->osc[_LSE])
> +	if (clk_valid(&priv->osc_clk[_LSE]))
>  		stm32mp1_lse_wait(rcc);
>  
>  	/* configure with expected clock source */
> @@ -2082,7 +2081,7 @@ static int stm32mp1_clktree(struct udevice *dev)
>  
>  	dev_dbg(dev, "oscillator off\n");
>  	/* switch OFF HSI if not found in device-tree */
> -	if (!priv->osc[_HSI])
> +	if (!clk_valid(&priv->osc_clk[_HSI]))
>  		stm32mp1_hsi_set(rcc, 0);
>  
>  	/* Software Self-Refresh mode (SSR) during DDR initilialization */
> @@ -2178,40 +2177,25 @@ static ulong stm32mp1_clk_set_rate(struct clk *clk, unsigned long clk_rate)
>  	return -EINVAL;
>  }
>  
> -static void stm32mp1_osc_clk_init(const char *name,
> -				  struct stm32mp1_clk_priv *priv,
> -				  int index)
> -{
> -	struct clk clk;
> -	struct udevice *dev = NULL;
> -
> -	priv->osc[index] = 0;
> -	clk.id = 0;
> -	if (!uclass_get_device_by_name(UCLASS_CLK, name, &dev)) {
> -		if (clk_request(dev, &clk))
> -			log_err("%s request", name);
> -		else
> -			priv->osc[index] = clk_get_rate(&clk);
> -	}
> -	priv->osc_dev[index] = dev;
> -}
> -
>  static void stm32mp1_osc_init(struct udevice *dev)
>  {
>  	struct stm32mp1_clk_priv *priv = dev_get_priv(dev);
>  	int i;
>  	const char *name[NB_OSC] = {
> -		[_LSI] = "clk-lsi",
> -		[_LSE] = "clk-lse",
> -		[_HSI] = "clk-hsi",
> -		[_HSE] = "clk-hse",
> -		[_CSI] = "clk-csi",
> +		[_LSI] = "lsi",
> +		[_LSE] = "lse",
> +		[_HSI] = "hsi",
> +		[_HSE] = "hse",
> +		[_CSI] = "csi",
>  		[_I2S_CKIN] = "i2s_ckin",
>  	};
>  
>  	for (i = 0; i < NB_OSC; i++) {
> -		stm32mp1_osc_clk_init(name[i], priv, i);
> -		dev_dbg(dev, "%d: %s => %x\n", i, name[i], (u32)priv->osc[i]);
> +		if (clk_get_by_name(dev, name[i], &priv->osc_clk[i]))
> +			dev_dbg(dev, "No source clock \"%s\"", name[i]);
> +		else
> +			dev_dbg(dev, "%s clock rate: %luHz\n",
> +				name[i], clk_get_rate(&priv->osc_clk[i]));
>  	}
>  }
>  
> 

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 3/6] scmi: Include device_compat.h
  2021-02-24 10:19 ` [PATCH 3/6] scmi: Include device_compat.h Patrick Delaunay
@ 2021-03-09 13:03   ` Patrice CHOTARD
  2021-03-12 12:25     ` Patrice CHOTARD
  2021-03-09 13:03   ` Patrice CHOTARD
  1 sibling, 1 reply; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-09 13:03 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 2/24/21 11:19 AM, Patrick Delaunay wrote:
> Include the file needed for log function prototype, this patch solves the
> compilation issue for undefined reference to `dev_err'.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  drivers/firmware/scmi/smccc_agent.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
> index 64d0929f69..81c2884bb7 100644
> --- a/drivers/firmware/scmi/smccc_agent.c
> +++ b/drivers/firmware/scmi/smccc_agent.c
> @@ -9,6 +9,7 @@
>  #include <scmi_agent.h>
>  #include <scmi_agent-uclass.h>
>  #include <dm/devres.h>
> +#include <dm/device_compat.h>
>  #include <dm/device-internal.h>
>  #include <linux/arm-smccc.h>
>  #include <linux/compat.h>
> 

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 4/6] scmi: define LOG_CATEGORY
  2021-02-24 10:19 ` [PATCH 4/6] scmi: define LOG_CATEGORY Patrick Delaunay
  2021-02-25 19:31   ` Simon Glass
@ 2021-03-09 13:03   ` Patrice CHOTARD
  2021-03-12 12:25     ` Patrice CHOTARD
  1 sibling, 1 reply; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-09 13:03 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 2/24/21 11:19 AM, Patrick Delaunay wrote:
> Define LOG_CATEGORY to allow filtering with log command.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  drivers/firmware/scmi/mailbox_agent.c        | 2 ++
>  drivers/firmware/scmi/sandbox-scmi_agent.c   | 2 ++
>  drivers/firmware/scmi/sandbox-scmi_devices.c | 2 ++
>  drivers/firmware/scmi/scmi_agent-uclass.c    | 2 ++
>  drivers/firmware/scmi/smccc_agent.c          | 2 ++
>  drivers/firmware/scmi/smt.c                  | 2 ++
>  6 files changed, 12 insertions(+)
> 
> diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
> index 3f4b04a4ae..8043e2c2de 100644
> --- a/drivers/firmware/scmi/mailbox_agent.c
> +++ b/drivers/firmware/scmi/mailbox_agent.c
> @@ -3,6 +3,8 @@
>   * Copyright (C) 2020 Linaro Limited.
>   */
>  
> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
> +
>  #include <common.h>
>  #include <dm.h>
>  #include <dm/device_compat.h>
> diff --git a/drivers/firmware/scmi/sandbox-scmi_agent.c b/drivers/firmware/scmi/sandbox-scmi_agent.c
> index 35de68c75d..97a5dace15 100644
> --- a/drivers/firmware/scmi/sandbox-scmi_agent.c
> +++ b/drivers/firmware/scmi/sandbox-scmi_agent.c
> @@ -3,6 +3,8 @@
>   * Copyright (C) 2020, Linaro Limited
>   */
>  
> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
> +
>  #include <common.h>
>  #include <dm.h>
>  #include <malloc.h>
> diff --git a/drivers/firmware/scmi/sandbox-scmi_devices.c b/drivers/firmware/scmi/sandbox-scmi_devices.c
> index 1a6fafbf53..69239a198f 100644
> --- a/drivers/firmware/scmi/sandbox-scmi_devices.c
> +++ b/drivers/firmware/scmi/sandbox-scmi_devices.c
> @@ -3,6 +3,8 @@
>   * Copyright (C) 2020, Linaro Limited
>   */
>  
> +#define LOG_CATEGORY UCLASS_MISC
> +
>  #include <common.h>
>  #include <clk.h>
>  #include <dm.h>
> diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
> index 516e690ac2..2491e0a747 100644
> --- a/drivers/firmware/scmi/scmi_agent-uclass.c
> +++ b/drivers/firmware/scmi/scmi_agent-uclass.c
> @@ -3,6 +3,8 @@
>   * Copyright (C) 2020 Linaro Limited.
>   */
>  
> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
> +
>  #include <common.h>
>  #include <dm.h>
>  #include <dm/device_compat.h>
> diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
> index 81c2884bb7..f185891e8f 100644
> --- a/drivers/firmware/scmi/smccc_agent.c
> +++ b/drivers/firmware/scmi/smccc_agent.c
> @@ -3,6 +3,8 @@
>   * Copyright (C) 2020 Linaro Limited.
>   */
>  
> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
> +
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c
> index d25478796a..60b9d499b7 100644
> --- a/drivers/firmware/scmi/smt.c
> +++ b/drivers/firmware/scmi/smt.c
> @@ -4,6 +4,8 @@
>   * Copyright (C) 2019-2020 Linaro Limited.
>   */
>  
> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
> +
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <dm.h>
> 

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 3/6] scmi: Include device_compat.h
  2021-02-24 10:19 ` [PATCH 3/6] scmi: Include device_compat.h Patrick Delaunay
  2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
@ 2021-03-09 13:03   ` Patrice CHOTARD
  1 sibling, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-09 13:03 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 2/24/21 11:19 AM, Patrick Delaunay wrote:
> Include the file needed for log function prototype, this patch solves the
> compilation issue for undefined reference to `dev_err'.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  drivers/firmware/scmi/smccc_agent.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
> index 64d0929f69..81c2884bb7 100644
> --- a/drivers/firmware/scmi/smccc_agent.c
> +++ b/drivers/firmware/scmi/smccc_agent.c
> @@ -9,6 +9,7 @@
>  #include <scmi_agent.h>
>  #include <scmi_agent-uclass.h>
>  #include <dm/devres.h>
> +#include <dm/device_compat.h>
>  #include <dm/device-internal.h>
>  #include <linux/arm-smccc.h>
>  #include <linux/compat.h>
> 


Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 5/6] scmi: cosmetic: reorder include files
  2021-02-24 10:19 ` [PATCH 5/6] scmi: cosmetic: reorder include files Patrick Delaunay
@ 2021-03-09 13:04   ` Patrice CHOTARD
  2021-03-12 12:26     ` Patrice CHOTARD
  0 siblings, 1 reply; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-09 13:04 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 2/24/21 11:19 AM, Patrick Delaunay wrote:
> Reorder include files in expected order.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  drivers/firmware/scmi/mailbox_agent.c     | 2 +-
>  drivers/firmware/scmi/scmi_agent-uclass.c | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
> index 8043e2c2de..ea35e7e09e 100644
> --- a/drivers/firmware/scmi/mailbox_agent.c
> +++ b/drivers/firmware/scmi/mailbox_agent.c
> @@ -7,11 +7,11 @@
>  
>  #include <common.h>
>  #include <dm.h>
> -#include <dm/device_compat.h>
>  #include <errno.h>
>  #include <mailbox.h>
>  #include <scmi_agent.h>
>  #include <scmi_agent-uclass.h>
> +#include <dm/device_compat.h>
>  #include <dm/devres.h>
>  #include <linux/compat.h>
>  
> diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
> index 2491e0a747..527163b5ce 100644
> --- a/drivers/firmware/scmi/scmi_agent-uclass.c
> +++ b/drivers/firmware/scmi/scmi_agent-uclass.c
> @@ -7,11 +7,10 @@
>  
>  #include <common.h>
>  #include <dm.h>
> -#include <dm/device_compat.h>
>  #include <errno.h>
>  #include <scmi_agent-uclass.h>
>  #include <scmi_protocols.h>
> -
> +#include <dm/device_compat.h>
>  #include <dm/device-internal.h>
>  #include <linux/compat.h>
>  
> 


Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 6/6] configs: stm32mp1_trusted_defconfig rely on SCMI support
  2021-02-24 10:19 ` [PATCH 6/6] configs: stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
@ 2021-03-09 13:05   ` Patrice CHOTARD
  0 siblings, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-09 13:05 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 2/24/21 11:19 AM, Patrick Delaunay wrote:
> Enable SCMI clock and reset domain support for stm32mp1 platform
> and ARM SMC mailbox driver used as communication channel for
> SCMI messages between non-secure world and secure SCMI server.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  configs/stm32mp15_trusted_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
> index da31b74cde..e1746332e6 100644
> --- a/configs/stm32mp15_trusted_defconfig
> +++ b/configs/stm32mp15_trusted_defconfig
> @@ -51,6 +51,7 @@ CONFIG_ENV_UBI_VOLUME="uboot_config"
>  CONFIG_ENV_UBI_VOLUME_REDUND="uboot_config_r"
>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>  CONFIG_STM32_ADC=y
> +CONFIG_CLK_SCMI=y
>  CONFIG_SET_DFU_ALT_INFO=y
>  CONFIG_USB_FUNCTION_FASTBOOT=y
>  CONFIG_FASTBOOT_BUF_ADDR=0xC0000000
> @@ -107,6 +108,7 @@ CONFIG_DM_REGULATOR_GPIO=y
>  CONFIG_DM_REGULATOR_STM32_VREFBUF=y
>  CONFIG_DM_REGULATOR_STPMIC1=y
>  CONFIG_REMOTEPROC_STM32_COPRO=y
> +CONFIG_RESET_SCMI=y
>  CONFIG_DM_RNG=y
>  CONFIG_RNG_STM32MP1=y
>  CONFIG_DM_RTC=y
> 



Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver
  2021-03-09 12:57   ` Patrice CHOTARD
@ 2021-03-12 12:24     ` Patrice CHOTARD
  2021-03-12 12:24     ` Patrice CHOTARD
  1 sibling, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:24 UTC (permalink / raw)
  To: u-boot

HI

On 3/9/21 1:57 PM, Patrice CHOTARD wrote:
> Hi Patrick
> 
> On 2/24/21 11:19 AM, Patrick Delaunay wrote:
>> From: Etienne Carriere <etienne.carriere@st.com>
>>
>> Define in the RCC clock provider node which root clocks the driver
>> depends on. These are root oscillators, which may be present or
>> not, upon FDT content.
>>
>> This update binding is introduced in Linux kernel device tree by patch
>> "ARM: dts: stm32: move clocks/resets to SCMI resources for stm32mp15"
>>
>> This patch is a preliminary step for SCMI support of stm32mp15
>> boards with trusted boot chain, based on TF-A or OP-TEE.
>>
>> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>
>> Reference:
>>
>> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210126090120.19900-13-gabriel.fernandez at foss.st.com/
>>
>>
>>  arch/arm/dts/stm32mp151.dtsi | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
>> index eedea6f4b8..b564fc6269 100644
>> --- a/arch/arm/dts/stm32mp151.dtsi
>> +++ b/arch/arm/dts/stm32mp151.dtsi
>> @@ -1136,6 +1136,10 @@
>>  			reg = <0x50000000 0x1000>;
>>  			#clock-cells = <1>;
>>  			#reset-cells = <1>;
>> +
>> +			clock-names = "hse", "hsi", "csi", "lse", "lsi";
>> +			clocks = <&clk_hse>, <&clk_hsi>, <&clk_csi>,
>> +				 <&clk_lse>, <&clk_lsi>;
>>  		};
>>  
>>  		pwr_regulators: pwr at 50001000 {
>>
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver
  2021-03-09 12:57   ` Patrice CHOTARD
  2021-03-12 12:24     ` Patrice CHOTARD
@ 2021-03-12 12:24     ` Patrice CHOTARD
  1 sibling, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:24 UTC (permalink / raw)
  To: u-boot

HI

On 3/9/21 1:57 PM, Patrice CHOTARD wrote:
> Hi Patrick
> 
> On 2/24/21 11:19 AM, Patrick Delaunay wrote:
>> From: Etienne Carriere <etienne.carriere@st.com>
>>
>> Define in the RCC clock provider node which root clocks the driver
>> depends on. These are root oscillators, which may be present or
>> not, upon FDT content.
>>
>> This update binding is introduced in Linux kernel device tree by patch
>> "ARM: dts: stm32: move clocks/resets to SCMI resources for stm32mp15"
>>
>> This patch is a preliminary step for SCMI support of stm32mp15
>> boards with trusted boot chain, based on TF-A or OP-TEE.
>>
>> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>
>> Reference:
>>
>> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210126090120.19900-13-gabriel.fernandez at foss.st.com/
>>
>>
>>  arch/arm/dts/stm32mp151.dtsi | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
>> index eedea6f4b8..b564fc6269 100644
>> --- a/arch/arm/dts/stm32mp151.dtsi
>> +++ b/arch/arm/dts/stm32mp151.dtsi
>> @@ -1136,6 +1136,10 @@
>>  			reg = <0x50000000 0x1000>;
>>  			#clock-cells = <1>;
>>  			#reset-cells = <1>;
>> +
>> +			clock-names = "hse", "hsi", "csi", "lse", "lsi";
>> +			clocks = <&clk_hse>, <&clk_hsi>, <&clk_csi>,
>> +				 <&clk_lse>, <&clk_lsi>;
>>  		};
>>  
>>  		pwr_regulators: pwr at 50001000 {
>>
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 2/6] clk: stm32mp1: gets root clocks from fdt
  2021-03-09 13:02   ` Patrice CHOTARD
@ 2021-03-12 12:24     ` Patrice CHOTARD
  0 siblings, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:24 UTC (permalink / raw)
  To: u-boot

Hi

On 3/9/21 2:02 PM, Patrice CHOTARD wrote:
> Hi Patrick
> 
> On 2/24/21 11:19 AM, Patrick Delaunay wrote:
>> From: Etienne Carriere <etienne.carriere@st.com>
>>
>> This change makes stm32mp1 clock driver to get the root clocks
>> reference from the device node in the FDT rather than fetching
>> straight these clocks by their name. Driver now stores the
>> clock reference and use it to know if a root clock is present,
>> get its rate or gets its related udevice reference.
>>
>> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>
>>  drivers/clk/clk_stm32mp1.c | 62 ++++++++++++++------------------------
>>  1 file changed, 23 insertions(+), 39 deletions(-)
>>
>> diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
>> index 848e33f4e8..0c0ef366a1 100644
>> --- a/drivers/clk/clk_stm32mp1.c
>> +++ b/drivers/clk/clk_stm32mp1.c
>> @@ -250,7 +250,7 @@ DECLARE_GLOBAL_DATA_PTR;
>>  enum stm32mp1_parent_id {
>>  /*
>>   * _HSI, _HSE, _CSI, _LSI, _LSE should not be moved
>> - * they are used as index in osc[] as entry point
>> + * they are used as index in osc_clk[] as clock reference
>>   */
>>  	_HSI,
>>  	_HSE,
>> @@ -430,8 +430,7 @@ struct stm32mp1_clk_data {
>>  struct stm32mp1_clk_priv {
>>  	fdt_addr_t base;
>>  	const struct stm32mp1_clk_data *data;
>> -	ulong osc[NB_OSC];
>> -	struct udevice *osc_dev[NB_OSC];
>> +	struct clk osc_clk[NB_OSC];
>>  };
>>  
>>  #define STM32MP1_CLK(off, b, idx, s)		\
>> @@ -790,7 +789,7 @@ static ulong stm32mp1_clk_get_fixed(struct stm32mp1_clk_priv *priv, int idx)
>>  		return 0;
>>  	}
>>  
>> -	return priv->osc[idx];
>> +	return clk_get_rate(&priv->osc_clk[idx]);
>>  }
>>  
>>  static int stm32mp1_clk_get_id(struct stm32mp1_clk_priv *priv, unsigned long id)
>> @@ -1545,7 +1544,7 @@ static int stm32mp1_hsidiv(fdt_addr_t rcc, ulong hsifreq)
>>  			break;
>>  
>>  	if (hsidiv == 4) {
>> -		log_err("clk-hsi frequency invalid");
>> +		log_err("hsi frequency invalid");
>>  		return -1;
>>  	}
>>  
>> @@ -1952,13 +1951,13 @@ static int stm32mp1_clktree(struct udevice *dev)
>>  	 * switch ON oscillator found in device-tree,
>>  	 * HSI already ON after bootrom
>>  	 */
>> -	if (priv->osc[_LSI])
>> +	if (clk_valid(&priv->osc_clk[_LSI]))
>>  		stm32mp1_lsi_set(rcc, 1);
>>  
>> -	if (priv->osc[_LSE]) {
>> +	if (clk_valid(&priv->osc_clk[_LSE])) {
>>  		int bypass, digbyp;
>>  		u32 lsedrv;
>> -		struct udevice *dev = priv->osc_dev[_LSE];
>> +		struct udevice *dev = priv->osc_clk[_LSE].dev;
>>  
>>  		bypass = dev_read_bool(dev, "st,bypass");
>>  		digbyp = dev_read_bool(dev, "st,digbypass");
>> @@ -1969,9 +1968,9 @@ static int stm32mp1_clktree(struct udevice *dev)
>>  		stm32mp1_lse_enable(rcc, bypass, digbyp, lsedrv);
>>  	}
>>  
>> -	if (priv->osc[_HSE]) {
>> +	if (clk_valid(&priv->osc_clk[_HSE])) {
>>  		int bypass, digbyp, css;
>> -		struct udevice *dev = priv->osc_dev[_HSE];
>> +		struct udevice *dev = priv->osc_clk[_HSE].dev;
>>  
>>  		bypass = dev_read_bool(dev, "st,bypass");
>>  		digbyp = dev_read_bool(dev, "st,digbypass");
>> @@ -1996,8 +1995,8 @@ static int stm32mp1_clktree(struct udevice *dev)
>>  
>>  	/* configure HSIDIV */
>>  	dev_dbg(dev, "configure HSIDIV\n");
>> -	if (priv->osc[_HSI]) {
>> -		stm32mp1_hsidiv(rcc, priv->osc[_HSI]);
>> +	if (clk_valid(&priv->osc_clk[_HSI])) {
>> +		stm32mp1_hsidiv(rcc, clk_get_rate(&priv->osc_clk[_HSI]));
>>  		stgen_config(priv);
>>  	}
>>  
>> @@ -2043,7 +2042,7 @@ static int stm32mp1_clktree(struct udevice *dev)
>>  	}
>>  
>>  	/* wait LSE ready before to use it */
>> -	if (priv->osc[_LSE])
>> +	if (clk_valid(&priv->osc_clk[_LSE]))
>>  		stm32mp1_lse_wait(rcc);
>>  
>>  	/* configure with expected clock source */
>> @@ -2082,7 +2081,7 @@ static int stm32mp1_clktree(struct udevice *dev)
>>  
>>  	dev_dbg(dev, "oscillator off\n");
>>  	/* switch OFF HSI if not found in device-tree */
>> -	if (!priv->osc[_HSI])
>> +	if (!clk_valid(&priv->osc_clk[_HSI]))
>>  		stm32mp1_hsi_set(rcc, 0);
>>  
>>  	/* Software Self-Refresh mode (SSR) during DDR initilialization */
>> @@ -2178,40 +2177,25 @@ static ulong stm32mp1_clk_set_rate(struct clk *clk, unsigned long clk_rate)
>>  	return -EINVAL;
>>  }
>>  
>> -static void stm32mp1_osc_clk_init(const char *name,
>> -				  struct stm32mp1_clk_priv *priv,
>> -				  int index)
>> -{
>> -	struct clk clk;
>> -	struct udevice *dev = NULL;
>> -
>> -	priv->osc[index] = 0;
>> -	clk.id = 0;
>> -	if (!uclass_get_device_by_name(UCLASS_CLK, name, &dev)) {
>> -		if (clk_request(dev, &clk))
>> -			log_err("%s request", name);
>> -		else
>> -			priv->osc[index] = clk_get_rate(&clk);
>> -	}
>> -	priv->osc_dev[index] = dev;
>> -}
>> -
>>  static void stm32mp1_osc_init(struct udevice *dev)
>>  {
>>  	struct stm32mp1_clk_priv *priv = dev_get_priv(dev);
>>  	int i;
>>  	const char *name[NB_OSC] = {
>> -		[_LSI] = "clk-lsi",
>> -		[_LSE] = "clk-lse",
>> -		[_HSI] = "clk-hsi",
>> -		[_HSE] = "clk-hse",
>> -		[_CSI] = "clk-csi",
>> +		[_LSI] = "lsi",
>> +		[_LSE] = "lse",
>> +		[_HSI] = "hsi",
>> +		[_HSE] = "hse",
>> +		[_CSI] = "csi",
>>  		[_I2S_CKIN] = "i2s_ckin",
>>  	};
>>  
>>  	for (i = 0; i < NB_OSC; i++) {
>> -		stm32mp1_osc_clk_init(name[i], priv, i);
>> -		dev_dbg(dev, "%d: %s => %x\n", i, name[i], (u32)priv->osc[i]);
>> +		if (clk_get_by_name(dev, name[i], &priv->osc_clk[i]))
>> +			dev_dbg(dev, "No source clock \"%s\"", name[i]);
>> +		else
>> +			dev_dbg(dev, "%s clock rate: %luHz\n",
>> +				name[i], clk_get_rate(&priv->osc_clk[i]));
>>  	}
>>  }
>>  
>>
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
> Thanks
> Patrice
> _______________________________________________
> Uboot-stm32 mailing list
> Uboot-stm32 at st-md-mailman.stormreply.com
> https://st-md-mailman.stormreply.com/mailman/listinfo/uboot-stm32
> 
Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 3/6] scmi: Include device_compat.h
  2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
@ 2021-03-12 12:25     ` Patrice CHOTARD
  0 siblings, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:25 UTC (permalink / raw)
  To: u-boot

HI

On 3/9/21 2:03 PM, Patrice CHOTARD wrote:
> Hi Patrick
> 
> On 2/24/21 11:19 AM, Patrick Delaunay wrote:
>> Include the file needed for log function prototype, this patch solves the
>> compilation issue for undefined reference to `dev_err'.
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>
>>  drivers/firmware/scmi/smccc_agent.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
>> index 64d0929f69..81c2884bb7 100644
>> --- a/drivers/firmware/scmi/smccc_agent.c
>> +++ b/drivers/firmware/scmi/smccc_agent.c
>> @@ -9,6 +9,7 @@
>>  #include <scmi_agent.h>
>>  #include <scmi_agent-uclass.h>
>>  #include <dm/devres.h>
>> +#include <dm/device_compat.h>
>>  #include <dm/device-internal.h>
>>  #include <linux/arm-smccc.h>
>>  #include <linux/compat.h>
>>
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
> Thanks
> Patrice
> 
Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 4/6] scmi: define LOG_CATEGORY
  2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
@ 2021-03-12 12:25     ` Patrice CHOTARD
  0 siblings, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:25 UTC (permalink / raw)
  To: u-boot

Hi

On 3/9/21 2:03 PM, Patrice CHOTARD wrote:
> Hi Patrick
> 
> On 2/24/21 11:19 AM, Patrick Delaunay wrote:
>> Define LOG_CATEGORY to allow filtering with log command.
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>
>>  drivers/firmware/scmi/mailbox_agent.c        | 2 ++
>>  drivers/firmware/scmi/sandbox-scmi_agent.c   | 2 ++
>>  drivers/firmware/scmi/sandbox-scmi_devices.c | 2 ++
>>  drivers/firmware/scmi/scmi_agent-uclass.c    | 2 ++
>>  drivers/firmware/scmi/smccc_agent.c          | 2 ++
>>  drivers/firmware/scmi/smt.c                  | 2 ++
>>  6 files changed, 12 insertions(+)
>>
>> diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
>> index 3f4b04a4ae..8043e2c2de 100644
>> --- a/drivers/firmware/scmi/mailbox_agent.c
>> +++ b/drivers/firmware/scmi/mailbox_agent.c
>> @@ -3,6 +3,8 @@
>>   * Copyright (C) 2020 Linaro Limited.
>>   */
>>  
>> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
>> +
>>  #include <common.h>
>>  #include <dm.h>
>>  #include <dm/device_compat.h>
>> diff --git a/drivers/firmware/scmi/sandbox-scmi_agent.c b/drivers/firmware/scmi/sandbox-scmi_agent.c
>> index 35de68c75d..97a5dace15 100644
>> --- a/drivers/firmware/scmi/sandbox-scmi_agent.c
>> +++ b/drivers/firmware/scmi/sandbox-scmi_agent.c
>> @@ -3,6 +3,8 @@
>>   * Copyright (C) 2020, Linaro Limited
>>   */
>>  
>> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
>> +
>>  #include <common.h>
>>  #include <dm.h>
>>  #include <malloc.h>
>> diff --git a/drivers/firmware/scmi/sandbox-scmi_devices.c b/drivers/firmware/scmi/sandbox-scmi_devices.c
>> index 1a6fafbf53..69239a198f 100644
>> --- a/drivers/firmware/scmi/sandbox-scmi_devices.c
>> +++ b/drivers/firmware/scmi/sandbox-scmi_devices.c
>> @@ -3,6 +3,8 @@
>>   * Copyright (C) 2020, Linaro Limited
>>   */
>>  
>> +#define LOG_CATEGORY UCLASS_MISC
>> +
>>  #include <common.h>
>>  #include <clk.h>
>>  #include <dm.h>
>> diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
>> index 516e690ac2..2491e0a747 100644
>> --- a/drivers/firmware/scmi/scmi_agent-uclass.c
>> +++ b/drivers/firmware/scmi/scmi_agent-uclass.c
>> @@ -3,6 +3,8 @@
>>   * Copyright (C) 2020 Linaro Limited.
>>   */
>>  
>> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
>> +
>>  #include <common.h>
>>  #include <dm.h>
>>  #include <dm/device_compat.h>
>> diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c
>> index 81c2884bb7..f185891e8f 100644
>> --- a/drivers/firmware/scmi/smccc_agent.c
>> +++ b/drivers/firmware/scmi/smccc_agent.c
>> @@ -3,6 +3,8 @@
>>   * Copyright (C) 2020 Linaro Limited.
>>   */
>>  
>> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
>> +
>>  #include <common.h>
>>  #include <dm.h>
>>  #include <errno.h>
>> diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c
>> index d25478796a..60b9d499b7 100644
>> --- a/drivers/firmware/scmi/smt.c
>> +++ b/drivers/firmware/scmi/smt.c
>> @@ -4,6 +4,8 @@
>>   * Copyright (C) 2019-2020 Linaro Limited.
>>   */
>>  
>> +#define LOG_CATEGORY UCLASS_SCMI_AGENT
>> +
>>  #include <common.h>
>>  #include <cpu_func.h>
>>  #include <dm.h>
>>
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
> Thanks
> Patrice
> _______________________________________________
> Uboot-stm32 mailing list
> Uboot-stm32 at st-md-mailman.stormreply.com
> https://st-md-mailman.stormreply.com/mailman/listinfo/uboot-stm32
> 

Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 5/6] scmi: cosmetic: reorder include files
  2021-03-09 13:04   ` [Uboot-stm32] " Patrice CHOTARD
@ 2021-03-12 12:26     ` Patrice CHOTARD
  2021-03-12 12:26       ` Patrice CHOTARD
  0 siblings, 1 reply; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:26 UTC (permalink / raw)
  To: u-boot



On 3/9/21 2:04 PM, Patrice CHOTARD wrote:
> Hi Patrick
> 
> On 2/24/21 11:19 AM, Patrick Delaunay wrote:
>> Reorder include files in expected order.
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>
>>  drivers/firmware/scmi/mailbox_agent.c     | 2 +-
>>  drivers/firmware/scmi/scmi_agent-uclass.c | 3 +--
>>  2 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
>> index 8043e2c2de..ea35e7e09e 100644
>> --- a/drivers/firmware/scmi/mailbox_agent.c
>> +++ b/drivers/firmware/scmi/mailbox_agent.c
>> @@ -7,11 +7,11 @@
>>  
>>  #include <common.h>
>>  #include <dm.h>
>> -#include <dm/device_compat.h>
>>  #include <errno.h>
>>  #include <mailbox.h>
>>  #include <scmi_agent.h>
>>  #include <scmi_agent-uclass.h>
>> +#include <dm/device_compat.h>
>>  #include <dm/devres.h>
>>  #include <linux/compat.h>
>>  
>> diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
>> index 2491e0a747..527163b5ce 100644
>> --- a/drivers/firmware/scmi/scmi_agent-uclass.c
>> +++ b/drivers/firmware/scmi/scmi_agent-uclass.c
>> @@ -7,11 +7,10 @@
>>  
>>  #include <common.h>
>>  #include <dm.h>
>> -#include <dm/device_compat.h>
>>  #include <errno.h>
>>  #include <scmi_agent-uclass.h>
>>  #include <scmi_protocols.h>
>> -
>> +#include <dm/device_compat.h>
>>  #include <dm/device-internal.h>
>>  #include <linux/compat.h>
>>  
>>
> 
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
> Thanks
> Patrice
> 
Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Uboot-stm32] [PATCH 5/6] scmi: cosmetic: reorder include files
  2021-03-12 12:26     ` Patrice CHOTARD
@ 2021-03-12 12:26       ` Patrice CHOTARD
  0 siblings, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:26 UTC (permalink / raw)
  To: u-boot

Hi

On 3/12/21 1:26 PM, Patrice CHOTARD wrote:
> 
> 
> On 3/9/21 2:04 PM, Patrice CHOTARD wrote:
>> Hi Patrick
>>
>> On 2/24/21 11:19 AM, Patrick Delaunay wrote:
>>> Reorder include files in expected order.
>>>
>>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>>> ---
>>>
>>>  drivers/firmware/scmi/mailbox_agent.c     | 2 +-
>>>  drivers/firmware/scmi/scmi_agent-uclass.c | 3 +--
>>>  2 files changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
>>> index 8043e2c2de..ea35e7e09e 100644
>>> --- a/drivers/firmware/scmi/mailbox_agent.c
>>> +++ b/drivers/firmware/scmi/mailbox_agent.c
>>> @@ -7,11 +7,11 @@
>>>  
>>>  #include <common.h>
>>>  #include <dm.h>
>>> -#include <dm/device_compat.h>
>>>  #include <errno.h>
>>>  #include <mailbox.h>
>>>  #include <scmi_agent.h>
>>>  #include <scmi_agent-uclass.h>
>>> +#include <dm/device_compat.h>
>>>  #include <dm/devres.h>
>>>  #include <linux/compat.h>
>>>  
>>> diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
>>> index 2491e0a747..527163b5ce 100644
>>> --- a/drivers/firmware/scmi/scmi_agent-uclass.c
>>> +++ b/drivers/firmware/scmi/scmi_agent-uclass.c
>>> @@ -7,11 +7,10 @@
>>>  
>>>  #include <common.h>
>>>  #include <dm.h>
>>> -#include <dm/device_compat.h>
>>>  #include <errno.h>
>>>  #include <scmi_agent-uclass.h>
>>>  #include <scmi_protocols.h>
>>> -
>>> +#include <dm/device_compat.h>
>>>  #include <dm/device-internal.h>
>>>  #include <linux/compat.h>
>>>  
>>>
>>
>>
>> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
>>
>> Thanks
>> Patrice
>>
> Applied to u-boot-stm/next
> 
> Thanks
> 
> Patrice
> 
Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-03-12 12:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 10:19 [PATCH 0/6] stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
2021-02-24 10:19 ` [PATCH 1/6] ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver Patrick Delaunay
2021-03-09 12:57   ` Patrice CHOTARD
2021-03-12 12:24     ` Patrice CHOTARD
2021-03-12 12:24     ` Patrice CHOTARD
2021-02-24 10:19 ` [PATCH 2/6] clk: stm32mp1: gets root clocks from fdt Patrick Delaunay
2021-03-09 13:02   ` Patrice CHOTARD
2021-03-12 12:24     ` [Uboot-stm32] " Patrice CHOTARD
2021-02-24 10:19 ` [PATCH 3/6] scmi: Include device_compat.h Patrick Delaunay
2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
2021-03-12 12:25     ` Patrice CHOTARD
2021-03-09 13:03   ` Patrice CHOTARD
2021-02-24 10:19 ` [PATCH 4/6] scmi: define LOG_CATEGORY Patrick Delaunay
2021-02-25 19:31   ` Simon Glass
2021-03-09 13:03   ` [Uboot-stm32] " Patrice CHOTARD
2021-03-12 12:25     ` Patrice CHOTARD
2021-02-24 10:19 ` [PATCH 5/6] scmi: cosmetic: reorder include files Patrick Delaunay
2021-03-09 13:04   ` [Uboot-stm32] " Patrice CHOTARD
2021-03-12 12:26     ` Patrice CHOTARD
2021-03-12 12:26       ` Patrice CHOTARD
2021-02-24 10:19 ` [PATCH 6/6] configs: stm32mp1_trusted_defconfig rely on SCMI support Patrick Delaunay
2021-03-09 13:05   ` Patrice CHOTARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.