2e0b925a34
hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary
...
Instead of filling an array of all the possible IRQs, only call
qdev_get_gpio_in() when an IRQ is used. Remove the array from
RX62NState. Doing so we avoid calling qdev_get_gpio_in() on an
unrealized device.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20240213130341.1793-4-philmd@linaro.org >
2024-02-15 16:58:46 +01:00
7188dfcda2
hw/rx/rx62n: Reduce inclusion of 'qemu/units.h'
...
"qemu/units.h" is not used in the "hw/rx/rx62n.h"
header, include it in the source where it is.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20240213130341.1793-3-philmd@linaro.org >
2024-02-15 16:58:46 +01:00
670581f932
hw/rx/rx62n: Use qdev_prop_set_array()
...
Instead of manually setting "foo-len" and "foo[i]" properties, build a
QList and use the new qdev_prop_set_array() helper to set the whole
array property with a single call.
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-ID: <20231109174240.72376-9-kwolf@redhat.com >
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
2023-11-10 18:19:13 +01:00
9b4b4e510b
hw/other: spelling fixes
...
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
2023-09-21 11:31:16 +03:00
7d5b0d6864
bulk: Remove pointless QOM casts
...
Mechanical change running Coccinelle spatch with content
generated from the qom-cast-macro-clean-cocci-gen.py added
in the previous commit.
Suggested-by: Markus Armbruster <armbru@redhat.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20230601093452.38972-3-philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Thomas Huth <thuth@redhat.com >
2023-06-05 20:48:34 +02:00
2068cabd3f
Do not include cpu.h if it's not really necessary
...
Stop including cpu.h in files that don't need it.
Signed-off-by: Thomas Huth <thuth@redhat.com >
Message-Id: <20210416171314.2074665-4-thuth@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2021-05-02 17:24:51 +02:00
e06054368c
hw: Remove superfluous includes of hw/hw.h
...
The include/hw/hw.h header only has a prototype for hw_error(),
so it does not make sense to include this in files that do not
use this function.
Signed-off-by: Thomas Huth <thuth@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20210326151848.2217216-1-thuth@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2021-05-02 17:24:50 +02:00
d6eb39b554
qtest: delete superfluous inclusions of qtest.h
...
There are 23 files that include the "sysemu/qtest.h",
but they do not use any qtest functions.
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com >
Acked-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20210226081414.205946-1-kuhn.chenqun@huawei.com >
Signed-off-by: Thomas Huth <thuth@redhat.com >
2021-03-09 06:03:53 +01:00
ac6dd9b9f3
rx: move BIOS load from MCU to board
...
The ROM loader state is global and not part of the MCU, and the
BIOS is in machine->firmware. So just like the kernel case,
load it in the board.
Due to the ordering between CPU reset and ROM reset, the ROM
has to be registered before the CPU is realized, otherwise
the reset vector is loaded before the ROM is there.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-12-10 12:15:06 -05: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
1db2086e6a
hw/rx: Register R5F562N7 and R5F562N8 MCUs
...
Make the current TYPE_RX62N_MCU an abstract class, and
generate TYPE_R5F562N7_MCU and TYPE_R5F562N8_MCU models.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-06-22 18:37:12 +02:00
7d272cb43d
hw/rx: Honor -accel qtest
...
Issue an error if no kernel, no bios, and not qtest'ing.
Fixes make check-qtest-rx: test/qom-test.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20190531134315.4109-16-richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-06-22 18:37:12 +02:00
0c80f50f1e
hw/rx: RX62N microcontroller (MCU)
...
rx62n - RX62N cpu.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
[PMD: Use TYPE_RX62N_CPU, use #define for RX62N_NR_TMR/CMT/SCI,
renamed CPU -> MCU, device -> microcontroller]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20200224141923.82118-18-ysato@users.sourceforge.jp >
[PMD: Rebased on b77b5b3dc7
, split of machine, use &error_abort]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-06-22 18:37:12 +02:00