|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [Qemu-arm] [Qemu-devel] [PATCH 2/7] hw/char/cmsdk-apb-uart.c: Implement CMSDK APB UART |
Date: | Tue, 11 Jul 2017 14:44:29 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/11/2017 12:12 PM, Alistair Francis wrote:
On Tue, Jul 11, 2017 at 1:17 PM, Peter Maydell <address@hidden> wrote:
[...]
+#include "qemu/osdep.h" +#include "qemu/log.h" +#include "qapi/error.h" +#include "trace.h" +#include "hw/sysbus.h" +#include "hw/registerfields.h"
[...]
+REG32(DATA, 0) +REG32(STATE, 4) + FIELD(STATE, TXFULL, 0, 1) + FIELD(STATE, RXFULL, 1, 1) + FIELD(STATE, TXOVERRUN, 2, 1) + FIELD(STATE, RXOVERRUN, 3, 1)You used pasrt of the register API but not the second part. This seems like a greaet device to use the register API on.
He did not used the Register API (declared in hw/register.h) but only the Register Fields API ;)
[Prev in Thread] | Current Thread | [Next in Thread] |