am335x, guardian: update swi logic

read boot mode gpio and set the swi status

Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Link: https://lore.kernel.org/r/20210611161350.2141-12-Gireesh.Hiremath@in.bosch.com
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 814048b..c76f9b2 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -64,13 +64,13 @@
 		"setenv rootflags \"bulk_read,chk_data_crc\"; " \
 		"setenv ethact usb_ether; " \
 		"if test \"${swi_status}\" -eq 1; then " \
-		  "setenv extrabootargs \"swi_attached\"; " \
 		  "if dhcp; then " \
 		    "sleep 1; " \
 		    "if tftp \"${tftp_load_addr}\" \"bootscript.scr\"; then " \
 		      "source \"${tftp_load_addr}\"; " \
 		    "fi; " \
 		  "fi; " \
+		  "setenv extrabootargs $extrabootargs \"swi_attached\"; " \
 		"fi;" \
 		"run bootcmd_ubifs0;\0" \
 	"altbootcmd=" \