[PATCH v5 5/5] firmware: zynqmp: Store driver data in data section

Stefan Herbrechtsmeier stefan.herbrechtsmeier-oss at weidmueller.com
Tue May 23 14:42:14 CEST 2023


From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.com>

Store the driver data in the data section to make the data usable before
relocation. Additionally mark the driver data static to restrict the
access.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.com>
---

Changes in v5:
- Added

 drivers/firmware/firmware-zynqmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index e1abfb4cec..74d1b67541 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -23,10 +23,10 @@
 #define XST_PM_NO_ACCESS	2002L
 #define XST_PM_ALREADY_CONFIGURED	2009L
 
-struct zynqmp_power {
+static struct zynqmp_power {
 	struct mbox_chan tx_chan;
 	struct mbox_chan rx_chan;
-} zynqmp_power = {};
+} zynqmp_power __section(".data");
 
 #define NODE_ID_LOCATION	5
 
-- 
2.30.2



More information about the U-Boot mailing list