Skip to contentSkip to conversation

Xilinx Microblaze IP updates

PATCH Applied Peter Crosthwaite 2 participants 5 messages Dec 5, 2012 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

cover Xilinx Microblaze IP updates

Minor fixes to xilinx microblaze IP.

Peter Crosthwaite (3):
xilinx_axienet: Implement R_IS behaviour
xilinx_uartlite: suppress "cannot receive message"
xilinx_uartlite: Accept input after rx FIFO pop

 hw/xilinx_axienet.c  |    4 ++++
 hw/xilinx_uartlite.c |    7 ++-----
 2 files changed, 6 insertions(+), 5 deletions(-)
#1 lore raw

PATCH 1/3 xilinx_axienet: Implement R_IS behaviour

The interrupt status register R_IS is the standard clear-on-write behaviour. This was unimplemented and defaulting to updating the register to the written value. Implemented clear-on-write.

---

 hw/xilinx_axienet.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
hw/xilinx_axienet.c +4 -0
index baae02b..f2e3bf1 100644
@@ -591,6 +591,10 @@ static void enet_write(void *opaque, hwaddr addr,
             s->maddr[s->fmi & 3][addr & 1] = value;
             break;
 
+        case R_IS:
+            s->regs[addr] &= ~value;
+            break;
+
         case 0x8000 ... 0x83ff:
             s->ext_mtable[addr - 0x8000] = value;
             break;
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/3 xilinx_uartlite: suppress "cannot receive message"

In reply to Peter Crosthwaite

This message is not an error condition, its just informing the user that the device is corking the uart traffic to not drop characters.

---

 hw/xilinx_uartlite.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
hw/xilinx_uartlite.c +1 -5
index d20fc41..f890f23 100644
@@ -182,12 +182,8 @@ static void uart_rx(void *opaque, const uint8_t *buf, int size)
 static int uart_can_rx(void *opaque)
 {
     struct xlx_uartlite *s = opaque;
-    int r;
 
-    r = s->rx_fifo_len < sizeof(s->rx_fifo);
-    if (!r)
-        printf("cannot receive!\n");
-    return r;
+    return s->rx_fifo_len < sizeof(s->rx_fifo);
 }
 
 static void uart_event(void *opaque, int event)
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 3/3 xilinx_uartlite: Accept input after rx FIFO pop

In reply to Peter Crosthwaite

The device return false from the can receive function when the FIFO is full. This mean the device should check for buffered input whenever a byte is popped from the FIFO.

---

 hw/xilinx_uartlite.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/xilinx_uartlite.c +1 -0
index f890f23..02c5850 100644
@@ -97,6 +97,7 @@ uart_read(void *opaque, hwaddr addr, unsigned int size)
                 s->rx_fifo_len--;
             uart_update_status(s);
             uart_update_irq(s);
+            qemu_chr_accept_input(s->chr);
             break;
 
         default:
Signature · 1 line
1.7.0.4
#4 lore raw
In reply to Peter Crosthwaite
Quoted 11 lines · Peter Crosthwaite

Minor fixes to xilinx microblaze IP.

Peter Crosthwaite (3):
xilinx_axienet: Implement R_IS behaviour
xilinx_uartlite: suppress "cannot receive message"
xilinx_uartlite: Accept input after rx FIFO pop

 hw/xilinx_axienet.c  |    4 ++++
 hw/xilinx_uartlite.c |    7 ++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

Applied all, thanks Peter.