[PATCH v2 00/19] hw/timer/arm_timer: QOM'ify ARM_TIMER and correct sysbus/irq in ICP_PIT

Philippe Mathieu-Daudé posted 19 patches 9 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230704145012.49870-1-philmd@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
hw/timer/arm_timer.c | 353 +++++++++++++++++++++++++------------------
hw/timer/Kconfig     |   1 +
2 files changed, 203 insertions(+), 151 deletions(-)
[PATCH v2 00/19] hw/timer/arm_timer: QOM'ify ARM_TIMER and correct sysbus/irq in ICP_PIT
Posted by Philippe Mathieu-Daudé 9 months, 4 weeks ago
This series converts the ARM_TIMER model to QOM.

Doing so we also correct an abuse of SysBus IRQ in
the ICP PIT model.

Since v1:
- Added pm215's R-b tags
- Addressed Mark/Peter review comments
  - Drop '*State' suffix from structure names
  - Use OR-IRQ gate
  - Drop sp804_unrealize()
  - Implement Resettable API
- MMIO-map timer regions into parents

Regards,

Phil.

Philippe Mathieu-Daudé (19):
  hw/timer/arm_timer: Declare QOM types using DEFINE_TYPES() macro
  hw/timer/arm_timer: Remove pointless cast from void *
  hw/timer/arm_timer: Move SP804 code around
  hw/timer/arm_timer: CamelCase rename icp_pit_state -> IntegratorPIT
  hw/timer/arm_timer: CamelCase rename arm_timer_state -> ArmTimer
  hw/timer/arm_timer: Rename SP804State -> SP804Timer
  hw/timer/arm_timer: Rename TYPE_SP804 -> TYPE_SP804_TIMER
  hw/timer/arm_timer: Extract arm_timer_reset_hold()
  hw/timer/arm_timer: Convert read/write handlers to MemoryRegionOps
    ones
  hw/timer/arm_timer: Rename arm_timer_init() -> arm_timer_new()
  hw/timer/arm_timer: Convert ArmTimer::freq to uint32_t type
  hw/timer/arm_timer: Use array of frequency in SP804Timer
  hw/timer/arm_timer: Iterate on timers using for() loop statement
  hw/timer/arm_timer: Pass timer output IRQ as parameter to
    arm_timer_new
  hw/timer/arm_timer: Fix misuse of SysBus IRQ in IntegratorPIT
  hw/timer/arm_timer: Extract icp_pit_realize() from icp_pit_init()
  hw/timer/arm_timer: QDev'ify ARM_TIMER
  hw/timer/arm_timer: Map ARM_TIMER MMIO regions into IntegratorPIT
  hw/timer/arm_timer: Map ARM_TIMER MMIO regions into SP804Timer

 hw/timer/arm_timer.c | 353 +++++++++++++++++++++++++------------------
 hw/timer/Kconfig     |   1 +
 2 files changed, 203 insertions(+), 151 deletions(-)

-- 
2.38.1


Re: [PATCH v2 00/19] hw/timer/arm_timer: QOM'ify ARM_TIMER and correct sysbus/irq in ICP_PIT
Posted by Philippe Mathieu-Daudé 9 months, 4 weeks ago
On 4/7/23 16:49, Philippe Mathieu-Daudé wrote:
> This series converts the ARM_TIMER model to QOM.
> 
> Doing so we also correct an abuse of SysBus IRQ in
> the ICP PIT model.
> 
> Since v1:
> - Added pm215's R-b tags
> - Addressed Mark/Peter review comments
>    - Drop '*State' suffix from structure names
>    - Use OR-IRQ gate

(forgot to mention migration normally taken care of)

>    - Drop sp804_unrealize()
>    - Implement Resettable API
> - MMIO-map timer regions into parents
Also, from here it should be easier to add the
ARM AP804 used by BCM2835; see Thomas Venriès's
patch v2:
https://patchwork.kernel.org/project/qemu-devel/patch/1507728290-6062-1-git-send-email-thomas.venries@gmail.com/