> -----Original Message-----
> From: Cédric Le Goater <[email protected]>
> Sent: Thursday, May 21, 2026 12:44 AM
> To: Philippe Mathieu-Daudé <[email protected]>; Cédric Le Goater
> <[email protected]>; [email protected]; [email protected]
> Cc: Kane Chen <[email protected]>
> Subject: Re: [PULL 26/45] hw/misc: Add basic Aspeed PWM model
> 
> On 5/20/26 18:31, Philippe Mathieu-Daudé wrote:
> > Hi Kane,
> >
> > On 4/2/26 11:31, Cédric Le Goater wrote:
> >> From: Kane Chen <[email protected]>
> >>
> >> Add an initial PWM model for Aspeed SoCs, including device state,
> >> register definitions, and basic initialization as a sysbus device.
> >>
> >> Signed-off-by: Cédric Le Goater <[email protected]>
> >> Signed-off-by: Kane-Chen-AS <[email protected]>
> >> Link:
> >> https://lore.kernel.org/qemu-devel/20260204082113.3955407-4-kane_chen
> >> @aspeedtech.com
> >> Signed-off-by: Cédric Le Goater <[email protected]>
> >> ---
> >>   include/hw/arm/aspeed_soc.h  |   3 +-
> >>   include/hw/misc/aspeed_pwm.h |  30 +++++++++
> >>   hw/misc/aspeed_pwm.c         | 120
> >> +++++++++++++++++++++++++++++++++++
> >>   hw/misc/meson.build          |   1 +
> >>   hw/misc/trace-events         |   4 ++
> >>   5 files changed, 157 insertions(+), 1 deletion(-)
> >>   create mode 100644 include/hw/misc/aspeed_pwm.h
> >>   create mode 100644 hw/misc/aspeed_pwm.c
> >
> >
> >> diff --git a/hw/misc/aspeed_pwm.c b/hw/misc/aspeed_pwm.c
> >
> >
> >> +static void aspeed_pwm_class_init(ObjectClass *klass, const void
> >> +*data) {
> >> +    DeviceClass *dc = DEVICE_CLASS(klass);
> >> +
> >> +    dc->realize = aspeed_pwm_realize;
> >> +    device_class_set_legacy_reset(dc, aspeed_pwm_reset);
> >
> > Also please do not use the legacy API. See for example this commit to
> > convert to the newer API:
> > https://gitlab.com/qemu-project/qemu/-/commit/ce788d3740f
> 
> Oh ! I think this patch is from 2017 and we didn't refresh it when it was 
> sent :/
> 
> So, yes, Kane, if you have time for this QEMU cycle, that would be nice.
> 
> Thanks,
> 
> C.
Hi Philippe,

Thanks for pointing this out.

Hi Cédric,

I currently have a few tasks on hand. Once I finish them, I will submit a code 
change
to use the new API.

Best Regards,
Kane
> 
> 
> 
> >
> >> +    dc->desc = "Aspeed PWM Controller";
> >> +    dc->vmsd = &vmstate_aspeed_pwm;
> >> +}
> >

Reply via email to