On 8/6/23 17:00, Peter Maydell wrote:
On Wed, 31 May 2023 at 21:37, Philippe Mathieu-Daudé <phi...@linaro.org> wrote:
Both SP804State/IcpPitState peek at ArmTimerState internal state.
This is fine so far but we want to convert ArmTimerState to QOM
where peeking at QOM state internal should be avoided.
ArmTimerState's IRQ is just a pointer, so we can pass/set it via
argument, avoiding accessing ArmTimerState internal state except
from the arm_timer_*() methods.
If we convert ArmTimerState to QOM then shouldn't the
irq become a sysbus IRQ on the ArmTimerState object,
and the looking at the internals go away automatically?
This is what happen two patches later in "hw/timer/arm_timer:
QOM'ify ARM_TIMER" (which is hard to split).
At this step ArmTimerState is not yet a QOM object (neither
SysBus), so we can not create a SysBus IRQ.