Fix {load,save}_baudrate value in saves/load{b,s,y} commands
authorPiotr Dymacz <pepe2k@gmail.com>
Fri, 16 Jun 2017 11:45:33 +0000 (13:45 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Fri, 16 Jun 2017 13:19:19 +0000 (15:19 +0200)
u-boot/common/cmd_load.c

index 4556d8905b1fa0e37fc48b753037fc69bf2c267b..1c4004d611bb13275f08bd5b31c1e181aa653c87 100644 (file)
@@ -116,6 +116,8 @@ int do_load_serial(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                if(i == N_BAUDRATES){
                        printf_err("baudrate %d bps is not supported, will use current: %d bps\n",
                                   load_baudrate, current_baudrate);
+
+                       load_baudrate = current_baudrate;
                } else {
                        switch_baudrate(load_baudrate, 0);
                }
@@ -310,6 +312,8 @@ int do_save_serial(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                if(i == N_BAUDRATES){
                        printf_err("baudrate %d bps is not supported, will use current: %d bps\n",
                                   save_baudrate, current_baudrate);
+
+                       save_baudrate = current_baudrate;
                } else {
                        switch_baudrate(save_baudrate, 0);
                }
@@ -504,6 +508,8 @@ int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                if(i == N_BAUDRATES){
                        printf_err("baudrate %d bps is not supported, will use current: %d bps\n",
                                   load_baudrate, current_baudrate);
+
+                       load_baudrate = current_baudrate;
                } else {
                        switch_baudrate(load_baudrate, 0);
                }