aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier2022-06-20 18:36:49 +0200
committerMichal Simek2022-06-24 14:37:27 +0200
commitd2162549fee294740d419634e973c017ba845d70 (patch)
treebb7e363543a0720933c0e0c6cb33a77b826e8c75
parent4d8f2bb151fbe9aa632050aca670c18ac5d96fbe (diff)
tools: zynqmp_psu_init_minimize: Move helper functions below header includes
Move helper functions below header includes to avoid forward declarations. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Link: https://lore.kernel.org/r/20220620163650.18756-14-stefan.herbrechtsmeier-oss@weidmueller.com Signed-off-by: Michal Simek <michal.simek@amd.com>
-rwxr-xr-xtools/zynqmp_psu_init_minimize.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/zynqmp_psu_init_minimize.sh b/tools/zynqmp_psu_init_minimize.sh
index c0a7a89465e..16c622f6ce7 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}