From patchwork Fri Feb 3 18:09:08 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: 650099 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp972252pva; Fri, 3 Feb 2023 10:12:03 -0800 (PST) X-Google-Smtp-Source: AK7set/EV/zRcQxz67bnK4H3so0ztt3zoMGKIZUHqJ+YFdqSSo5FtAhHhIJ08U4uY0n7SwSo7VSl X-Received: by 2002:a0c:aa91:0:b0:539:6a0c:ae95 with SMTP id f17-20020a0caa91000000b005396a0cae95mr15044763qvb.7.1675447922993; Fri, 03 Feb 2023 10:12:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675447922; cv=none; d=google.com; s=arc-20160816; b=LUAebzXrKBo1odrQpXZQYXDObvZ02a2VumAyTNUAaiLP9Tsl3glqwocPB5/YV6ptTi AFvxRtK35Ii54axLSld4QadAd8TGi2GDgkoxtrBcws5ZnDFiJA639iCGlGns+fwOssFC utiGtH4D00238/Edzs/l9Ks/PYKa3kuMbaCdllmMusJpubz54iLKYi0gsbhlflFCpXuI Pr/us0n4XGmY9VZTx5ZspbVBu/0ltNiVXEgljVcQY0axl+0MbGw3+EO9hOiMsh95aA3d ldf58G3mJmD2xymdMnVWeUxe+Us14653IROAYkI8A9R6AKoRdh0BalNQ0z7DWBLSbMYE rfEA== 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=P/I3al5seYLenPgGBRZSaVfmIjm7PcZ28M3YPTxSCx8=; b=V2uHQTNqSCexUYcqXvMQV3o4cZBIOVh38VI0VNpFICfkUy+nWdNEOySa1fgZGG/ZH/ IoZ3EtXfLWEYpOkv6N3mkguO6gDSYdPD0d6hMbIBnc1XDNyPwUcHBDtTS8ZJVgNXYpEM tA3fdoZ6lCVhNuZ3LHjvzAC7aJ/rhw/Jpft/lmGVzDhS1Wpj+IBiL//M4GrZ61G2dvIt T5pb7MbD/IyqY4CbU9FIOQQvD2+32hjhPRc2HHujPhkSpjHZNivgVOzEBwyIr1OZqIlV TnaVgIbxFxepmnZr4EeIYxcvQE+SRLs4afoRgnVnYt0iob/d6nqFS6acLHuglskXNxTb 4meA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="d/Ls8fK1"; 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 if5-20020a0562141c4500b0054ace222c06si2602557qvb.589.2023.02.03.10.12.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Feb 2023 10:12: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="d/Ls8fK1"; 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 1pO0W5-0000iP-69; Fri, 03 Feb 2023 13:10:29 -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 1pO0W2-0000W8-UX for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:10:27 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pO0W1-0008VF-5v for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:10:26 -0500 Received: by mail-wm1-x334.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so6605078wma.1 for ; Fri, 03 Feb 2023 10:10:24 -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=P/I3al5seYLenPgGBRZSaVfmIjm7PcZ28M3YPTxSCx8=; b=d/Ls8fK1E0DRDVhuJ+F4H2CDcQaF9fPPbMrilBLiBay3hEmtC0jjeYtWkvZ2oYjQqH zs9+FGspjQcDMz6h3n3TtrC02ByY49ucsvslNbfru0f6lfliWLTi2pHOwbeJdFcfzghR IeqsQj2szjrfjgIC+OQyFR41w9Uo2KsEQCrOGI9fPJjv4Tpb64jirxHRXYqG20hAEbpI vbmL80dCP4sYb2/ngcf/RJ/rWRd6nzAFKNbYREA1xLQ4V/I8Ic1S2S2HJAuJfD93d6Lt qRCE4SMLyOwdUw65f9vxOwHzltWyHXSC6jQt4Zq3goAh+6TUDUn2kvSJ1Lrk8H30ptnC 8z0Q== 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=P/I3al5seYLenPgGBRZSaVfmIjm7PcZ28M3YPTxSCx8=; b=rL28yB5g3XoFsqxFhUjuShcLxBnPXXZXvm12sQn+yRrQIptm1tdX0x2JARlsh/55Mm JvSwVW3bHiAJ0yCgxscsrXoImztFINxCmkPBUBhEDyhEi1mbtUOlNjUD5MGRnnhJr6fT g8VZdeRM1PEx+by5TgAP+tDCYL6z5Ls6xTBjh2V2MqfyN8nGS8gaiSawLK+0Wp3a5Bho 7qiWBnivMHZO5cmnYH98bN7dVNAVvqedN8RE9to0DT+WFvHKv6aOvCDn3r7Y+K2VOK7w +HHAhVMblm5Ts+tNYgjAwlQqALzUiPfbKAyH33k5wk1mc1ntC2V2FsNK+jaTN/X+kixK EAoA== X-Gm-Message-State: AO0yUKXcdU8xqg8mp5DMedigBJdoWoAPydnGzEiIyxm3pfBFrlltHUXd CS8jJ2aKCHHRvIxrYFFN+cjyP6XPCkl4Hp1v X-Received: by 2002:a05:600c:5113:b0:3d0:761b:f86 with SMTP id o19-20020a05600c511300b003d0761b0f86mr10859031wms.28.1675447824117; Fri, 03 Feb 2023 10:10:24 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n6-20020a05600c4f8600b003daf672a616sm3657304wmq.22.2023.02.03.10.10.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Feb 2023 10:10:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Markus Armbruster , Eduardo Habkost , qemu-riscv@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Laurent Vivier Subject: [PATCH 13/19] hw/m68k: Set QDev properties using QDev API Date: Fri, 3 Feb 2023 19:09:08 +0100 Message-Id: <20230203180914.49112-14-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230203180914.49112-1-philmd@linaro.org> References: <20230203180914.49112-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/m68k/next-cube.c | 2 +- hw/m68k/q800.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index e0d4a94f9d..460b84c6e6 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -966,7 +966,7 @@ static void next_cube_init(MachineState *machine) /* Peripheral Controller */ pcdev = qdev_new(TYPE_NEXT_PC); - object_property_set_link(OBJECT(pcdev), "cpu", OBJECT(cpu), &error_abort); + qdev_prop_set_link(pcdev, "cpu", OBJECT(cpu)); sysbus_realize_and_unref(SYS_BUS_DEVICE(pcdev), &error_fatal); /* 64MB RAM starting at 0x04000000 */ diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 9d52ca6613..1f363a666c 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -427,7 +427,7 @@ static void q800_init(MachineState *machine) /* IRQ Glue */ glue = qdev_new(TYPE_GLUE); - object_property_set_link(OBJECT(glue), "cpu", OBJECT(cpu), &error_abort); + qdev_prop_set_link(glue, "cpu", OBJECT(cpu)); sysbus_realize_and_unref(SYS_BUS_DEVICE(glue), &error_fatal); /* VIA 1 */ @@ -483,8 +483,7 @@ static void q800_init(MachineState *machine) qdev_set_nic_properties(dev, &nd_table[0]); qdev_prop_set_uint8(dev, "it_shift", 2); qdev_prop_set_bit(dev, "big_endian", true); - object_property_set_link(OBJECT(dev), "dma_mr", - OBJECT(get_system_memory()), &error_abort); + qdev_prop_set_link(dev, "dma_mr", OBJECT(get_system_memory())); sysbus = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 0, SONIC_BASE); @@ -520,7 +519,7 @@ static void q800_init(MachineState *machine) /* Logically OR both its IRQs together */ escc_orgate = DEVICE(object_new(TYPE_OR_IRQ)); - object_property_set_int(OBJECT(escc_orgate), "num-lines", 2, &error_fatal); + qdev_prop_set_uint16(escc_orgate, "num-lines", 2); qdev_realize_and_unref(escc_orgate, NULL, &error_fatal); sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(escc_orgate, 0)); sysbus_connect_irq(sysbus, 1, qdev_get_gpio_in(escc_orgate, 1));