From patchwork Sat Feb 1 09:15:23 2025 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: 861223 Delivered-To: patch@linaro.org Received: by 2002:adf:fb05:0:b0:385:e875:8a9e with SMTP id c5csp1113181wrr; Sat, 1 Feb 2025 01:16:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXouXZQmJNO8kj3o6EbgC3CzkNUmEAPK7IIx5935SIaiilCb72C+e+6BwjXU0oF9rCrwBryCg==@linaro.org X-Google-Smtp-Source: AGHT+IHqXKL3owDLjtb8O7qQd5RClfve01zuOsBDeuYV9r3Jq6Dn/5GqEzLoZPpciAXtC8JHAntF X-Received: by 2002:a05:620a:1d0a:b0:7b1:48ff:6b56 with SMTP id af79cd13be357-7bffcd957c2mr2241857485a.43.1738401395908; Sat, 01 Feb 2025 01:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738401395; cv=none; d=google.com; s=arc-20240605; b=St79DGVFJv115AICd3T0LkkysyKstqncv3+DhdZehR7eypWXhGFUY9wrShYaVTiP/3 fct2pHPZoZuSxg/REz8ObzSizqtBbJiUbSMk6XeEZEIOHYJx7ksr/ynIlPiDItvTNL3p W8K9lm07I/AmtwQ4gMx4398sfVRaPcyG2MA5HMPzMjIKzgH1wcXHM1ehyZ2V4A3hluyc iAhuGXDeEG3tVqT/dVBkKFA5AaVWKpIc3SKZLy0cGFPgwUU/xbLThifQad81kjMEphPj 9MzYT7Esto+hlC+gDKhmS3zj/Cr9kVMad7dEEjI+JDMbK9fik5QfTUcEfKNWSLsrxhk9 xdWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=8SVQMLAYnWYkem+1LN8L06NityQ8o7wifm7JnMwf0uI=; fh=H4GbwdQ/2oIyPNlbjSTr+s+fsGzXnEOR03aP94txBto=; b=GHiV4eyTCJL6RTiKO7VnO1Bqmj0ZeWd8tKCTVrn1NImC/vgnarV1c/lkz3IhvTMy3J iFK38R4Hr4N/54Ue9xGFGbq/MY8gHmvvgyU5MWlSKYiRMTNvGE7DRSIkEWw35DkXeSHY qbo6y4Es8wTT8jXgRio8OJT4DXyhsXfJQXtsE1QK7BGrzp7sQKAIHhAslb/4VnFl7rDP 11he8cUkLZ6nmXhqjtQn4lj0Zv7kLMYV+MirUfav/mXfR/h8F7MN95yqoxlq8WsThK5m +Tne2aVSlxV6qnKftjjzSV9H3rAXHT7FKRs0W7G7KSTJs6iRr4MJUGGoUDHkvAM8VDQg 9Kdg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lPGuPTiJ; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c00a903f7fsi579441885a.228.2025.02.01.01.16.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Feb 2025 01:16:35 -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=lPGuPTiJ; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1te9bR-00011P-4A; Sat, 01 Feb 2025 04:15:49 -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 1te9bO-00010X-FL for qemu-devel@nongnu.org; Sat, 01 Feb 2025 04:15:46 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1te9bM-0000T3-Fs for qemu-devel@nongnu.org; Sat, 01 Feb 2025 04:15:46 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385df53e559so2012779f8f.3 for ; Sat, 01 Feb 2025 01:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738401342; x=1739006142; 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=8SVQMLAYnWYkem+1LN8L06NityQ8o7wifm7JnMwf0uI=; b=lPGuPTiJUKu+0n2cQOown33woOMIiMmBuU7XzF1PznHq+zbkkdhFVq+6IcKHawX8MO 3n2xlRy+xGQja4os+9aejjAqp6P4E1jcrWeIyVX2BhKApaJm5QwUdoru7BoQ2dHr33sJ gf+KuUPyZYIOQUCWqsSgCnQdOnGxPpbFg5X8ygcFteVlgY0+r43FjK/0cUyrhG7nyZcO CbxpPtX+Ny8rfmY1bdsOkA2VEAKY6zxp0LhFsf4u0b8nfZIaobSe3PzXhPaKZuz5rKYk Zm7u+DHM4E8C+oRmg2DaNG4iapYy99NAr16+zj1A+fZZaE9Dbym+mWAdKuojdOGva4Nv HCgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738401342; x=1739006142; 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=8SVQMLAYnWYkem+1LN8L06NityQ8o7wifm7JnMwf0uI=; b=ICQoT1Hwjs+3NxzscjfmIBrnD0v5Yy73U+068z3Rz64NM5+/X5wenby29pGTfFulCm 6m1NXxeG6LhE1D4Spwch1TaThaJwST+TRoikEF+ul9yyjhOIfpUY3vsVgihVhb85rZxW ot1OehW8zr3h/+JVuAGup/jrUN1tOr8SUGiT0ceuHNM3iWIHwSRB5ZMLgQPVs+pNHn9e 352GOPDmHXbJafyNNCi/Gukq7oPMKBErZRXJw1EMk/XzFIAfI9CwomLqjS/LmC/JSC0B a9zsuX2daGRtRPkfbnvkVo5Zbq/cczW6qY0T6WY9FSaRg08AE5TmWmwJQFC6+mM2O8Ff IRNA== X-Gm-Message-State: AOJu0Yw9nypwREG0rEm75zMDbZOMxiM6/uRdeneA3fC4r0zKjv5yevHu o+3LJ9Bxnvo3OgWDBl4ChW3JnTgZdlvB3AlM5djWlxeGu75DvUc/VytGFNnXaM7TrGNBsjEe8rf kQ54= X-Gm-Gg: ASbGncsSjxXxJPpTxwOh6U8kv0JoRiuE+p9HRwb/5mrHw/IY+lD9Pmp6W0JQdjiKoYb zTyIDZAVmKTi7KdgY5GK84CXHe2QcQY6hMx8AltmOjxeZu24EGsukZ6gJNHYVTyyr9Nxe8jqzyE /3rMiLCreZSqOSwYHDyNXdIZQtXD0Nd0BOTUj+UXkYdMeVCDqHC38ihHFvYo9GZVchqJvce9CDv Q6IUXUYoBtyNHIlppMdymzGwx5kquG6Otu9S+t+0WIPSmYy82GC43Wg+6BpY0ZbAZAM5QjHr1QH CMXdpS0X0R+x4qJMqkvP6YiV5ZrTSpaas+21xcEr2zTzKKRLrVvgwZcbg4jkKGGCcg== X-Received: by 2002:a5d:5583:0:b0:386:37f5:99e7 with SMTP id ffacd0b85a97d-38c5196fd12mr9884961f8f.33.1738401342505; Sat, 01 Feb 2025 01:15:42 -0800 (PST) Received: from localhost.localdomain (232.170.88.92.rev.sfr.net. [92.88.170.232]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438dcc13151sm115999295e9.1.2025.02.01.01.15.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 01 Feb 2025 01:15:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jared Mauch , Peter Maydell , qemu-arm@nongnu.org, devel@lists.libvirt.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/7] hw/arm/raspi4b: Introduce abstract raspi4-base machine type Date: Sat, 1 Feb 2025 10:15:23 +0100 Message-ID: <20250201091528.1177-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250201091528.1177-1-philmd@linaro.org> References: <20250201091528.1177-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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 In preparation of adding more machines based on the raspi4, introduce TYPE_RASPI4_MACHINE. Remove TYPE_RASPI4B_MACHINE definitions, declaring the machine name in place via the MACHINE_TYPE_NAME("raspi4b") macro. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/raspi4b.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/arm/raspi4b.c b/hw/arm/raspi4b.c index 5c78d26f957..548059f6d69 100644 --- a/hw/arm/raspi4b.c +++ b/hw/arm/raspi4b.c @@ -23,8 +23,8 @@ #include "hw/arm/bcm2838.h" #include -#define TYPE_RASPI4B_MACHINE MACHINE_TYPE_NAME("raspi4b") -OBJECT_DECLARE_SIMPLE_TYPE(Raspi4bMachineState, RASPI4B_MACHINE) +#define TYPE_RASPI4_MACHINE MACHINE_TYPE_NAME("raspi4-base") +OBJECT_DECLARE_SIMPLE_TYPE(Raspi4bMachineState, RASPI4_MACHINE) struct Raspi4bMachineState { RaspiBaseMachineState parent_obj; @@ -93,7 +93,7 @@ static void raspi4_modify_dtb(const struct arm_boot_info *info, void *fdt) static void raspi4b_machine_init(MachineState *machine) { - Raspi4bMachineState *s = RASPI4B_MACHINE(machine); + Raspi4bMachineState *s = RASPI4_MACHINE(machine); RaspiBaseMachineState *s_base = RASPI_BASE_MACHINE(machine); RaspiBaseMachineClass *mc = RASPI_BASE_MACHINE_GET_CLASS(machine); BCM2838State *soc = &s->soc; @@ -123,11 +123,15 @@ static void raspi4b_machine_class_init(ObjectClass *oc, void *data) static const TypeInfo raspi4_machine_types[] = { { - .name = TYPE_RASPI4B_MACHINE, + .name = MACHINE_TYPE_NAME("raspi4b"), + .parent = TYPE_RASPI4_MACHINE, + .class_init = raspi4b_machine_class_init, + }, { + .name = TYPE_RASPI4_MACHINE, .parent = TYPE_RASPI_BASE_MACHINE, .instance_size = sizeof(Raspi4bMachineState), - .class_init = raspi4b_machine_class_init, - }, + .abstract = true, + } }; DEFINE_TYPES(raspi4_machine_types)