From patchwork Tue Feb 13 15:52:13 2024 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: 772316 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp324600wre; Tue, 13 Feb 2024 07:52:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUcvEN1GK6kf1J5DL2Kj6oW3sSbKOv8vOBa21fRNXxSHf2shVQz3JAaQCYXwx+Ne4qtrTo8uJ6aZl3R1Ky5Z0IN X-Google-Smtp-Source: AGHT+IHVcRUZcXECJMUOz07+oe4JUr414MmwZF0HKMSqGOG5ZStGRBYOI3Wes39kOu14J8p5eenl X-Received: by 2002:a05:6808:14c5:b0:3c0:31ab:b945 with SMTP id f5-20020a05680814c500b003c031abb945mr10394803oiw.4.1707839565760; Tue, 13 Feb 2024 07:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707839565; cv=none; d=google.com; s=arc-20160816; b=bAF3tE84YceRXck8RewlB2W9ogO4yYkkgQC21YJkze3LME8HsglunMBsG0Dro2y6oF SbPbmO6kuGPuzs0KgAnqENwfbBy4b4trFtdXUlBRgJwNTEeCHWGsJv/NAYbi62/vA0v1 3Rzq/LqfKDZ/7V2Wd/42SwYSYD3CPLb9iqziM/q95A6YSkPr3FUtm01PdNATCVHQYP+1 BABDHEIwz6tw+qFpqLDsVzvCyUSIqQHMA0A4F/fjJ41J7+9brKjSkH5AQBmStt5zSUjS UWNZH8pkFHdHVStexqCLSIJ+5UM4mRbFBdyVe34YsW/5ngLMPtTJASd64+f/0E9R/9TB 9Yng== 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=5AxD+0YCMVgkroYfQziax4Z5o2Tig0RRdRnoJR3JtkY=; fh=T16U7QxuEMg1VfGTq1MyM7rjq8pSKLad7syKY1My0yI=; b=qyhs3HvkhR4jAQ6hpH8PXlmNIXDq3PhWaeAKQBmotKWoekSdJqwy3ufYta4mHxMLoE oUF9V4gIAiTsOFp/FP/8NZFt77EBixL/qUrPNlntUEEGgSGJ112Pr+QYCAFf+HVXNZUG LsTqIzKMFlVgXDsG19ZyScwTkwWsbBhQIf/YvYWLk1XWWZNQSWmZ0v/rFuH0Hi4Tywss 64N+ak4p/llEAZ0IwMJYhLD6vsRAIS97wLvAnyV8EJIIWdnm/df1Sfbq9+Rcv2XdsBPO 5iIg5ZKHML+LC0qpaMO8vROIbsfWE8Us+FLX+t/XBXWKcPITNGoiFYJZ1PipqPRx62pD HgCg==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WmMbxwwo; 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 X-Forwarded-Encrypted: i=1; AJvYcCV1J78NBGOmMspVJOgv17KymSKIr3gfSwBj25jupuw/N3YpZbBp6XSujg8QBeTkglBgl5ZW517hqmb+uuSGnVeH Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jf8-20020a0562142a4800b0068ccc59df11si2945347qvb.394.2024.02.13.07.52.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2024 07:52:45 -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=WmMbxwwo; 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 1rZv5M-0001Za-TM; Tue, 13 Feb 2024 10:52:40 -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 1rZv5K-0001N7-L7 for qemu-devel@nongnu.org; Tue, 13 Feb 2024 10:52:38 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZv5J-0005o9-1h for qemu-devel@nongnu.org; Tue, 13 Feb 2024 10:52:38 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-33cda3dfa06so453920f8f.3 for ; Tue, 13 Feb 2024 07:52:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707839555; x=1708444355; darn=nongnu.org; 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=5AxD+0YCMVgkroYfQziax4Z5o2Tig0RRdRnoJR3JtkY=; b=WmMbxwwonlhXPXVoekbf0Gz8IYqfGC/hytzH7JhqLkDLtZwPxxrVqDB3ZHv4Ijdb2h qL6NDcDnF7iOW0SuiVqm119vVL4YqbWbbQViZ9qOl/Y0yfn2YQWGMgTxOdGxK7IJIC+b scVJLUh3hdPFdKSnGK4G6d2BBHfeHZGCd177YB7kCpZuN1WuXGp53g4+8vQnOGKBtoyd GCjGqjvs7gQTskKAdEJemk/mCoY6lG2pf1hQSDIDi51ztBeqJfzMS9ZYBEEgb8MBZcvT rNxtqIYq+pOOCcDN6FO5fHYdKNYo/JEotXHYxBMuqmThIhR/tV8hSwyNHTppmvqeoXxi WH+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707839555; x=1708444355; 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=5AxD+0YCMVgkroYfQziax4Z5o2Tig0RRdRnoJR3JtkY=; b=NCFNjUR45yL2pGiBv4HSRoJjnol5AN9ozp8kyknN22ZbKSwf4I1n2/G88VggXhUgPC +rpBk6lRXUNusgYmegM8HrFnRvtwuMgvnHA1TQJpWraFOq2UUijB5sng3ISYmTzIttMi g6qyAwQOm+rfgI8A/cs66ubmiZKQIJD5i/u4R10uZDdDfNgP5ZI4b9vCMZ2PwDrom4RN MAUpshcSdPYqdhlzUEjT3EnKZl9pJbnjbDXlcJAqzRbjwckT2WxBjAsqoWvVOIFFJOqM 91w/iudiNYd8JwbVnbW2uf74oUPWZsPaIpLtjXoUn/J2drUAEUorqksCd7Cfjr440j8F 4iDA== X-Gm-Message-State: AOJu0YwpU6KDVQDYD2KodsSq+lZFz8Mm39gcIEDMT4CPSjFPxtNy+eZZ BqWmqKESwoUyc0tSMKds3Tggzk2zNvjf2sq3SVDc/Xej0mUbN6UhJelB0SC0EtowCA79n1bF/1/ I X-Received: by 2002:adf:f890:0:b0:33a:efe0:5a37 with SMTP id u16-20020adff890000000b0033aefe05a37mr6590934wrp.6.1707839555340; Tue, 13 Feb 2024 07:52:35 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXKjmc1SZJV2956P8PE/PBTQFBMsL/I6B51CYt00/z6NkHA8dPuLoMTxxUAlxZ5JadBoGgrTkUki2f4ZOuZGU4GyguZTh8vpyqdlVFG+bhRx9jhJ79t0szDdH4CT+7QuOuwBlQTD+NaGeFMFYrDMygRMw== Received: from m1x-phil.lan ([176.176.128.243]) by smtp.gmail.com with ESMTPSA id q1-20020adfb181000000b0033b68556c38sm10041274wra.70.2024.02.13.07.52.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Feb 2024 07:52:35 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Gustavo Romero , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 3/4] hw/arm/stellaris: Add missing QOM 'machine' parent Date: Tue, 13 Feb 2024 16:52:13 +0100 Message-ID: <20240213155214.13619-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240213155214.13619-1-philmd@linaro.org> References: <20240213155214.13619-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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, T_SCC_BODY_TEXT_LINE=-0.01 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 QDev objects created with qdev_new() need to manually add their parent relationship with object_property_add_child(). This commit plug the devices which aren't part of the SoC; they will be plugged into a SoC container in the next one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/stellaris.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index d3a12fe51c..d9884286b3 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -1271,10 +1271,13 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) &error_fatal); ssddev = qdev_new("ssd0323"); + object_property_add_child(OBJECT(ms), "oled", OBJECT(ssddev)); qdev_prop_set_uint8(ssddev, "cs", 1); qdev_realize_and_unref(ssddev, bus, &error_fatal); gpio_d_splitter = qdev_new(TYPE_SPLIT_IRQ); + object_property_add_child(OBJECT(ms), "splitter", + OBJECT(gpio_d_splitter)); qdev_prop_set_uint32(gpio_d_splitter, "num-lines", 2); qdev_realize_and_unref(gpio_d_splitter, NULL, &error_fatal); qdev_connect_gpio_out( @@ -1314,6 +1317,7 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) DeviceState *gpad; gpad = qdev_new(TYPE_STELLARIS_GAMEPAD); + object_property_add_child(OBJECT(ms), "gamepad", OBJECT(gpad)); for (i = 0; i < ARRAY_SIZE(gpad_keycode); i++) { qlist_append_int(gpad_keycode_list, gpad_keycode[i]); }