import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / tty / serial / kgdboc.c
index 10020547c60b5735d4cbf667956c911aa06a1030..c030f66e3a0b5f2b0656600e35d8ad5f544d298d 100644 (file)
@@ -279,6 +279,32 @@ static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
        return configure_kgdboc();
 }
 
+int mtk_set_kgdboc_var(void)
+{
+       struct console *con = NULL;
+       
+       for_each_console(con) {
+               if (!strcmp(con->name, "ttyMT")) {
+                       snprintf(config, strlen(con->name)+2, "%s%d", con->name, con->index);
+                       printk("mtk_set_kgdboc_var=%s\n", config);
+               }
+       }
+       
+       if (configured == 1)
+               return 0;
+       /* Only copy in the string if the init function has not run yet */
+       if (configured < 0) {
+               return 0;
+       }
+       if (kgdb_connected) {
+               printk(KERN_ERR "kgdboc: Cannot reconfigure while KGDB is connected.\n");
+               return -EBUSY;
+       }
+
+       /* Go and configure with the new params. */
+       return configure_kgdboc();
+}
+
 static int dbg_restore_graphics;
 
 static void kgdboc_pre_exp_handler(void)