loadsvf: Declare JTAG_set_mode in jtag.h

Declare JTAG_set_mode() in jtag.h to prevent an implicit function
declaration compiler error when compiling with GCC 15.

In loadsvf, main.c calls JTAG_set_mode(), which is implemented in
src/jtag.c but was omitted from the header src/jtag.h. Under GCC 15,
-Werror=implicit-function-declaration is enabled by default, causing
the compilation of main.c to fail.

Google-Bug-Id: 568356611
Tested: BitBake built loadsvf successfully
Change-Id: I4140592ad10fb100d715c6d8c1741847f3f6be9e
Signed-off-by: Bart Van Assche <bvanassche@google.com>
diff --git a/dynamic-layers/nuvoton-layer/recipes-nuvoton/loadsvf/loadsvf/0001-jtag.h-Declare-JTAG_set_mode.patch b/dynamic-layers/nuvoton-layer/recipes-nuvoton/loadsvf/loadsvf/0001-jtag.h-Declare-JTAG_set_mode.patch
new file mode 100644
index 0000000..458ef1b
--- /dev/null
+++ b/dynamic-layers/nuvoton-layer/recipes-nuvoton/loadsvf/loadsvf/0001-jtag.h-Declare-JTAG_set_mode.patch
@@ -0,0 +1,26 @@
+From b0e9ca88ba1bcc7c8be32115f8730515167b03e4 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@google.com>
+Date: Thu, 1 Oct 2026 07:05:26 -0700
+Subject: [PATCH] jtag.h: Declare JTAG_set_mode
+
+Fix implicit function declaration error with GCC 15 by declaring
+JTAG_set_mode in jtag.h.
+
+Signed-off-by: Bart Van Assche <bvanassche@google.com>
+---
+ src/jtag.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/jtag.h b/src/jtag.h
+index 4ae22657c83e..6ed28a7551f1 100644
+--- a/src/jtag.h
++++ b/src/jtag.h
+@@ -136,6 +136,7 @@ const char *tap_state_name(tap_state_t state);
+ tap_state_t tap_state_by_name(const char *name);
+ STATUS JTAG_set_pspi(int handle, unsigned int enable);
+ STATUS JTAG_set_pspi_irq(int handle, unsigned int enable);
++STATUS JTAG_set_mode(int handle, unsigned int Mode);
+ STATUS JTAG_set_cntlr_mode(int handle, const JTAGDriverState setMode);
+ STATUS JTAG_set_directgpio(int handle, unsigned int enable);
+ STATUS JTAG_set_tap_state(JTAG_Handler* state, JtagStates tap_state);
+-- 
diff --git a/dynamic-layers/nuvoton-layer/recipes-nuvoton/loadsvf/loadsvf_%.bbappend b/dynamic-layers/nuvoton-layer/recipes-nuvoton/loadsvf/loadsvf_%.bbappend
new file mode 100644
index 0000000..216799b
--- /dev/null
+++ b/dynamic-layers/nuvoton-layer/recipes-nuvoton/loadsvf/loadsvf_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " \
+    file://0001-jtag.h-Declare-JTAG_set_mode.patch \
+"