From patchwork Sat May 20 05:45: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: 684290 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp232266wrt; Fri, 19 May 2023 22:46:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7mzgnjkjVuupa8DXfjcsEM32B/lC5F7JOTj9i4RPK8uRIcQsr5WO/qEzyrpDyOilRONoZQ X-Received: by 2002:a05:622a:1cd:b0:3f5:3b0d:b41e with SMTP id t13-20020a05622a01cd00b003f53b0db41emr7641633qtw.16.1684561592786; Fri, 19 May 2023 22:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684561592; cv=none; d=google.com; s=arc-20160816; b=dzljWN2ms6JWrtF+S9orkygRvIvHdWRlbTfJw8JVAncPnqjYUoJQq6RLUuHECRVor6 cvtacXY28FHegLAqNzJCPgwS8yTKs4l+JQJw5l3awZ8mkesCTgAvlPD/XoWOpWeKKkzE UFZ1Jvcuc/k2T7mcEDJMOMCYlWdoyq1LJJD52GqKGIvXa84fMGNNrXXvsJvoPiXAtSmC uhjt3hRWam+qqHbhnfirX2oCuD2dunoSwJpOGTq8L2IVMPEyXNjRxQgDdElOWVWksxoq qtt3tibbACYpuQdlUevIbvNtTeXo0MRSZUPPpio2/tIsn50vERF4kAnlMtbY2IRGOFw0 GKLQ== 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=x9CmwAgDvj3Ddgy+Sh+yZXxS5mPQZ+cjq5z84zBdlHE=; b=r2DePGrqH8DkjUadiwbTShk56+NZ32bwSojUXPxG+jF+HtCdqS8tk88QsCat8opcu8 WXJmvnyCh/BndtMkRPoqyMFZI/h7Qdyx8PkT+eqq0PnvGnl7MLdnHR6HPOsJwG9HbBBZ zSED6YZNOZl/yYXztukdNhcar/hFpUsYLusbsYxLv3siT3W9iPXQtolz+2LYPwUMjWDm zG2B/PwBudXWmb8yeM7OrZ07qqZEXDNY8Y5db3CGurZOHLVBXDlqgPMaTGeVY40ve7N4 6bZ9ylGtKdgqH+0+BU2ygvj1TDj7Xl5Sc/qnP8v1subdCcp0yHFGgKVrFmpQxBZ36Umw CHhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Hw6L/nZY"; 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 x25-20020a05620a14b900b007590571f3c5si420164qkj.663.2023.05.19.22.46.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 May 2023 22:46:32 -0700 (PDT) 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="Hw6L/nZY"; 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 1q0FPR-0007NV-Qa; Sat, 20 May 2023 01:45:41 -0400 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 1q0FPH-0007GC-Ua for qemu-devel@nongnu.org; Sat, 20 May 2023 01:45:32 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0FPG-0007c1-Cq for qemu-devel@nongnu.org; Sat, 20 May 2023 01:45:31 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f423521b10so26269575e9.0 for ; Fri, 19 May 2023 22:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684561529; x=1687153529; 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=x9CmwAgDvj3Ddgy+Sh+yZXxS5mPQZ+cjq5z84zBdlHE=; b=Hw6L/nZYiuaevh/ccfzTW0UM+ugEhuzW7l/8EVTF2v/L0rh+hpP6WUx8O6ExRzY6IM yy/HUuoJyf6J9FvbgwT2Il9iw6JkOz2NSe2ExEWZ8qMfUZN9WOF6ZrSOZRg3572v6Ocw T2z+MPrBd7uB8eRI04DymxOMiagvresxopXyVjDebib5JxZ17fEP82/e4dosyRXjh+IX whK3cjQ8x4vXMvLcncTxaBN1/7yUfBkOulYJajfltfl/IOLuVcht91E5wGeqTjp+BpHT oJ8GdLbi4vq8+AnL0J0tXGJSF21z3sfiyvKinCEAZhgiAfTAy/bqur46vH3RMsRJ5ORH vlbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684561529; x=1687153529; 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=x9CmwAgDvj3Ddgy+Sh+yZXxS5mPQZ+cjq5z84zBdlHE=; b=OExJe7mIDzDlajxUjq1AA3BOHlr32hD3vN3PBN943sRAi8Onwj9StNyvu2vzeEq6ec ub/xzXx4Ytu4omJ18MRIJC0xfYAzu759qQY2jrjZ9KoZzAI/rlWEMJFmpXKpXvRZhQQJ oPVpaYg8jdKWfrMKbw+l3p5rPwnFfKRxhTxYF7Tk7HX140mrF6dUYN9wYzGpqAxyyOts P3SSXPP5gZJAMg7bEe8RWmHWPTKMYeiO3A8dOJaH/bL/qmR+t3wMGLyzn45qXzZoNF/q a/wSr37YvmO8JEtT0X8Q+QVJx9oQEfs2B6/zApkiUlKkLMrhdb+tOLL7Nnf5ZpYrG7ZN rq8w== X-Gm-Message-State: AC+VfDyrPfTRw/ahI0r7JEhgR3pZPLT9GefoD4RgGE9eQnJg1KyXh9NJ oN4Jxcg2tNKUHZ5KVxsiB+fNmsi+LbmdNs+EvAA= X-Received: by 2002:a7b:ca45:0:b0:3f5:d70:440f with SMTP id m5-20020a7bca45000000b003f50d70440fmr2929027wml.19.1684561529545; Fri, 19 May 2023 22:45:29 -0700 (PDT) Received: from localhost.localdomain (mau49-h01-176-184-41-228.dsl.sta.abo.bbox.fr. [176.184.41.228]) by smtp.gmail.com with ESMTPSA id q10-20020a1cf30a000000b003f423508c6bsm1086791wmq.44.2023.05.19.22.45.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 19 May 2023 22:45:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Liu Zhiwei , Palmer Dabbelt , Weiwei Li , Bin Meng , Alistair Francis , qemu-riscv@nongnu.org, Daniel Henrique Barboza , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 3/5] hw/riscv/opentitan: Add TYPE_OPENTITAN_MACHINE definition Date: Sat, 20 May 2023 07:45:08 +0200 Message-Id: <20230520054510.68822-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230520054510.68822-1-philmd@linaro.org> References: <20230520054510.68822-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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 QOM type names are usually defined as TYPE_FOO. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- include/hw/riscv/opentitan.h | 2 ++ hw/riscv/opentitan.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/riscv/opentitan.h b/include/hw/riscv/opentitan.h index c40b05052a..fd70226ed8 100644 --- a/include/hw/riscv/opentitan.h +++ b/include/hw/riscv/opentitan.h @@ -53,6 +53,8 @@ struct LowRISCIbexSoCState { MemoryRegion flash_alias; }; +#define TYPE_OPENTITAN_MACHINE "opentitan" + typedef struct OpenTitanState { /*< private >*/ SysBusDevice parent_obj; diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c index 294955eeea..7d7159ea30 100644 --- a/hw/riscv/opentitan.c +++ b/hw/riscv/opentitan.c @@ -118,7 +118,7 @@ static void opentitan_machine_class_init(MachineClass *mc) mc->default_ram_size = ibex_memmap[IBEX_DEV_RAM].size; } -DEFINE_MACHINE("opentitan", opentitan_machine_class_init) +DEFINE_MACHINE(TYPE_OPENTITAN_MACHINE, opentitan_machine_class_init) static void lowrisc_ibex_soc_init(Object *obj) {