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: 13093177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DF59C54EBD for ; Mon, 9 Jan 2023 09:28:09 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXt/KN1/kv0D2QhrCZXkzeXOaLRtM9oyyWMl8JDYB9u87PkJ6ib+WUQW8aNuifSHsU+kmuGkLw== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9BAAC54EBD for ; Mon, 9 Jan 2023 09:29:02 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXu0Utqf6KoKnArVxL+VfYXdLwlKs62tV9HyDIOVlRnQajUleFlJBHSAsb4pWS7pRa1E5P3BvA== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF3CAC63797 for ; Mon, 9 Jan 2023 09:32:21 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXuJMQgfBddXdqzUaA2NzHNtHB+DloHYX7WSv4CWPEIXLuKJN76sQibdj93qQh62yfKHr6gDUA== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093178 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4467C54EBD for ; Mon, 9 Jan 2023 09:28:36 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXueq5hv0Uy9dcTgvHpoE30J5OLP7C9UzK2j7ITFjZ23FRv3TsBg8iATIIg0zxVBSzAmdZyCmw== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093199 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A32DBC54EBD for ; Mon, 9 Jan 2023 09:31:26 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXtJyUGAWC9FWg+/5wMd7H0+k9wcTeCJjKjE+L/eZZJ7Nnxe/U8pzhkmRWVB91QpNrbOS8MtXQ== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A977C54EBD for ; Mon, 9 Jan 2023 09:41:20 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXs0a4lyh9LpwU6LEMRaXVI1KU1xDIPnmU0NSKHUuO+24nQiwKpFELMqfnhQohlq3dCu8TTB5g== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B012CC54EBD for ; Mon, 9 Jan 2023 09:32:39 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXtKEF+9vOONF1gtkycqc9oaPTR/4Cqfd1t0HUshgy+1U5iFHNeka55qVXjq8g+CTsTjeL2qjg== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54923C5479D for ; Mon, 9 Jan 2023 09:31:42 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXu9wAlv7+krYXTSMfRycBllNlI89kc/pL55TC9T0LsIG/oNU97yloEIl1s219zalYBpef0Xkg== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13093179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12AABC63797 for ; Mon, 9 Jan 2023 09:28:41 +0000 (UTC) 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-Google-Smtp-Source: AMrXdXt+T0ZaeGuOm2agZKu7TzrKxUyDuMXwKKrteo+H1bcnpk9+F7ArnavH2dDnYAHrEDfln8e2rQ== 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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)); } }