[PATCH v2 14/15] tools: zynqmp_psu_init_minimize: Move helper functions below header includes

Stefan Herbrechtsmeier stefan.herbrechtsmeier-oss at weidmueller.com
Mon Jun 20 18:36:49 CEST 2022


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

Move helper functions below header includes to avoid forward
declarations.

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

---

Changes in v2:
- Remove forward declarations and move functions instead

 tools/zynqmp_psu_init_minimize.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/zynqmp_psu_init_minimize.sh b/tools/zynqmp_psu_init_minimize.sh
index c0a7a89465..16c622f6ce 100755
--- a/tools/zynqmp_psu_init_minimize.sh
+++ b/tools/zynqmp_psu_init_minimize.sh
@@ -143,6 +143,14 @@ sed -i -r 's| \{(\r[^\r]*;)\r\t*\}|\1|g' ${TMP}
 # if ((p_code >= 0x26) && ...) -> if (p_code >= 0x26 && ...)
 sed -i -r 's|\((._code .= [x[:xdigit:]]+)\)|\1|g' ${TMP}
 
+# Move helper functions below header includes
+TARGET="#include <xil_io.h>"
+START="static int serdes_rst_seq"
+END="static int serdes_enb_coarse_saturation"
+
+sed -i -e "s|\(${TARGET}\r\r\)\(.*\)\(${START}(.*\)\(${END}(\)|\1\3\2\4|g" \
+    ${TMP}
+
 # Convert back newlines
 tr "\r" "\n" <${TMP} >${OUT}
 
-- 
2.30.2



More information about the U-Boot mailing list