From patchwork Mon Jan 9 09:26:12 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: 640591 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2039765pvb; Mon, 9 Jan 2023 01:28:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXtKBstRNDFOIaeb5Lpgtz9WniEjMC8Pwjb/fV/DIkZrv0+flU10M/BI5ZvkYRuHyL9GK3Ov X-Received: by 2002:a05:622a:a11:b0:3a8:137e:2972 with SMTP id bv17-20020a05622a0a1100b003a8137e2972mr94084086qtb.56.1673256516351; Mon, 09 Jan 2023 01:28:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256516; cv=none; d=google.com; s=arc-20160816; b=fY8irdnWrX2k6+2zcO3MB2XIGoa17L1p09BIks0sMf6ZGJC29q2JFMMQoZLWx1JlCb zZ/HaM1JGiQuPzR5ZyZaCK846fJgmzV2jaFW51ydQq4m9vytyiIxlx/752SxPDf7jMJ0 kH5dCFwGIhv+4PTNhhjEdD/AFcgQVBNiMQg80aQ6O0EXmW4C58UaoMhwlkBX2c1rMRbV cvopTRJ5O2LhwzfiINGcqyNqBGxsKLp1O7raxAyCTndxiO3PyabiJfbnXrxmLTdAeitY MoLhNsjfk1ma4DsNiRVaFgWd1CNzjyleFNG7gp0eq1GB/YKwL9nBWALWgFK09fytxy+E NUZw== 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=NE5J326RXvgXHGZhWzejrwD6fpnpQEJ0QTafe4YZjeM=; b=EMT8fWsrL267uCNTl/NIs9khYx81HLb5L6g+N3OFyL6hefO+AznbunVpuc8pWUmDxJ GDgfiqRL26DujQ4KN41QhFmJ8ytccGRIxdmEBRKO+mZup6oh02eBMw8DkoPQnhJ00Cbi Bi3EzIiamqygcXWEOfZr8/EmCFQwSmBF5d1YySgE4WrO8r1BFRpb2++/PU1IqXc9le5h B0lhCXzPlQ3cCY+I/G74CwFcovZYF0qqLM03MpyxqxYvsAXGFPw4qi4uvOk+Kh4yBchk mLRbpPRwU3U6K+A0Ecp7q4fIDv+0lQyG7yhSupGPrBnp96BkJby/guXm5V3gt9gofsss tifQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y1buR76P; 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 bn11-20020a05622a1dcb00b003ab93dd883fsi4347358qtb.243.2023.01.09.01.28.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:28:36 -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=y1buR76P; 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 1pEoQh-00042g-DC; Mon, 09 Jan 2023 04:26:55 -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 1pEoQY-0003xs-8F for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:50 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQU-0005TI-25 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:44 -0500 Received: by mail-wr1-x430.google.com with SMTP id bn26so7513358wrb.0 for ; Mon, 09 Jan 2023 01:26:41 -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=NE5J326RXvgXHGZhWzejrwD6fpnpQEJ0QTafe4YZjeM=; b=y1buR76PGI4z2+hl2piEYGF68bOUKz/XN+jeMIoo81akQ9li6UAvFS1QZA+vjoowdy ce0BhJdpxnYJK0MWjKi4613VLOptPbBPLYFnBOkSD8mY3oKSssc7IZ7enBmtQ6AIC6oK 1oYfWJCmyuvOaJtL7+O8C+fVjyqOZocjCu9p85nQ/jYI0UpxHfw/1Y2a+ILoi58vFDNx 63AssdgZCRazlPbXQPkzmuyLZzYwPJO/OA1ms7nUQGGjlx/RVlXpUYYx+k9e1hVR1kb4 kn7O9Jf9sDqaI9Tn3UmY/Gnz6bAjFB7l7kCy6FMWabdA75qhQdVFeVTcSuXj82WYjgCd ef1g== 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=NE5J326RXvgXHGZhWzejrwD6fpnpQEJ0QTafe4YZjeM=; b=w+wrn0y28D6m0DyvRwLZ3ih/AEobAhrhBeSaEElHtw3lXOug7U8TcdyuRNohrQ37G6 0hXgcJ9+xVym0eJN+3TYS/pVDMHu6MX7kqnE/0UU7ybLE99atO4RhRqZWk6T2qOI0sy1 FXoaEi9u9xAaSwHxqQvRoPFvCjOOOgb8PuK4GBTWIdwA76j3ZQ6b/w1/EHOHe8vQJYQi OF2cN0cQjTj50F1FAn8YK77kYwTiJdBwetrCBP6726NZWBNODK9tkoJ4/qvpqFrq3GCW p2wPkHxCsyf8wWUxp4jr7IzuRNdf5KdNIjQ0iQpP4PFaadKv8Uk9J0YBnX5hvsGyBJ7r NXVw== X-Gm-Message-State: AFqh2koEymt6Ue85U3TM4nGH4vXootULzN44RtQvQTyVaV3DzvB6PM63 GkFbLcGWGT4WvOurAiSAzTFcNJojxxJJvDu7 X-Received: by 2002:a5d:4444:0:b0:2bc:8130:ccb8 with SMTP id x4-20020a5d4444000000b002bc8130ccb8mr21560wrr.40.1673256399959; Mon, 09 Jan 2023 01:26:39 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d9-20020adfef89000000b002b74be46309sm8020770wro.114.2023.01.09.01.26.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:39 -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 4/9] hw/arm/tosa: Convert TYPE_TOSA_MISC_GPIO from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:12 +0100 Message-Id: <20230109092617.80224-5-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::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 Drop the pointless TosaMiscGPIOState structure definition, since it defaults to the size of the parent's type. Nothing in TYPE_TOSA_MISC_GPIO access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/tosa.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c index d5a6763cf9..ec0db24e8f 100644 --- a/hw/arm/tosa.c +++ b/hw/arm/tosa.c @@ -78,10 +78,6 @@ static void tosa_microdrive_attach(PXA2xxState *cpu) #define TYPE_TOSA_MISC_GPIO "tosa-misc-gpio" OBJECT_DECLARE_SIMPLE_TYPE(TosaMiscGPIOState, TOSA_MISC_GPIO) -struct TosaMiscGPIOState { - SysBusDevice parent_obj; -}; - static void tosa_reset(void *opaque, int line, int level) { if (level) { @@ -104,7 +100,7 @@ static void tosa_gpio_setup(PXA2xxState *cpu, DeviceState *misc_gpio; LEDState *led[4]; - misc_gpio = sysbus_create_simple(TYPE_TOSA_MISC_GPIO, -1, NULL); + misc_gpio = qdev_create_simple(TYPE_TOSA_MISC_GPIO, &error_fatal); /* MMC/SD host */ pxa2xx_mmci_handlers(cpu->mmc, @@ -307,8 +303,7 @@ static const TypeInfo tosa_ssp_info = { static const TypeInfo tosa_misc_gpio_info = { .name = TYPE_TOSA_MISC_GPIO, - .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(TosaMiscGPIOState), + .parent = TYPE_DEVICE, .instance_init = tosa_misc_gpio_init, /* * No class init required: device has no internal state so does not