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

Peter Maydell posted 2 patches 1 year, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221110143459.3833425-1-peter.maydell@linaro.org
Maintainers: Laurent Vivier <laurent@vivier.eu>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
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(-)
[PATCH for-8.0 0/2] hw/misc: Convert MOS6522 devices to 3-phase reset
Posted by Peter Maydell 1 year, 6 months ago
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(-)

-- 
2.25.1
Re: [PATCH for-8.0 0/2] hw/misc: Convert MOS6522 devices to 3-phase reset
Posted by Peter Maydell 1 year, 4 months ago
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
Re: [PATCH for-8.0 0/2] hw/misc: Convert MOS6522 devices to 3-phase reset
Posted by Mark Cave-Ayland 1 year, 6 months ago
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.