* [Qemu-devel] [PATCH] cadence_uart: More debug information
@ 2012-10-19 9:08 Peter Crosthwaite
2012-10-19 10:54 ` Peter Maydell
2012-10-29 9:47 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Peter Crosthwaite @ 2012-10-19 9:08 UTC (permalink / raw)
To: qemu-devel, qemu-trivial; +Cc: Peter Crosthwaite
Add more helpful debug information to the cadence UART.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
hw/cadence_uart.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/cadence_uart.c b/hw/cadence_uart.c
index f8afc4e..483a316 100644
--- a/hw/cadence_uart.c
+++ b/hw/cadence_uart.c
@@ -359,7 +359,7 @@ static void uart_write(void *opaque, target_phys_addr_t offset,
{
UartState *s = (UartState *)opaque;
- DB_PRINT(" offset:%x data:%08x\n", offset, (unsigned)value);
+ DB_PRINT(" offset:%x data:%08x\n", (unsigned)offset, (unsigned)value);
offset >>= 2;
switch (offset) {
case R_IER: /* ier (wts imr) */
@@ -405,12 +405,15 @@ static uint64_t uart_read(void *opaque, target_phys_addr_t offset,
offset >>= 2;
if (offset >= R_MAX) {
- return 0;
+ c = 0;
} else if (offset == R_TX_RX) {
uart_read_rx_fifo(s, &c);
- return c;
+ } else {
+ c = s->r[offset];
}
- return s->r[offset];
+
+ DB_PRINT(" offset:%x data:%08x\n", (unsigned)(offset << 2), (unsigned)c);
+ return c;
}
static const MemoryRegionOps uart_ops = {
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] cadence_uart: More debug information
2012-10-19 9:08 [Qemu-devel] [PATCH] cadence_uart: More debug information Peter Crosthwaite
@ 2012-10-19 10:54 ` Peter Maydell
2012-10-29 9:47 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2012-10-19 10:54 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: qemu-trivial, qemu-devel
On 19 October 2012 10:08, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> Add more helpful debug information to the cadence UART.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] cadence_uart: More debug information
2012-10-19 9:08 [Qemu-devel] [PATCH] cadence_uart: More debug information Peter Crosthwaite
2012-10-19 10:54 ` Peter Maydell
@ 2012-10-29 9:47 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-10-29 9:47 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: qemu-trivial, qemu-devel
On Fri, Oct 19, 2012 at 07:08:04PM +1000, Peter Crosthwaite wrote:
> Add more helpful debug information to the cadence UART.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
> hw/cadence_uart.c | 11 +++++++----
> 1 files changed, 7 insertions(+), 4 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-29 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19 9:08 [Qemu-devel] [PATCH] cadence_uart: More debug information Peter Crosthwaite
2012-10-19 10:54 ` Peter Maydell
2012-10-29 9:47 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).