]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_otp.c
dm: pmic: max77686: Correct two typos in a comment
[karo-tx-uboot.git] / common / cmd_otp.c
index 6f933355176296ac2541d0b45960dfbef87bb27d..593bb8c650ca18fdb5418884d3941d0191021f83 100644 (file)
@@ -18,6 +18,7 @@
 #include <command.h>
 
 #include <asm/blackfin.h>
+#include <asm/clock.h>
 #include <asm/mach-common/bits/otp.h>
 
 static const char *otp_strerror(uint32_t err)
@@ -157,21 +158,9 @@ int do_otp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                        lowup(half + count - 1), page + (half + count - 1) / 2,
                        half + count
                );
-
-               i = 0;
-               while (1) {
-                       if (tstc()) {
-                               const char exp_ans[] = "YES\r";
-                               char c;
-                               putc(c = getc());
-                               if (exp_ans[i++] != c) {
-                                       printf(" Aborting\n");
-                                       return 1;
-                               } else if (!exp_ans[i]) {
-                                       puts("\n");
-                                       break;
-                               }
-                       }
+               if (!confirm_yesno()) {
+                       printf(" Aborting\n");
+                       return 1;
                }
        }