From patchwork Mon Jan 9 09:26:09 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: 640590 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2039655pvb; Mon, 9 Jan 2023 01:28:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXugqorbPFz9gPrWRIHC7LZVzoWwWyh1VJz1Vz92atnsEBwdwd3I1paWJCsdZ/iO/IOuxnry X-Received: by 2002:a05:622a:5988:b0:3a7:e91f:d23 with SMTP id gb8-20020a05622a598800b003a7e91f0d23mr92330122qtb.67.1673256488774; Mon, 09 Jan 2023 01:28:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256488; cv=none; d=google.com; s=arc-20160816; b=rUZemK3Y3sheXxgvgJu27NCFOmUtPXtofPgFPVg161S1q/THhAlkF4ur3etKCusTl9 qd6loPYUvIjMVua6/XP/WRy4Y0ceyeggendtWH9bXoOkhlhx7TiXqFEp8PV/wMLD9zwF LstbmCDKJSUW8v4u+7p2Yxms0zONhW1iGngaPx/ttK8qGWMsFIxvfVW/j/LChtuFxEdl pJXduu/rk0/U4l8uiEudLndfl3XDxhne1hJhdZTDxlZoaKMv0rm8ht+ac4+hs4pU0Sux +X9C5ji1tqsfT59wOLpSt+eD+UWiq+FMu0ZQRTDIETcNT0sQiQBzLvWpsI5bwys8cx9y d2eg== 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=mJUniGzlTDF6ixFuHu4g7ABnLTHD1CJ9TnkuUuv7wWI=; b=k7ju3ZB3mRAX2GYaSmYc8oesPh7Y/9Kzsvhq8gCt66NS/tDETrEhUiCRYaTXt6rsBc z40mYaUU9ozGRe1va54nJnqh/spgbpVzpyYqExPb0ypSWFIqle8OMHNgDYS3ap3U5xg9 /lAVqp4h28MzVJw7mz07NRmn7sIxGa6Gz5kaVzAPi2T5S82CHtzGLtlw2Sex3IzLBltn MYYL+FhWxSY3M5LHzyygXRLoGrkn/ZEmi5vdBzPzRhSEV96awl+vvo4IEH/tU5UxvV12 R1/BUi558yZSbzu/gyBRYPI2zZ5JXAQCHWKdd+rFymneUTXlGfmBXTAvUXw+Uiia06QF ITDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hkCIZQCH; 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 h7-20020ac85687000000b003ab79797f51si4276752qta.58.2023.01.09.01.28.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:28:08 -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=hkCIZQCH; 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 1pEoQL-0003te-87; Mon, 09 Jan 2023 04:26:33 -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 1pEoQF-0003rl-Qv for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:28 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQE-0005Q7-9h for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:27 -0500 Received: by mail-wr1-x42e.google.com with SMTP id m7so7475901wrn.10 for ; Mon, 09 Jan 2023 01:26:25 -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=mJUniGzlTDF6ixFuHu4g7ABnLTHD1CJ9TnkuUuv7wWI=; b=hkCIZQCHQp1FroAn2gI2/1l5DOwcafYO+5t04QxOmU75E+xSw5ARtl6o9vEBhsefqo zPgBgZUq+3w3trwO53EphRoMYBNUHxYhii07midJZnViYQ7WcLZjVLetrjZX5hpDaltV Rk92NJeBs8JOycuZ67lzi4+izJU5TFYUOGFvxlbh937oMlhzhVOlM6GwmsEBeWSkxA77 JaapLuxyYe4K/OKh+z7pwxCmQvOIB6pNOQwR63NJ+XPwyiHA9fBna7tU/uzaBefdS4Cn 58qRxkhGdnxoEcaIoUYUocRApm6QzIUp1/p9ozLpIbFjel94Lj9XnqLoiQzH+KAvRy7W 562Q== 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=mJUniGzlTDF6ixFuHu4g7ABnLTHD1CJ9TnkuUuv7wWI=; b=h7bk1GRgmuwgz2CJMOPhWXzHy/OJj3+fekpmPIPtX1ywzgT95E0QnUxseiyYIj/f3x 2QYpW1Y3BakCE1MJJB1fucEsAc7iLsh6yD+EpBTBWl2wVg5HpvC42FmiR5oMgFaqmb/3 +H59m1SdxqqbHqM29TAXDt43y4EWccwc5TtNh/ndhakCsE7KBcr1HAZIHsFM1mKFj+EY Kswx9giYY/eHTCRALaz6vb95tByWKrvgYZEuPey0iSLgGnRcjzpXnblnekSYk94w0hxV mHKQAddyeWn7RYLJM6I5BNlGKgEuoGGX8gUBOmynuTi7SkuS1cy1yKnkP3pk482XXRgj iSKw== X-Gm-Message-State: AFqh2koXRlC3tcFngWvGARu0XiPJzDMjXRkL+cTdIHcPzt6TxlJmVyCy Cm6LI9YW0E/4kBSo7LRJTBuW2VLsyxUXyVxS X-Received: by 2002:a5d:68cc:0:b0:2bb:9106:d0a with SMTP id p12-20020a5d68cc000000b002bb91060d0amr4101166wrw.14.1673256384583; Mon, 09 Jan 2023 01:26:24 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n4-20020a5d6b84000000b00282194eaf7bsm7799550wrx.71.2023.01.09.01.26.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:24 -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 1/9] hw/arm/musicpal: Remove unused dummy MemoryRegion Date: Mon, 9 Jan 2023 10:26:09 +0100 Message-Id: <20230109092617.80224-2-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::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/musicpal.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 813232682f..23359a6ac3 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1071,7 +1071,6 @@ struct musicpal_key_state { SysBusDevice parent_obj; /*< public >*/ - MemoryRegion iomem; uint32_t kbd_extended; uint32_t pressed_keys; qemu_irq out[8]; @@ -1160,9 +1159,6 @@ static void musicpal_key_init(Object *obj) DeviceState *dev = DEVICE(sbd); musicpal_key_state *s = MUSICPAL_KEY(dev); - memory_region_init(&s->iomem, obj, "dummy", 0); - sysbus_init_mmio(sbd, &s->iomem); - s->kbd_extended = 0; s->pressed_keys = 0; From patchwork Mon Jan 9 09:26:10 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: 640593 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2039853pvb; Mon, 9 Jan 2023 01:29:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXulwBIOx20xMjEmL0xCzM58YECINC8V9HVBmU3eN9MZ5x0YpbAEywYajfKT0HD31WnBIfDJ X-Received: by 2002:a05:622a:4c88:b0:3a8:21a5:d93 with SMTP id ez8-20020a05622a4c8800b003a821a50d93mr101569181qtb.39.1673256542501; Mon, 09 Jan 2023 01:29:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256542; cv=none; d=google.com; s=arc-20160816; b=qp5TaoGwJs0Q740cwcyqn+OB9Un4xMiZfFpLQXP+xDzM++ckOkdJP425/DzeACWa+Y 3S3TIxD/u+Je2w2bWc/ezQEgc9GMS1sQt3phkA8c46Yky9jOSf9V2GYtaEnBWaJ2AkLO /yP6VqNxRWnZhOaexyY7ragORp6H51h3udFORirRBUggRrHQiiOJUwVNEvaHW+fFGaVF My2WFl2Kf/i70LRSUvDTno1Wf0AtmzLtHZv90JPv3U9aXn290QcL3eDShqOB6/kzmagy icVus9kTjYbg4hJ/1rc2YSfdUfcV7me+1YDlF8QrFvmJSLx0Mmrpg4XU7xInPPaHFd48 3IgQ== 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=thih3YlnrvTRPUHmxOTOW7cdH3C9pCnefCYP23Vc8Uc=; b=qVrBGy1Sga+AiYzB1yapUAj9Gxy4o/j98yJB5fuGarAE+173az1/UElMz5iduEONtP TCoUUajEcdmUqSLXyCby2N6DeyuqHFWK0wpJ4H0YcfxvKjeNhVw95N8WH1C2vhxTaKPZ sf7BdXnXNKyTltcqtE2raSaFwW1ARAOfepSmxClYfkMtFJOowF81iHU5asHepnMJsbz+ VFklO3WyAL82GZ2w54FEStjAeO7vtOjAQK8WnmZBRaNiJMi9O58cwF2wnkVejcuRLAGd 5cKE400r7uDB+v9PBZ+CRn9sUKphRw7bI1jWKBRlwbvkFVZ0MAMv86Bfd41aIFAsdOjg +kyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RMEr4rgO; 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 br21-20020a05622a1e1500b003a4fe7c1e80si4253884qtb.431.2023.01.09.01.29.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:29:02 -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=RMEr4rgO; 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 1pEoQP-0003vE-0e; Mon, 09 Jan 2023 04:26:37 -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 1pEoQL-0003uL-ER for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:33 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQJ-0005RX-J4 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:32 -0500 Received: by mail-wm1-x333.google.com with SMTP id l26so5778077wme.5 for ; Mon, 09 Jan 2023 01:26:30 -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=thih3YlnrvTRPUHmxOTOW7cdH3C9pCnefCYP23Vc8Uc=; b=RMEr4rgOWLh7fYPLKzNnTIOx9LwcKhfpBIel65eStKXZeXz7TIOhVLwCHNkel0WYOS lOGrUznS/LY8QTrGhCuootpuC+JlwK20nm8DQHdgxLgYXuqNfam2D+tFTRAeZWRou44L YXA8iVdcQHv/pJi0ic77c1TX7wOz5Vkd3wf3p7gInjDSHzkQ0BI156FOIGRY5vHdvhak 94iRLUh8ebbpNCdvbMv9ygFuDmPgoNnGbKXq64Hfz7NJ4OMhDHWvsFow22t9gMrRBZAd AjuJFnkHD72/5vIJyn4owFfHHw0lU5K0QxAjQ/xoddoCsOqENaIxzaDDq4R44D/h7AgX GMNA== 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=thih3YlnrvTRPUHmxOTOW7cdH3C9pCnefCYP23Vc8Uc=; b=03ex+ss1CxunxWFi7dNPRsOsvzSmUVnPjisGt09ToDyflvwrVeOSpH0NVOXEjGmfMx MVq5ONYFtlWxv7n5doZfq7K5sW/0L8682/37ygMAnOiBN6J8eR+r12xExV5XyiPjzUVo qxQdMZQXPNVXzcefz2Y1crTTjo4dAZri/dFIO+dVOCfLfdiQKue3ZEvjIk0rbGWt31qu /h7GBYeC3Yvn4AJxQd1uM0BzFLbpoX4rE1npgmypFGK0wOtiN4aVe/cSfyPhfnUe4nyr wIqMTicztlFvQGgPZk4jn3bGHfD2mopNWhLAe1smSAb9iac9dwXuQTY56mMkCFSaJN6L urhg== X-Gm-Message-State: AFqh2kpxnM6/qUM9X+Lu6HZN9CoaeiN0iVmIFTk+5uo1SPHZkFApMt1/ Dd991Fr8juafB6i0peUI1nnYRFCjNmIuZt3J X-Received: by 2002:a05:600c:48a1:b0:3d1:f270:a81e with SMTP id j33-20020a05600c48a100b003d1f270a81emr45866631wmp.17.1673256389785; Mon, 09 Jan 2023 01:26:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p7-20020a05600c1d8700b003d973d4fb28sm15573644wms.4.2023.01.09.01.26.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:29 -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 2/9] qdev: Add qdev_create_simple() helper Date: Mon, 9 Jan 2023 10:26:10 +0100 Message-Id: <20230109092617.80224-3-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::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 Add a helper to easily create a qdev with no (or default) property. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev.c | 9 +++++++++ include/hw/qdev-core.h | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index d759c4602c..4afed2a24c 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -174,6 +174,15 @@ DeviceState *qdev_try_new(const char *name) return DEVICE(object_new(name)); } +DeviceState *qdev_create_simple(const char *name, Error **errp) +{ + DeviceState *dev = qdev_new(name); + + qdev_realize_and_unref(dev, NULL, errp); + + return dev; +} + static QTAILQ_HEAD(, DeviceListener) device_listeners = QTAILQ_HEAD_INITIALIZER(device_listeners); diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 35fddb19a6..ca6b2b8458 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -397,6 +397,17 @@ bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp); * the life of the simulation and should not be unrealized and freed. */ void qdev_unrealize(DeviceState *dev); + +/** + * Create and realize a device on the heap. + * @name: device type to create (we assert() that this type exists) + * @errp: pointer to error object + * + * Create the device state structure, initialize it, and drop the + * reference to it (the device is realized). + */ +DeviceState *qdev_create_simple(const char *name, Error **errp); + void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id, int required_for_version); HotplugHandler *qdev_get_bus_hotplug_handler(DeviceState *dev); From patchwork Mon Jan 9 09:26:11 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: 640599 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2040951pvb; Mon, 9 Jan 2023 01:32:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXtfvAKNdArdQi4qV7B6yJKZinNgOAUIHBA7McCabZQ6S+xgOhEfHom9V6GWJ2dhWvv8VmqO X-Received: by 2002:ac8:41d4:0:b0:3a5:402:4bcf with SMTP id o20-20020ac841d4000000b003a504024bcfmr89294869qtm.24.1673256741562; Mon, 09 Jan 2023 01:32:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256741; cv=none; d=google.com; s=arc-20160816; b=BdoEXlVHcWH4jd1eZdk1/sqT6XoGIfed0pcPhU9X0Pr6WK2694NbqQhwJmGdz0B05j x8ZV1Y+L1QJKucls36PBsso2s2Q8OxIQ5EvvmJoBNwdkkxXjY0V9uWp0a8/GnLFU+FcP 00apD2pc0rbEgI+eViwpXk9Jyz6prVssU8jzJbC3hWKvJQ+MvFrgaADEpUMBLjcKXTUK xkz6Fek92zgZjAu9jxSmcoAJph6fKpm5L/Q4XT034lmJBfo7cbcnV9X067Mb6PS4zQLr 0u3+Of09L1e8ijPU+vcLnGM78CegWv5iesvVw2CzswDEwZE0lGDH+hX0C2cWzfFfAgxZ p3qQ== 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=jEosG62QqV+HBGOoLpBswQWoIE4x1xnJ0kp5ZqQ3kHc=; b=ITBqA/wI897Xm4qqEf7fAsYRhjjyL/TvTtQh16fvizEXJIt4swFICpdhE5CiI5hi0N 9Rrix/3N3xqKTICDSiy6AzXoyePsPHrHxYq8uH69iFxla5qO/Ut9dBsHNKniZcdZGRcV TS8Rs3eUPIGmNm6h9vuANj6BL3jkWVj6RPxLQ4yVwfXB5ssnmtseOcZaQHPtfyimM/9N 1Hr8ANMoCYC4+XKGzMdHsWzJdmLUP0mrlpPpLAuoyUO6LZib8b0aY6+b033zit4Fp0Dl EvrP2qZ9s6bxRABzWWMIVMsud+mEAbSZL2N+5rBblV9qI4fI63/8BwJksXcL6YgkL0x8 fJLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="GM4rptv/"; 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 k1-20020a05620a414100b006e043ac205asi4796267qko.744.2023.01.09.01.32.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:32:21 -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="GM4rptv/"; 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 1pEoQe-0003xW-GO; Mon, 09 Jan 2023 04:26:53 -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 1pEoQQ-0003vu-3i for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:39 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQO-0005SV-G1 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:37 -0500 Received: by mail-wr1-x42a.google.com with SMTP id z5so6426977wrt.6 for ; Mon, 09 Jan 2023 01:26:36 -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=jEosG62QqV+HBGOoLpBswQWoIE4x1xnJ0kp5ZqQ3kHc=; b=GM4rptv/Zy5qFueRB3X5lfufJMT/hHb4Zs9FBJNt3ChugeM4YqTBv2Y2TAxKdFKpjs xMO9PHH96w4K7YvCTwBiV/C9ECXXurCmNbz1Y6qg/Q/4lpgswoZX028K7k1LVf+ucUj8 HBfgEldTbeJCYjmeBVizGjQyRq8OSLlLcvvJLlsFd1wABaGtol1ZU0TVbTE0YSElkd2m PrhfVtW99WA+Vgr1D0XiH+CkSyNdrP+sZv4MKRU7BfKUh/0yO2IuLivf7y2xhPopmKb5 LQpwg8p+EAVu9IWvkebZiEeqTmhligv6qnnIkmj8/BlpElbeApFIippWhgQOAXwcHTOp BRDQ== 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=jEosG62QqV+HBGOoLpBswQWoIE4x1xnJ0kp5ZqQ3kHc=; b=AMnt3YQP3FwZBjlfNMuHzhA91MzwU/2JU6yOhWXFv3KqqNHtVzfSMY8fJ7zgddBCrG 1CUyMDnpHrXiT1K/YNvHrbLSdc6We6i/o2Ai+NCkmWzp6K9WY6eaVCAhq+6ujQck1x5b zgVpsyk9aviL0IHb+BRByjy5jb0LhiHvRGa12wwuRMdShTjmSMDgYd+vq0mWb1fDYcYG k3sWDKyyB09+edqXUCVvgn0YHumTd4l63xCeio/tnjUKnHufClPqDqqnnmM/obrW+OML 9B9HsrXv/TEG0VNR/gaFHr6HZMBajGHr3Th2RAK/+xfRfxjxKjDFAWEbwqp3A1mxclDT GTvQ== X-Gm-Message-State: AFqh2krX2HwqwvHozLvFGPXLV8cw9NMqlbs3E/XoTAwmhzsGk6cKEVt3 pAyeVUHfakBwJ6Cn7oEFxYk9IfGgK7pW8m4a X-Received: by 2002:adf:f285:0:b0:270:57d:d1c9 with SMTP id k5-20020adff285000000b00270057dd1c9mr37988708wro.39.1673256394935; Mon, 09 Jan 2023 01:26:34 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i10-20020adff30a000000b0024228b0b932sm9622766wro.27.2023.01.09.01.26.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:34 -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 3/9] hw/i2c/bitbang_i2c: Convert TYPE_GPIO_I2C from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:11 +0100 Message-Id: <20230109092617.80224-4-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::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 Nothing in TYPE_GPIO_I2C access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/i2c/bitbang_i2c.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 23359a6ac3..13f4dbdbc3 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1297,7 +1297,7 @@ static void musicpal_init(MachineState *machine) dev = sysbus_create_simple(TYPE_MUSICPAL_GPIO, MP_GPIO_BASE, qdev_get_gpio_in(pic, MP_GPIO_IRQ)); - i2c_dev = sysbus_create_simple(TYPE_GPIO_I2C, -1, NULL); + i2c_dev = qdev_create_simple(TYPE_GPIO_I2C, &error_fatal); i2c = (I2CBus *)qdev_get_child_bus(i2c_dev, "i2c"); lcd_dev = sysbus_create_simple(TYPE_MUSICPAL_LCD, MP_LCD_BASE, NULL); diff --git a/hw/i2c/bitbang_i2c.c b/hw/i2c/bitbang_i2c.c index ffc5b95410..58503f2b27 100644 --- a/hw/i2c/bitbang_i2c.c +++ b/hw/i2c/bitbang_i2c.c @@ -13,7 +13,6 @@ #include "qemu/osdep.h" #include "hw/irq.h" #include "hw/i2c/bitbang_i2c.h" -#include "hw/sysbus.h" #include "qemu/module.h" #include "qom/object.h" #include "trace.h" @@ -191,7 +190,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(GPIOI2CState, GPIO_I2C) struct GPIOI2CState { /*< private >*/ - SysBusDevice parent_obj; + DeviceState parent_obj; /*< public >*/ bitbang_i2c_interface bitbang; @@ -233,7 +232,7 @@ static void gpio_i2c_class_init(ObjectClass *klass, void *data) static const TypeInfo gpio_i2c_info = { .name = TYPE_GPIO_I2C, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(GPIOI2CState), .instance_init = gpio_i2c_init, .class_init = gpio_i2c_class_init, 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 From patchwork Mon Jan 9 09:26:13 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: 640596 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2040612pvb; Mon, 9 Jan 2023 01:31:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXun2xnQHfIGKBWYBcqjEMG7Jjf+EnT+ceMHU+5rWjVRVoYg9KEJLeZYSzjNd85MfvuXpVHH X-Received: by 2002:ac8:6782:0:b0:3a8:2d7:af66 with SMTP id b2-20020ac86782000000b003a802d7af66mr99265427qtp.21.1673256686326; Mon, 09 Jan 2023 01:31:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256686; cv=none; d=google.com; s=arc-20160816; b=OVwxEXrFwAUwMfNRPTELnULtMJAtN5XAXDpLC3RB2vEbIIlx6lEhnQDNvb+5Z8k1Go MchUqfAvJMYZwes3z9mB02FYGDiP8zdVnd85J7iBH7fRtdFZkvkuX+vAzuUJC2glwxs/ BZ5bWmu40zTkNeI0z0imviaup3M25QqJZ7qJxGRF4SFEOC5nAVxmv7KXpCnWsQNZsR9o 4WWSiSGlGJvjEpwnzo0uy2QtjUEsCuTKHZkTvKn31TWW6hPM5lMXsYqCcuSfxmrFjcvh eZUg2z6B5GLiTELRE1V4PGez3AdeZ2x4IlY13yIBmgK2OkQWdAjjqJTuGo1VMQq4qXch 33hA== 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=tSzFCO6NQ+8ffmrsTTKi/Gp5LFSgKmeeId0+ZsrnMi8=; b=QHNGUV6cUs+a0+UrTTfzWJlqESX+LyjFsrag552ssUTCnmA3HqRMf9qk9/7pxbtF+F 5J2CBAoX5RBe0C3KIMCsnXdmLUIZ5YPEdJK0p+9dnl+YDKenIh39Me0EvNFsw0D687li icspOouew+iy6B9PXJhNJjX6aOpo2VAtJ+NA26DKz+qoOKWP3P94+iPFtPKjsgki5o1f BKcBigcaLMAyhKIQ9ayJ0+j2nussbvBApZWTjOhoO0LvlvsTWBILV1aOnoFfrGqUyYfx x0VaQerJ6aq8XdBndqAazqTDV81Wg4vmAAuFvLAQ1WJ3gr7du338fZnvrijMPXu6tz4C xbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NA4pyZmn; 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 h8-20020a05620a400800b006e07228ed51si4516624qko.99.2023.01.09.01.31.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:31:26 -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=NA4pyZmn; 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-00042j-Ih; 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 1pEoQa-0003yl-TF for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:50 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQY-0005ST-0h for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:47 -0500 Received: by mail-wr1-x42b.google.com with SMTP id az7so7490393wrb.5 for ; Mon, 09 Jan 2023 01:26:45 -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=tSzFCO6NQ+8ffmrsTTKi/Gp5LFSgKmeeId0+ZsrnMi8=; b=NA4pyZmn8lwtpKLMWJt/dLIt57NJE11fKCEwfPFiR84zmGfxBXs5eBwzzx//MEZS8h 2tq8QUeTwZ8F1mK+osyn6jFfbQRTdWg+6B4fSaUQMaYaw0GPJ7EmBpakBdgIZbYnN9Od waX/Swm9YTTSVs6pBNRUZmKt5LyIALAWSn8ntfC/uJhVQblwxK2bEQ2eYrP4/PTlivkm 0aci5qiRF4NBa9V33voy71WEFS36+0CO3gXEjwU+YVWVuDPryA2qwf5G+HhiJOIQQCpG oi7ADqlnHtfNU4pLqts5KHwmUyQ75lfquo1hqrj5cmO+Vtz56bAHIBPzojhVI5ibFYtH +YQg== 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=tSzFCO6NQ+8ffmrsTTKi/Gp5LFSgKmeeId0+ZsrnMi8=; b=fAM2u2HbQcv0qcArRPLDo+Sl6n4MKozuPwbmO+6yqr+kWBfEmb6xEouGx6jclrAiJe 7h29Mdwcjp0D9nAN9fwWBzjiJBwhnEeCbLs4XNSIPWu7X4/Mf4/94l/1tQGUFraO9P/M 0hg+4gm5h1CcqXiIwBktZv++iA/WAMvY6RX97j4T1VjaS/iJfZ6n2SwGaT8ZBY6U/Biy sEeOa9VHQGV9Cd/Pj40cYJbR4O77CXggdoXYdMJcVj1WUAspkJhDEvnbhy/hSOk9YId6 mrgoq5oYcOdoKs3suIUm2l80EjHRtd9O1nPm2E1gHyktv54TPh9sE+WvEaiZUUYBPCYf T3QA== X-Gm-Message-State: AFqh2kr2QGfHBHGM5p8DDh5i9No18YJjrVVgS1JzU39OQtU4SmleDR4P FbdG+x3l/90kZW87NiGNtZjZsAYWpjtuE+6I X-Received: by 2002:adf:e80e:0:b0:242:368:7665 with SMTP id o14-20020adfe80e000000b0024203687665mr40647874wrm.60.1673256405038; Mon, 09 Jan 2023 01:26:45 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bp28-20020a5d5a9c000000b00273cd321a1bsm8092385wrb.107.2023.01.09.01.26.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:44 -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 5/9] hw/arm/palm: Convert TYPE_PALM_MISC_GPIO from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:13 +0100 Message-Id: <20230109092617.80224-6-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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 PalmMiscGPIOState structure definition, since it defaults to the size of the parent's type. Nothing in TYPE_PALM_MISC_GPIO access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/palm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/arm/palm.c b/hw/arm/palm.c index 68e11dd1ec..912164e93f 100644 --- a/hw/arm/palm.c +++ b/hw/arm/palm.c @@ -134,10 +134,6 @@ static void palmte_button_event(void *opaque, int keycode) #define TYPE_PALM_MISC_GPIO "palm-misc-gpio" OBJECT_DECLARE_SIMPLE_TYPE(PalmMiscGPIOState, PALM_MISC_GPIO) -struct PalmMiscGPIOState { - SysBusDevice parent_obj; -}; - static void palmte_onoff_gpios(void *opaque, int line, int level) { switch (line) { @@ -174,8 +170,7 @@ static void palm_misc_gpio_init(Object *obj) static const TypeInfo palm_misc_gpio_info = { .name = TYPE_PALM_MISC_GPIO, - .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(PalmMiscGPIOState), + .parent = TYPE_DEVICE, .instance_init = palm_misc_gpio_init, /* * No class init required: device has no internal state so does not @@ -187,7 +182,7 @@ static void palmte_gpio_setup(struct omap_mpu_state_s *cpu) { DeviceState *misc_gpio; - misc_gpio = sysbus_create_simple(TYPE_PALM_MISC_GPIO, -1, NULL); + misc_gpio = qdev_create_simple(TYPE_PALM_MISC_GPIO, &error_fatal); omap_mmc_handlers(cpu->mmc, qdev_get_gpio_in(cpu->gpio, PALMTE_MMC_WP_GPIO), From patchwork Mon Jan 9 09:26:14 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: 640602 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2044087pvb; Mon, 9 Jan 2023 01:41:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXvrlqQ35xkRkzFhAZlGBqX3aKtXa388XDrOJHdkzbHWie6u9fzxGjek48qfJ1DdSPR2aGLr X-Received: by 2002:a05:622a:991:b0:3a8:724:4a45 with SMTP id bw17-20020a05622a099100b003a807244a45mr101223097qtb.68.1673257279822; Mon, 09 Jan 2023 01:41:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673257279; cv=none; d=google.com; s=arc-20160816; b=i+9Fu2QSfiAT812wThynysFf80PoUuw3V4H1AQrDO7ktKg+P3a6HFdQqNvQjOnyKIM Q4VF2p1ylzJ32RyCnuZHobsFW0i9fMTOaFDOwBs7Lp8qnBrR5v+5E4nH5758Ux09syiy WGkenqbJfd2fjyMRWb7Rlu7+ersxo/q1q5Ty/OAGUMN97zsajps1knYBwd2ZhOg2B0pl wHAjcj5UPjaYnnUIybebBtAgQwY1n2ZX1mYqx76h4t3OWK68QIFFlahNS0k/JJQWUFnz A8YnTSL/h2h2qB7S7pbEdgq3BhgTFT2/1A43Nd6lnm5718antZ4MsBR1VEATdhhQ0A0i cfDA== 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=FvquKJo5kaY1zgQryRGVpaPOLLzwnxxyM3RwhB/Stuo=; b=kYG/JihOz5ylqxxtaZ80SIM7f42g+PxhlGyxYCZABRatIopxvn469Q5W+VGMgy02fx 9hCpMdydSzZ3cW02Zp3MR3rGB0xFtD62smNeeOdPsJ97XdpxvXa7Ijv59K0z0TamOrju zG3PynMUnvs1y6AApR7Xyw0IEO2d79WUbGohmIptdKHmSf335Xn6My1Xg1qCL+52xeKl EMfjxHgUIIZwr7b5xcywwVd5TptvgzkJSYBRvyLiUyOy78mWQmOejl8X6irruyErHQDv j/0cLI36+IVOV+9jSjtuO2KIjP3GFudlyvNWmD/7ufvs4Poj7L+qvTrTDRzFC7UI0oYk Pivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qJ/L/mGO"; 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 ge14-20020a05622a5c8e00b003a6830c403esi4438118qtb.110.2023.01.09.01.41.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:41:19 -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="qJ/L/mGO"; 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 1pEoQi-00043v-TI; Mon, 09 Jan 2023 04:26:56 -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 1pEoQg-00041g-CU for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:54 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQd-0005X7-UX for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:53 -0500 Received: by mail-wm1-x32f.google.com with SMTP id m26-20020a05600c3b1a00b003d9811fcaafso6100555wms.5 for ; Mon, 09 Jan 2023 01:26:51 -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=FvquKJo5kaY1zgQryRGVpaPOLLzwnxxyM3RwhB/Stuo=; b=qJ/L/mGOhcUGaMMHLzNnPOcFwLD8NaBXIhfwQAYAUDnykLgrt0YTjfFZUyh6ynbsMb KeIcdlWhlOoOIFJ6iBKzFxbVXLDujnFMjdo0kGnE6zoCqo3rgpfF7fElBogJmPJQ4Faz V8aAoNUQrTu9hHk33Xa2WHSjk+DJig+01NV4HFfpi7124f594YTC8iNqqAfJMt0n4KIf t8pnGVDB3QsQdeaVD+d4G24ZEbPJOM9YUJL2frQlDUFF6vxCQzTuxYnxmR3mFLjQcZfR 10+9oj39m+EWla99AZONe3urrwbt+8dDH1JomydDcr1KrBsum7n3Tp28HFPZyfEithix bUMg== 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=FvquKJo5kaY1zgQryRGVpaPOLLzwnxxyM3RwhB/Stuo=; b=X1KdH+A2JgiBQQk605Sbwj0YN55vJymkKJFXZj56WxR3qo88RFGpPbaEUpRK9Dz+d4 kPaX7pMl/WulE6+tF8DOhqi3Rd2MPEe7tkYO5q/EIFrSmAibfQyGuSGSWR/1GJ6NshZM j96iB1emyju8T3aLcchpm0dXLpu9cz55Iz08suIWO7r3Qq91ybYpVHpFsbDFLoT41xN/ efSx/lvHHykLH9fH4GV3vF3iLSAGq/zSwcRxmzKIqt+funEQUprGKVNbdMKZYWqG+USM YO6gSg1bxrMkd5l0E7kCxb5qwiNXAte7n/glc/mAq3QN/CEJLSJxta5Qil1eg1Rfl7Ax mEaQ== X-Gm-Message-State: AFqh2kpFumXHjODB7/3UDODvj35g212y/ZkP3SnaTAlXWv1kvvKP5MxX SLrAWOa7InA6EWvcNXCrU2eTlW0hZLhhFya7 X-Received: by 2002:a05:600c:5008:b0:3cf:6f4d:c25d with SMTP id n8-20020a05600c500800b003cf6f4dc25dmr45672643wmr.21.1673256410043; Mon, 09 Jan 2023 01:26:50 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j30-20020a05600c1c1e00b003d9f14e9085sm2167906wms.17.2023.01.09.01.26.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:49 -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 6/9] hw/arm/musicpal: Convert TYPE_MUSICPAL_KEY from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:14 +0100 Message-Id: <20230109092617.80224-7-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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_MUSICPAL_KEY access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 13f4dbdbc3..b496ff8a22 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1068,7 +1068,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(musicpal_key_state, MUSICPAL_KEY) struct musicpal_key_state { /*< private >*/ - SysBusDevice parent_obj; + DeviceState parent_obj; /*< public >*/ uint32_t kbd_extended; @@ -1187,7 +1187,7 @@ static void musicpal_key_class_init(ObjectClass *klass, void *data) static const TypeInfo musicpal_key_info = { .name = TYPE_MUSICPAL_KEY, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(musicpal_key_state), .instance_init = musicpal_key_init, .class_init = musicpal_key_class_init, @@ -1301,7 +1301,7 @@ static void musicpal_init(MachineState *machine) i2c = (I2CBus *)qdev_get_child_bus(i2c_dev, "i2c"); lcd_dev = sysbus_create_simple(TYPE_MUSICPAL_LCD, MP_LCD_BASE, NULL); - key_dev = sysbus_create_simple(TYPE_MUSICPAL_KEY, -1, NULL); + key_dev = qdev_create_simple(TYPE_MUSICPAL_KEY, &error_fatal); /* I2C read data */ qdev_connect_gpio_out(i2c_dev, 0, From patchwork Mon Jan 9 09:26:15 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: 640600 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2041038pvb; Mon, 9 Jan 2023 01:32:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXshScu6/lEMxpY9VwM4k/+nNlJhQ7z0gVMTvBsh4pTw7sZaNpdsCcUuXbYyPKpZXE647VI1 X-Received: by 2002:ad4:5287:0:b0:532:3194:8433 with SMTP id v7-20020ad45287000000b0053231948433mr2129191qvr.35.1673256759350; Mon, 09 Jan 2023 01:32:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256759; cv=none; d=google.com; s=arc-20160816; b=aHr9FQOWFNaDXQCMRi+XiTHrki9ulh0OdNPfcKZLtcyuk4yNVe2fpoKXiZ9ATN4SFG 8RowF8TrOJQ5peGs1fUZlADyLl8MsyM2Y2qCyvKi3x4cuq6KcwoH8vMDrjUH85rvxt6K AWmbJvMq5G3ka0tGtKl1xoF+ivDY/FojcBS3B87aKme6NFiVahxTULIzk1DODJvYrU5+ +t2GrZO0aTqXqi4c6RBu+ZRdI8xdvN/z6Vvr7UmyICrYyZn8hZW03GfW9aKqstmbnQc1 OvzRe3jpEaIaxHUTR7vXNpOmQ30BAe7MYlj+hIeeLtXJxZCRimw7ygjkLo+PedeKi+8e ZpVQ== 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=EouopIgVYZtvVCTsoAMyIu+cUbTHPHVNWqQu8tPr5Qw=; b=b4eWKmPBuJ812l6uy4GYK2rJn9FgLVEhl5jf2eR0ByKvt4P/m6nWou/tb94jTd/i2u GoBnHz79oV/4G393hZ4bXaikWPfupMmi33zMfTNoE3c2jrOj8y0WrpV4XxntyRYyFy3u t9+cyc6pUkrxOjFWTS3PzO/xN7ThK+lJl5TTi90nY3QHm+YZx0QeKF9jxvTNTO+UBDzR GqvjuK25yAYM85p0o85hkd4UEDVED40zHbCRKKoBuZfqibfHqqYkkLCHV2IXprTXaj5C lY6GUgHPSa+2VlnILN+RPCG5XunkLU3nurZXmJaDizFsDb6hVtf99H2oxJpb+jPeY6uG S1Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kOMIPKjI; 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 gc11-20020a056214230b00b004c70a196fefsi4197298qvb.580.2023.01.09.01.32.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:32:39 -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=kOMIPKjI; 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 1pEoQn-00045H-Dh; Mon, 09 Jan 2023 04:27:01 -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 1pEoQk-00044f-Hf for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:58 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQi-0005YD-Pp for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:26:58 -0500 Received: by mail-wm1-x32f.google.com with SMTP id ay40so5791106wmb.2 for ; Mon, 09 Jan 2023 01:26:56 -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=EouopIgVYZtvVCTsoAMyIu+cUbTHPHVNWqQu8tPr5Qw=; b=kOMIPKjIi3FNcnslzUZQhtZfSYLSsI12tzIw9Che8aYFnOdoYvQ0uFpnUEXdXAGPhO OrldrqSx9hBl3N5+JeTXBE4FZnxBXogaBE2wb6JZSYH+hEieZMERD51vh+ta6rIIClIv YQKQ3mkTgcQUcHpYONhG8QColJGLoGV5KQ90V1wEw9kmCMiWRp3ytPE9P8NCJk7e5CF1 3xsdIBy+cbpGy+meUODID/pQ7QTefnzyx5GkP1EBampShj2klE8+2f7tXCjaoxv4tTPb D/Sm5xFVRKDGPwyJlnWDrdG8JNo+41dinCTfwRxvq693mUyxDDG3lSY/ycdPFRLG7fkT f/3A== 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=EouopIgVYZtvVCTsoAMyIu+cUbTHPHVNWqQu8tPr5Qw=; b=5QDiXzlgDrMrUN2LKe6Z0VD4rGrK25+6zJhVlmUZv3uW3B2J15egh559/lGYglRxaT c5ErFPV3qjgMHS6lL4rSuyDfC+slKxE7a1mTrp+Ha7DZTQ5eiFIxpukTo3zjaWVnL2HF +9JogRXW2l0eNSZNuqDV9xjALiebwgPHCR2oSk8ZHWwOUuS80j+XH761VIog7zypHQ2+ 4ZPbsGvzyI7aW3YJZhQVzPKt7aFWV7AMQpB8kECqhu0AVUCe0ut1LGPWIW0vNCp5pb3D dQTUJx8TSmcHXgPD2uPyMDF0Iil4dok2WPkoRoC0gNf4Vc/9XmRwo7n7XVkLR9khOUnp PUaQ== X-Gm-Message-State: AFqh2kpR94SaEUARhY078hqU5BZJ7/S29Gxiutf7OyoiW/DK4JWRQwZ3 ZC/xEmQ/m8MDCPFgD2lzm3OTSAWdkSyr2gBl X-Received: by 2002:a05:600c:3ba4:b0:3d9:f135:677 with SMTP id n36-20020a05600c3ba400b003d9f1350677mr1455755wms.13.1673256415151; Mon, 09 Jan 2023 01:26:55 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h8-20020a05600c350800b003d990372dd5sm16662570wmq.20.2023.01.09.01.26.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:26:54 -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 7/9] hw/arm/spitz: Convert TYPE_SPITZ_KEYBOARD from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:15 +0100 Message-Id: <20230109092617.80224-8-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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_KEYBOARD access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/spitz.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index 5aab0b8565..6605d658ed 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -260,8 +260,10 @@ static const int spitz_gpiomap[5] = { OBJECT_DECLARE_SIMPLE_TYPE(SpitzKeyboardState, SPITZ_KEYBOARD) struct SpitzKeyboardState { - SysBusDevice parent_obj; + /*< private >*/ + DeviceState parent_obj; + /*< public >*/ qemu_irq sense[SPITZ_KEY_SENSE_NUM]; qemu_irq gpiomap[5]; int keymap[0x80]; @@ -514,7 +516,7 @@ static void spitz_keyboard_register(PXA2xxState *cpu) DeviceState *dev; SpitzKeyboardState *s; - dev = sysbus_create_simple(TYPE_SPITZ_KEYBOARD, -1, NULL); + dev = qdev_create_simple(TYPE_SPITZ_KEYBOARD, &error_fatal); s = SPITZ_KEYBOARD(dev); for (i = 0; i < SPITZ_KEY_SENSE_NUM; i ++) @@ -1193,7 +1195,7 @@ static void spitz_keyboard_class_init(ObjectClass *klass, void *data) static const TypeInfo spitz_keyboard_info = { .name = TYPE_SPITZ_KEYBOARD, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(SpitzKeyboardState), .instance_init = spitz_keyboard_init, .class_init = spitz_keyboard_class_init, 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, /* From patchwork Mon Jan 9 09:26:17 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: 640592 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2039774pvb; Mon, 9 Jan 2023 01:28:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXq/gFhvDsCkXy3Qb7CkZF25qXXLdBxfSplnZZHeo2gY5Tf/4Wp0O5unDBWE44S1c51wB4 X-Received: by 2002:a0c:c390:0:b0:4c7:29a8:1ff9 with SMTP id o16-20020a0cc390000000b004c729a81ff9mr72502704qvi.30.1673256520732; Mon, 09 Jan 2023 01:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256520; cv=none; d=google.com; s=arc-20160816; b=MmMyQRntRd0VW5IQqJ0CwL8B9L+CaT887JUGKTzreH5bj1ig67jcv535+nMXQ57AKz VPrQASJarRgXVezwbMcORaJjF5gr1ts3KFNMNattOUWuNOL3WSVHyo8CGtDlqGxhsS49 ZBD99artwNCbMFcF0EHKfbOcgH3mtuBlTxldz+0+qQM3T5mArPfu4DWhdvsHqHUpwzzy ys9ELJaJNBoUkX/BdihAITjK8DJYjniEu1Ko1t99C2aOKjhqcdpEJZ3E+HHTTxI7eKLs cf/GvcayauPc2P6OZCWVbyDZeqJTmjq/QggcrJ8WzA59wu2douDk+ZJUeh+Xjkjfwlog JK7g== 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=lSI1q8Pr7ikyNEHE0ptbDijcSvsZa7X5vhrpcvBH7wI=; b=VQ3olhOcQLONphxxTr5YfcDt/VN2UZ9JEjRFjoQwoDA872YdMGR8KrxiXwf2KC/pRy sMgyVQhkJUJLadLKIydKo2fsZlurwy/iB6cGuKgP8Hgqse/n0YmqfrkfM1Jbl4tSPoAk tqQMLwJbg7ZpP7lbJtEDw1DuvNzhC64ab+wPQ4/qxQQtGMCtAMA4A5ueuVRX0PipNxDL /c4kZqkviUFK76VgyJfzaG3cubXlqIHwz6r4CM+oxBdeTZ4nN/0ij6y9mv3Z76f95/pb rSNXzWV6hdOHuWhRKBuZcnqkPbI3U7KOt7MNfxZUCjTQZKH0Ka7nk4Ic6VM/BGPZN4H3 prQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PupitDtL; 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 dv12-20020ad44eec000000b005321cec271bsi4357738qvb.186.2023.01.09.01.28.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:28:40 -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=PupitDtL; 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 1pEoQw-00048R-71; Mon, 09 Jan 2023 04:27: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 1pEoQu-00047d-7V for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:27:08 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQs-0005a1-Kz for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:27:07 -0500 Received: by mail-wm1-x32d.google.com with SMTP id m8-20020a05600c3b0800b003d96f801c48so8505328wms.0 for ; Mon, 09 Jan 2023 01:27:06 -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=lSI1q8Pr7ikyNEHE0ptbDijcSvsZa7X5vhrpcvBH7wI=; b=PupitDtLY7UghG6gW4N1I7E1STzB5G8pOzgskfDpFcRYuZwfJe8ZKSUTyleOJrXxUC 26x+hvdXdg4GUermlxOi+IbsxnL+REoNdkcETJ+XzA5NuqwheVrAd/QJ54m25LoxFmvQ X0UeQDajIOU75/tK/D7e6s+PmgAMpoVinxtPmI04UeYh0VjXTMhdUIzvQid1Aoe+QPCe hpU0DEqefpi2wP0r9bq/RrvTmZYvjgQdF9AWfUkh9+99o5NrqrQWYeYTY4lJAGCJsS16 ygg/+niSmnveo3hvClsBNEyzLOX1opS3Xt2s9qGXu3mC1y46k9cGrfUxvaSG/s7mrSgd M7Lg== 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=lSI1q8Pr7ikyNEHE0ptbDijcSvsZa7X5vhrpcvBH7wI=; b=jgv7l6PPvY+oopKxG/68kzlYDAcZLhUugWxzNGCOgmBpaYZG3qv+IkDorrR98TA+MY Cw9Alr+4koGxu7YcMwMjbUS08ojW4bZ3989h/8zA56k50aDkuEAmAwprAk9ALXsyFW76 +J1CFhthy58NBVugNDu7EHTzoLMQgnwVSAbBL4UmxY4RTv+yaDikDluLP3Vf6sPZoPgf WerAUThUtS5ceYOyfvsY05eioZkMQw+sD+TNzSxgoh2bQ76BMI8bZfsSmLxwjn/OUo4I jcL7Z97j8x9v90bCslckeG3mhC/TVmkGBHfwL+rC+G7yUpVlnWHTk5HL2066Ep8pfFZz xR+w== X-Gm-Message-State: AFqh2kphHCavaPhNDRvATrgmxHYEa0HrYDwLdVAXBXeu0WkG2vl8obkl bFs26VDoZ4OjY1/M15aJ1VMZ2n8+/ye1fn9t X-Received: by 2002:a05:600c:1f12:b0:3cf:8155:2adc with SMTP id bd18-20020a05600c1f1200b003cf81552adcmr46860643wmb.33.1673256425207; Mon, 09 Jan 2023 01:27:05 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i3-20020a1c5403000000b003d35c09d4b9sm15151704wmb.40.2023.01.09.01.27.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:27:04 -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 9/9] hw/i386/kvm: Convert TYPE_KVM_CLOCK from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:17 +0100 Message-Id: <20230109092617.80224-10-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 Nothing in TYPE_KVM_CLOCK access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/kvm/clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index df70b4a033..da0984b5a0 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -35,7 +35,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(KVMClockState, KVM_CLOCK) struct KVMClockState { /*< private >*/ - SysBusDevice busdev; + DeviceState busdev; /*< public >*/ uint64_t clock; @@ -322,7 +322,7 @@ static void kvmclock_class_init(ObjectClass *klass, void *data) static const TypeInfo kvmclock_info = { .name = TYPE_KVM_CLOCK, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(KVMClockState), .class_init = kvmclock_class_init, }; @@ -338,7 +338,7 @@ void kvmclock_create(bool create_always) if (create_always || cpu->env.features[FEAT_KVM] & ((1ULL << KVM_FEATURE_CLOCKSOURCE) | (1ULL << KVM_FEATURE_CLOCKSOURCE2))) { - sysbus_create_simple(TYPE_KVM_CLOCK, -1, NULL); + qdev_realize(qdev_new(TYPE_KVM_CLOCK), NULL, &error_fatal)); } }