]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Do not send magic seq when changing baudrate back to 115200
authorPali Rohár <pali@kernel.org>
Mon, 1 Nov 2021 13:00:02 +0000 (14:00 +0100)
committerStefan Roese <sr@denx.de>
Wed, 3 Nov 2021 05:45:34 +0000 (06:45 +0100)
commit79ab9f22e5ee916f9b5d8216a1cc1769a77e0c2e
tree41dc9d203a5522937302ed99becea79b0b96c3a7
parent0aead2d5ed148c18bc39e25964175c91bb8c7899
tools: kwboot: Do not send magic seq when changing baudrate back to 115200

After successful transfer of whole image only two things can happen:
- BootROM starts execution of data block, which changes UART baudrate
  back to 115200 Bd,
- board crashes and causes CPU reset

In both cases UART baudrate is reset to the default speed. So there is
no need to send special magic sequence to inform kwboot that baudrate is
going to be reset and kwboot does not need to wait for this event and
can do it immediately after BootROM acknowledges end of xmodem transfer.

Move ARM code for sending magic sequence from main baudrate change
section to binhdr_pre section which is executed only before changing
baudrate from the default value of 115200 Bd to some new value. Remove
kwboot code waiting for magic sequence after successful xmodem transfer.

Rationale: sometimes when using very high UART speeds, magic sequence is
damaged and kwboot fails at this last stage. Removal of this magic
sequence makes booting more stable.

Data transfer protocol (xmodem) is using checksums and retransmit, so it
already deals with possible errors on transfer line.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwboot.c