From patchwork Mon Jan 9 09:26:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640597 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2040709pvb; Mon, 9 Jan 2023 01:31:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsmowUbaHO5XXNgN+nIGCeoTKkEHIn7M1QQK0KKCafZGsMJxK+ZeUcg/0kNjAlrDeAS6QNO X-Received: by 2002:a05:622a:2484:b0:3ac:193:132b with SMTP id cn4-20020a05622a248400b003ac0193132bmr8525126qtb.67.1673256701993; Mon, 09 Jan 2023 01:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256701; cv=none; d=google.com; s=arc-20160816; b=QCthDM1EJ9ZmlrP6bHqpc5NQNSEnwulBNfx4XtEcXFOvW7Ez+h6/KmSAw5vPm8Htys IVz+C4jL4fpusODt+3VAg6o5E9vZ+3AsZoWomPqaqknP9UB52+RThPpXu3qDS8rPVCXT dDrhzhEdPRm0lTbiOvESujCCesOcxzrhgXKeMwTZvpHAzVlaLsVWHBthQn696JwXp1Zy KfPFtfkcG8GpdsKhGMMsDKPbE/kdQo1OM8/i0nzSROxFodSfSuL+FLZCh8S77mOAuKKc uWeZXjTp50MIe0NNLxEbH24gmLtC2z2T0pgZrnbNErfN/mQSgmrk5WXqjaFr+6I42wgV fS4Q== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3c81/r3f4BHMA2UcmTrC4gW71kQeV9J9AnuU6KcX7cM=; b=ORYLBIcHtOdl/hH9arimatHZkUyluNGAO9MnEI4gqhhTbTnGSm/7K7922TCMqYj4wa zyh0NZhXbrYmKv4yX6juQEF5//M17yZOS/5R55Mymg/ghK9T7yDPLsX8sQ3P9D0CnYvw 20Rvp3OTLWCWP9b79hzqc/RoXUwp1HdKkRzG2KIG9OpZOyYi7Id9DMtkj6Dupqpv77aw TtjG7C9B/zNsBtE1WnOvtDgn60tf7BAW1ExWYnafQTHZHdxXsJOMVve6lGN9Zpv41/Av 8FnjUXCOo5hoBdBmjSc13JZdJedvIh+yOOesWJVUy+f4xZtibx3vVY2g7S7l+BLC8g2O HvEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lNMK5BLP; 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 cb25-20020a05622a1f9900b003a684d57114si4570262qtb.105.2023.01.09.01.31.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:31:41 -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=lNMK5BLP; 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 1pEoQr-000478-Gn; Mon, 09 Jan 2023 04:27:05 -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 1pEoQp-000462-50 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:27:03 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQn-0005Z6-Kw for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:27:02 -0500 Received: by mail-wr1-x429.google.com with SMTP id co23so7491583wrb.4 for ; Mon, 09 Jan 2023 01:27:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3c81/r3f4BHMA2UcmTrC4gW71kQeV9J9AnuU6KcX7cM=; b=lNMK5BLP7m+MR7LK2BDg17KICwcpqwV8y50VOE7CPXpZs77u5Fgzqo1+kwaK2EZoA6 Yt+bZXYcJth3kZZmIIFrBprwvnnrW/FsXbBkK7GgkP3yD+jnL8YTAfr6WH1Wcrye5ATH BA8bYsT3TH2F/TvDZbk1gh0BKq5ZXkJcDriaEoQArufzo1bfpL7OkdjI45gYMfAlfqY3 i8r1IjYZRKvvSSAKLm0kzM3Y3l9+PM1cgZKYzN0oZZUvduzpW/Zs0bbJfz20WmUVj6+e FkxDOB1l4x7jDd0OYrO0mSudJzOsiwwhFa5QMESoFEt0+j4o2eao+iLQLt6oQ/KAt4WT sGSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3c81/r3f4BHMA2UcmTrC4gW71kQeV9J9AnuU6KcX7cM=; b=eq/AbaIyGrtAfmrKaCet+mgkkgeRUfLeGBQUx5WJAjQXSAf1+IGS4lZGb6eVhTJJDh ixgBq7EU07CzhYJ3+5UgDq88ERohWWZgFSXiisHOcQCV2xLsSCcC6KsdlVSu5YBu4Ri+ XbczDtUuoz4qFFNFl/ltm1Mv3TBfcRFqMxp1l1aOu4NYicNdvm4REUaaaC8F7vlrLJGZ 7nETHMBJmXoIvLuTdVnZ7o5d8U5vqiDb/OR8bM891+zSdx6cSaSEaEcqW510rX0wtRd4 uxo3qApc7cTj9UnFf0coNkDDLAhnwHJYkINkpAqDwwZUDhorHXY4FHm+oBg6a1/jlgze 4F3Q== X-Gm-Message-State: AFqh2krfT6o4Yv0E0/DkLQ3Ix9sRnTYTytv0s6ejpveeDc+1/Ou6yNlh K7WoGOqtLyAP5VdflkCeLWgZ32SXpAz2gmFC X-Received: by 2002:a05:6000:4002:b0:298:4baf:ac8a with SMTP id cy2-20020a056000400200b002984bafac8amr18210285wrb.44.1673256420106; Mon, 09 Jan 2023 01:27:00 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z6-20020a5d6546000000b002bc371a08adsm1823062wrv.101.2023.01.09.01.26.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jan Kiszka , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , "Michael S. Tsirkin" , qemu-arm@nongnu.org, Eduardo Habkost , Markus Armbruster , Richard Henderson , Peter Maydell , Thomas Huth , Marcel Apfelbaum , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 8/9] hw/arm/tosa: Convert TYPE_SPITZ_MISC_GPIO from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:16 +0100 Message-Id: <20230109092617.80224-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109092617.80224-1-philmd@linaro.org> References: <20230109092617.80224-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=unavailable 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 Nothing in TYPE_SPITZ_MISC_GPIO access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/spitz.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index 6605d658ed..31445329ff 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -819,7 +819,9 @@ static void spitz_akita_i2c_setup(PXA2xxState *cpu) OBJECT_DECLARE_SIMPLE_TYPE(SpitzMiscGPIOState, SPITZ_MISC_GPIO) struct SpitzMiscGPIOState { - SysBusDevice parent_obj; + /*< private >*/ + DeviceState parent_obj; + /*< public >*/ qemu_irq adc_value; }; @@ -883,7 +885,9 @@ static void spitz_misc_gpio_init(Object *obj) static void spitz_scoop_gpio_setup(SpitzMachineState *sms) { - DeviceState *miscdev = sysbus_create_simple(TYPE_SPITZ_MISC_GPIO, -1, NULL); + DeviceState *miscdev; + + miscdev = qdev_create_simple(TYPE_SPITZ_MISC_GPIO, &error_fatal); sms->misc_gpio = miscdev; @@ -1260,7 +1264,7 @@ static const TypeInfo spitz_lcdtg_info = { static const TypeInfo spitz_misc_gpio_info = { .name = TYPE_SPITZ_MISC_GPIO, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(SpitzMiscGPIOState), .instance_init = spitz_misc_gpio_init, /*