view target-utils/loadagent/serextra.S @ 992:c4c400c1b10c

fc-loadtool flash: no flash2 ppb-erase-all All PPBs from across the entire flash chip can only be erased together as a unit, spanning across both banks on 16 MiB chips - therefore, we shall disallow 'flash2 ppb-erase-all', and accept 'flash ppb-erase-all' only.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 03 Dec 2023 04:47:31 +0000
parents 3229940734e5
children
line wrap: on
line source

#include "ns16550.h"

@ extra serial I/O functions for loadagent binary operations

	.text
	.code	32
	.globl	serial_out_if_empty
serial_out_if_empty:
	ldr	r1, =uart_base
	ldr	r2, [r1]
	ldrb	r3, [r2, #NS16550_LSR]
	tst	r3, #NS16550_LSR_THRE
	strneb	r0, [r2, #NS16550_THR]
	bx	lr