On Sat, Sep 25, 2021 at 9:37 PM Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > > - Embed SerialMM in MchpPfSoCMMUartState and QOM-initialize it > - Alias SERIAL_MM 'chardev' property on MCHP_PFSOC_UART > - Forward SerialMM sysbus IRQ in mchp_pfsoc_mmuart_realize() > - Add DeviceReset() method > - Add vmstate structure for migration > - Register device in 'input' category > - Keep mchp_pfsoc_mmuart_create() behavior > > Note, serial_mm_init() calls qdev_set_legacy_instance_id(). > This call is only needed for backwards-compatibility of incoming > migration data with old versions of QEMU which implemented migration > of devices with hand-rolled code. Since this device didn't previously > handle migration at all, then it doesn't need to set the legacy > instance ID. > > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > Cc: Peter Maydell <peter.mayd...@linaro.org> > > I haven't kept Alistair R-b tag from v1. > --- > include/hw/char/mchp_pfsoc_mmuart.h | 12 +++- > hw/char/mchp_pfsoc_mmuart.c | 105 +++++++++++++++++++++++----- > 2 files changed, 97 insertions(+), 20 deletions(-) >
Reviewed-by: Bin Meng <bin.m...@windriver.com> Tested-by: Bin Meng <bin.m...@windriver.com>