Fix setting of baud rate when coming out of reset.
Broadcomm convention requires that when we come out of reset
the baud rate is set to the default rate.
Original author: Mark Mendelsohn <mendelso@broadcom.com>
Change-Id: I40a34e02b3ca6eeac48fbbac8c41c35423f7fd91
diff --git a/brcm_patchram_plus/brcm_patchram_plus.c b/brcm_patchram_plus/brcm_patchram_plus.c
index bb15841..3aa5d24 100644
--- a/brcm_patchram_plus/brcm_patchram_plus.c
+++ b/brcm_patchram_plus/brcm_patchram_plus.c
@@ -655,6 +655,11 @@
read_event(uart_fd, buffer);
}
+ if (use_baudrate_for_download) {
+ cfsetospeed(&termios, B115200);
+ cfsetispeed(&termios, B115200);
+ tcsetattr(uart_fd, TCSANOW, &termios);
+ }
proc_reset();
}