mbox series

[for-8.0,0/2] hw/misc: Convert MOS6522 devices to 3-phase reset

Message ID 20221110143459.3833425-1-peter.maydell@linaro.org
Headers show
Series hw/misc: Convert MOS6522 devices to 3-phase reset | expand

Message

Peter Maydell Nov. 10, 2022, 2:34 p.m. UTC
This patchset converts the TYPE_MOS6522 class and its subclasses to
use 3-phase reset. This is part of the work I'm doing to clean up some
of the reset-related code by getting rid of the
device_class_set_parent_reset() function, which is used by
legacy-reset subclasses which want to chain to their parent's reset
function. There aren't very many of these devices in total, and if we
convert them all to 3-phase reset they can use the 3-phase-reset
equivalent (resettable_class_set_parent_phases()).  Eventually this
will then let us simplify the transitional code for handling old-style
device reset.

This is 8.0 material. Tested with 'make check' and 'make check-avocado'
for ppc and m68k builds.

thanks
--PMM

Peter Maydell (2):
  hw/misc/mos6522: Convert TYPE_MOS6522 to 3-phase reset
  hw/misc: Convert TYPE_MOS6522 subclasses to 3-phase reset

 include/hw/misc/mos6522.h |  2 +-
 hw/misc/mac_via.c         | 26 ++++++++++++++++----------
 hw/misc/macio/cuda.c      | 14 ++++++++------
 hw/misc/macio/pmu.c       | 14 ++++++++------
 hw/misc/mos6522.c         |  7 ++++---
 5 files changed, 37 insertions(+), 26 deletions(-)

Comments

Mark Cave-Ayland Nov. 12, 2022, 12:58 a.m. UTC | #1
On 10/11/2022 14:34, Peter Maydell wrote:

> This patchset converts the TYPE_MOS6522 class and its subclasses to
> use 3-phase reset. This is part of the work I'm doing to clean up some
> of the reset-related code by getting rid of the
> device_class_set_parent_reset() function, which is used by
> legacy-reset subclasses which want to chain to their parent's reset
> function. There aren't very many of these devices in total, and if we
> convert them all to 3-phase reset they can use the 3-phase-reset
> equivalent (resettable_class_set_parent_phases()).  Eventually this
> will then let us simplify the transitional code for handling old-style
> device reset.
> 
> This is 8.0 material. Tested with 'make check' and 'make check-avocado'
> for ppc and m68k builds.
> 
> thanks
> --PMM
> 
> Peter Maydell (2):
>    hw/misc/mos6522: Convert TYPE_MOS6522 to 3-phase reset
>    hw/misc: Convert TYPE_MOS6522 subclasses to 3-phase reset
> 
>   include/hw/misc/mos6522.h |  2 +-
>   hw/misc/mac_via.c         | 26 ++++++++++++++++----------
>   hw/misc/macio/cuda.c      | 14 ++++++++------
>   hw/misc/macio/pmu.c       | 14 ++++++++------
>   hw/misc/mos6522.c         |  7 ++++---
>   5 files changed, 37 insertions(+), 26 deletions(-)

Again, not having played with the new reset code myself I'm not quite confident 
enough to give a Reviewed-by tag, but it appears to do the right thing and passes the 
avocado tests so:

Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


ATB,

Mark.
Peter Maydell Dec. 16, 2022, 4:03 p.m. UTC | #2
On Thu, 10 Nov 2022 at 14:35, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This patchset converts the TYPE_MOS6522 class and its subclasses to
> use 3-phase reset. This is part of the work I'm doing to clean up some
> of the reset-related code by getting rid of the
> device_class_set_parent_reset() function, which is used by
> legacy-reset subclasses which want to chain to their parent's reset
> function. There aren't very many of these devices in total, and if we
> convert them all to 3-phase reset they can use the 3-phase-reset
> equivalent (resettable_class_set_parent_phases()).  Eventually this
> will then let us simplify the transitional code for handling old-style
> device reset.

I plan to pick these up and send them in a pullreq together
with various other reset-related patches of mine, unless
you'd prefer them to go in some other way.

thanks
-- PMM