From patchwork Thu Nov 10 14:34:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 623335 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp158388pvb; Thu, 10 Nov 2022 06:35:48 -0800 (PST) X-Google-Smtp-Source: AMsMyM6chYyPPfTPJxpF4eRMa/DZ3V4tpd0u1nSWJb3m/BQ/GQjVN4wlbWlVHE9B0PS5L5Q0xjew X-Received: by 2002:a05:620a:1204:b0:6fa:3cf8:dabf with SMTP id u4-20020a05620a120400b006fa3cf8dabfmr38878624qkj.377.1668090948150; Thu, 10 Nov 2022 06:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668090948; cv=none; d=google.com; s=arc-20160816; b=0wSGTHok0g3UxVxQuHq1CjftAn5rjfklJTPgc2znXxOEDj2qPyMYTXSScitG620o3H cQW6Z6IhLLFiDp7L7C2x3AiCTmEK0HSNhPwvREhIxmVXaus4MIZ03ZYifcIAgF8OE/vY FksDj6N+ZhXq6HcYnnQKV/Ca3GID1AL2floAMvs6OW7gj4uVnxdvYAiWq1bu3Dk+PwGz 4/Gum9AGzDNRdFY7KHJ0L3A/fGm9WNdIXX1bgdj9GPvj+xS+sAc8ni/L1e39xxyDIcMC 2JHZM5v1w+5Ms2TgtpHI7xMv51hZb2c9i1rvHz9HyXhYR+/WjVpwIhVWGnJt3kU29bW+ oQCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=1AfoDkMtgT69D12IkU3xCT5pg1NDaVMdvOPGIYZ3rlo=; b=YCa+77VPC+vCUsSVyh7huANI45N270FvE4vUjts5+sIm0LCrMO/LlitYLz63A2TjKU LqX6nN2uoclQzMyUslxv9iJjJM1Vfwhxkawk6rAap0aRk/7N5pvvAUbqc1eK23NkCS9c OWR3tI4OAo8zhRCa/oMRGbcBloWS+UmgkwVPgMmF00Hac6p/NccrN6bj0C/aE79WywLK P+FL3gvb3fE/3692wf5s1oH+PnrDC4fbkM0e/l+Wk4DWtp+pTRjegTgJQFHh3Gvyzy1W 0AfROjDANQR/SrWGxVHtgDMrCdGhZFQBgKTDJa/PtrHKRYxj0k179HGNqCvrl1WezlhM trXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XAfB83O8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id he9-20020a05622a600900b0039ae8e1f809si9960230qtb.583.2022.11.10.06.35.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Nov 2022 06:35:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XAfB83O8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot8e6-0001Lf-Rx; Thu, 10 Nov 2022 09:35:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot8e2-0001LD-Le for qemu-devel@nongnu.org; Thu, 10 Nov 2022 09:35:06 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ot8e0-0003Uk-Rm for qemu-devel@nongnu.org; Thu, 10 Nov 2022 09:35:06 -0500 Received: by mail-wm1-x32e.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso3536537wme.5 for ; Thu, 10 Nov 2022 06:35:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1AfoDkMtgT69D12IkU3xCT5pg1NDaVMdvOPGIYZ3rlo=; b=XAfB83O8m8niKRMxM2KqDzjJrGCphVK2jfBNP9oiYubGE7ARV7wbHKxLgrsB53dW1g p5OpHWiRg2a7Ubset8EU04DjYcrJoFk24UJJq/EKMmIbBdn8766QBbXwXXtPTovyq/YA 6K+ep0ugT/CQU62kvSXC+DYl6/0ZdL12hj7ge0c4y4mjeabanVbs+XNtVW+6wmvpQItb MbdKUfDCDIviXLRwFbe/mRK135EWJg0zZBSTJ0NfrQ1ucue2SEORal7mzo3mRgdDD2ZX /xZGRGh3WS+IW4Wk3yifouBW3XRHk6MfTCWrXCFS6K3fx34H/aewC2cN23+oq/HK2n8d OfDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1AfoDkMtgT69D12IkU3xCT5pg1NDaVMdvOPGIYZ3rlo=; b=NRZJRLOWKH/szX93gpk1uEEheHfTLbQaZ62i8KqrtetSjLFQxrjo0O+dLkWsc0wx2z 9BZWgFMJOUScsbiF4WoVPA81PllngioWFlbtVlKqJLLz6o+g9zEBOnscLb/B3+49G9z/ eEuCmRYHAyYx/897UmMjLwBhEOLqRGqcUzNC/6OHO5H2N3MEmtooxhekOV51vvs7z0O6 yN4jglwWWOYiLwzG+XmEMGPUzozNKTl8hEhQkxeSFBAZYXY+UCBO2XlRa2W5soxPtHno awUOLOBUxLKr+oiwnw5sNsJH5eV+PnabagqUaJq9DDeIQiTkmam7+D6uh4cliwSKJIUj K81w== X-Gm-Message-State: ACrzQf1W1BLsKXimOJ+Q650tR2X1p4gzbBZJ6i8oU8MxLfc8VDIbZiyN AhqxmZ9eEWQMllePB11ENZPoeohQGbQx8Q== X-Received: by 2002:a05:600c:689b:b0:3c2:fd6e:1fe5 with SMTP id fn27-20020a05600c689b00b003c2fd6e1fe5mr43402438wmb.99.1668090902227; Thu, 10 Nov 2022 06:35:02 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bq21-20020a5d5a15000000b00231ed902a4esm16666803wrb.5.2022.11.10.06.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 06:35:01 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Laurent Vivier , Mark Cave-Ayland Subject: [PATCH for-8.0 0/2] hw/misc: Convert MOS6522 devices to 3-phase reset Date: Thu, 10 Nov 2022 14:34:57 +0000 Message-Id: <20221110143459.3833425-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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(-) Acked-by: Mark Cave-Ayland