8c6631e66e
include/hw: Do not include "hw/registerfields.h" in headers that don't need it
...
Include "hw/registerfields.h" in the .c files instead (if needed).
Message-Id: <20230210112315.1116966-1-thuth@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Thomas Huth <thuth@redhat.com >
2023-02-14 09:02:42 +01:00
bdc36ce649
hw/char/ibex_uart: Make the register layout private
...
We don't need to expose the register layout in the public header, so
don't.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Bin Meng <bmeng.cn@gmail.com >
Message-id: c437f570b2b30ab4170387a3ba2fad7d116a4986.1624001156.git.alistair.francis@wdc.com
2021-06-24 05:00:12 -07:00
82a4ed8e50
hw/char: disable ibex uart receive if the buffer is full
...
Not disabling the UART leads to QEMU overwriting the UART receive buffer with
the newest received byte. The rx_level variable is added to allow the use of
the existing OpenTitan driver libraries.
Signed-off-by: Alexander Wagner <alexander.wagner@ulal.de >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 20210309152130.13038-1-alexander.wagner@ulal.de
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
2021-03-22 21:54:40 -04:00
8063396bf3
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
...
This converts existing DECLARE_INSTANCE_CHECKER usage to
OBJECT_DECLARE_SIMPLE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \
--pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Paul Durrant <paul@xen.org >
Message-Id: <20200916182519.415636-6-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-09-18 14:12:32 -04:00
8110fa1d94
Use DECLARE_*CHECKER* macros
...
Generated using:
$ ./scripts/codeconverter/converter.py -i \
--pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]')
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-12-ehabkost@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-13-ehabkost@redhat.com >
Message-Id: <20200831210740.126168-14-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-09-09 09:27:09 -04:00
db1015e92e
Move QOM typedefs and add missing includes
...
Some typedefs and macros are defined after the type check macros.
This makes it difficult to automatically replace their
definitions with OBJECT_DECLARE_TYPE.
Patch generated using:
$ ./scripts/codeconverter/converter.py -i \
--pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]')
which will split "typdef struct { ... } TypedefName"
declarations.
Followed by:
$ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \
$(git grep -l '' -- '*.[ch]')
which will:
- move the typedefs and #defines above the type check macros
- add missing #include "qom/object.h" lines if necessary
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-9-ehabkost@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-10-ehabkost@redhat.com >
Message-Id: <20200831210740.126168-11-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-09-09 09:26:43 -04:00
59093cc407
hw/char: Convert the Ibex UART to use the registerfields API
...
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 06372c9cdeec715077899e71c858d9f0a2a3395b.1594332223.git.alistair.francis@wdc.com
Message-Id: <06372c9cdeec715077899e71c858d9f0a2a3395b.1594332223.git.alistair.francis@wdc.com >
2020-07-13 17:25:37 -07:00
940aabb9f4
hw/char: Convert the Ibex UART to use the qdev Clock model
...
Conver the Ibex UART to use the recently added qdev-clock functions.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-id: b0136fad870a29049959ec161c1217b967d7e19d.1594332223.git.alistair.francis@wdc.com
Message-Id: <b0136fad870a29049959ec161c1217b967d7e19d.1594332223.git.alistair.francis@wdc.com >
2020-07-13 17:25:37 -07:00
a7d2d98c59
hw/char: Initial commit of Ibex UART
...
This is the initial commit of the Ibex UART device. Serial TX is
working, while RX has been implemeneted but untested.
This is based on the documentation from:
https://docs.opentitan.org/hw/ip/uart/doc/
Signed-off-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: LIU Zhiwei<zhiwei_liu@c-sky.com >
2020-06-19 08:24:07 -07:00