diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-14 15:59:09 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-05-14 15:59:09 +0000 |
commit | 28fe96b798c2b0a7abd07b2631f6d4abeaf9d4dd (patch) | |
tree | b36e50567ba4c3b69bd47cea4479e37b2d394d35 /sim/bfin/dv-bfin_uart2.c | |
parent | ba4a8bdd81e55d45b97cdf9b91eb111a7ac0d3f9 (diff) | |
download | gdb-28fe96b798c2b0a7abd07b2631f6d4abeaf9d4dd.zip gdb-28fe96b798c2b0a7abd07b2631f6d4abeaf9d4dd.tar.gz gdb-28fe96b798c2b0a7abd07b2631f6d4abeaf9d4dd.tar.bz2 |
sim: bfin: implement loop back support in the UARTs
The UART has a LOOP_ENA bit in its MCR register where writes to the THR
go to the RBR. Implement support for this mode.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/bfin/dv-bfin_uart2.c')
-rw-r--r-- | sim/bfin/dv-bfin_uart2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/bfin/dv-bfin_uart2.c b/sim/bfin/dv-bfin_uart2.c index 179574d..16ede50 100644 --- a/sim/bfin/dv-bfin_uart2.c +++ b/sim/bfin/dv-bfin_uart2.c @@ -89,7 +89,7 @@ bfin_uart_io_write_buffer (struct hw *me, const void *source, switch (mmr_off) { case mmr_offset(thr): - uart->thr = bfin_uart_write_byte (me, value); + uart->thr = bfin_uart_write_byte (me, value, uart->mcr); if (uart->ier & ETBEI) hw_port_event (me, DV_PORT_TX, 1); break; @@ -142,7 +142,7 @@ bfin_uart_io_read_buffer (struct hw *me, void *dest, switch (mmr_off) { case mmr_offset(rbr): - uart->rbr = bfin_uart_get_next_byte (me, uart->rbr, NULL); + uart->rbr = bfin_uart_get_next_byte (me, uart->rbr, uart->mcr, NULL); dv_store_2 (dest, uart->rbr); break; case mmr_offset(ier_set): |