From patchwork Wed Jun 14 01:19:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 692564 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp701917wru; Tue, 13 Jun 2023 18:22:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7kPwYRyNerSspuRKYVRP81vGcK6hkuFAOSDfZWBotEs4VdUoZFrs6kfIKGrDgYkJq3vuRh X-Received: by 2002:a05:6214:e83:b0:62d:fc19:b1c3 with SMTP id hf3-20020a0562140e8300b0062dfc19b1c3mr3089918qvb.50.1686705750374; Tue, 13 Jun 2023 18:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686705750; cv=none; d=google.com; s=arc-20160816; b=zFpV4SFnBzIKoJebWzmZFgAwK5Hwtqy7G1ZUUIojIf8nNeyUqwTHFJqsnNz5UQF4qh kkiVGrJoOIuNZR4C2w0JI2R/mEr6AbpIxmYe9b/mV+WUm2R0Sy+v+VIhcV8edXod/poO 2SJaJ8H4+T4FzSmnBZXh+T9T8muIbvO1EqtW71gsKeBAd1aq+uLSnuT14Xg6fYUWR7gu 9YjWC2MNA3qNcQkzaIfVunsrLQWKo8S5ugwnINVfbZxH/WFKrZ1LxQ+Z11wD25sC5cM8 3XlRnAr0nQYDWy4hdGqUtVpcKhV7lefouvJ3DKsQymoRgMNvC9qV9MrIecQL6q1z+jXY cwaA== 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=cLwr+LJIpNpThygdPeDchVbcP/+PrMQXZxiXlfAtnPU=; b=pM3g71xzAGI0WvYbVpjaio7M1o4/NsNxMWoxzqyLerVkpDiY7Z0+AO7vX9FrNhDqff N67I7hOqLJm6MyzqZ9GGr8/uxtf0Q/RrIVq//nOl0VJtNxniQZv+895M7T+/eWrNEIdc x84KjYwKJumHkVdj2IFyUIHdxruqBjfEYact9TCzM5Z3lANJA+H9MI1plykV1bRnoO8F PmgYrVLh0OqAJXk7TBIm2F0Cm7Ey7PmtBRclcG+RGN/bADSPmKwgasvUt3NUovcdUCJt 1YpEzgADo3tWNDw8w8CfqijxxL5Qmy3c4MtaVoXYkTgzpEEKR8iYP3vmdYg122W+qjX4 iLsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=LJwFNwIa; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5-20020a0562140cc500b00626009daf30si8649115qvx.537.2023.06.13.18.22.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Jun 2023 18:22:30 -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=@gmail.com header.s=20221208 header.b=LJwFNwIa; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9FDJ-00081A-UA; Tue, 13 Jun 2023 21:22:21 -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 1q9FDI-0007vG-U3 for qemu-devel@nongnu.org; Tue, 13 Jun 2023 21:22:20 -0400 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q9FDH-0004kF-5U for qemu-devel@nongnu.org; Tue, 13 Jun 2023 21:22:20 -0400 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-75d4dd6f012so152621085a.2 for ; Tue, 13 Jun 2023 18:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686705738; x=1689297738; 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=cLwr+LJIpNpThygdPeDchVbcP/+PrMQXZxiXlfAtnPU=; b=LJwFNwIaGha7Wz/Ovjg0nmjIc2jtDAZmrblC0hWKGFUHGMjkmCH1F8+z/MVbjrh2LD /AQbUjwd+Be+VvSqJLWWPmo58PfUWeRsb0XN+pTtomxiSUR0B5H4EqaM7r1xmrYU9eXC 2cJap0xsAqXgDxk+WRSyOGKuBnRXjzHu/9gS1vquFTM4Nkbi5S9gSLIALUtCXIRoaF4C uAqK9rf6iRPZpeEyvvNyufpWPR7QBzQaZdjjHrPicctkzT3Noakr9OZiCeuEnHXY56ev H4n0V5uduLDNruId8BNOgBDIKMTW2Uwizva1HNmjN/6pPPIT0lPb4IfA3CuWl20SIJbG ZNMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686705738; x=1689297738; 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=cLwr+LJIpNpThygdPeDchVbcP/+PrMQXZxiXlfAtnPU=; b=bHkjGXQe2Cu5CCjX5Hm1QowM3EOiRjyBV38Ci1PypBoNkX+bvCwvs1LKtfHz11Tgbq ekala1ws1f8YBy6IfcnwimAxPRSP4RH2bLI4CznsmD6RwkOYtMxwP7GwWNfWEdJf++lp JajfX06btxb1BJ6YESfe9+MPExGIH8WkRKm5tSbFJVbohAgGqxnMhDdHG4mSm22cSIcV fE1xXMi0gEBRj+0Wq7XNXh1sroyMXwCyjwy7N8/ilE3gj23VVF9zcLIIESPHUEL96OD/ TPEj6lhj3GKIwXCiawy4qjAM4M0+xLDESoJs3jV+cTdqrfF/zmIAjjwNyHEFEioiapL2 blwA== X-Gm-Message-State: AC+VfDxtnf2pTGGoEJ0NvNXVH/xwu4PJtjHYICFNQ7zEAY82WpcNF+Fh d4Tu4lotP59AHZCRqy1PC/SmSlrx6xEJCg== X-Received: by 2002:a05:620a:63c9:b0:75e:c32a:5758 with SMTP id pw9-20020a05620a63c900b0075ec32a5758mr14569076qkn.51.1686705737839; Tue, 13 Jun 2023 18:22:17 -0700 (PDT) Received: from toolbox.wdc.com (2403-580b-97e8-0-321-6fb2-58f1-a1b1.ip6.aussiebb.net. [2403:580b:97e8:0:321:6fb2:58f1:a1b1]) by smtp.gmail.com with ESMTPSA id u1-20020aa78381000000b0064f7c56d8b7sm9112238pfm.219.2023.06.13.18.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 18:22:17 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alistair Francis , Daniel Henrique Barboza Subject: [PULL 26/60] hw/riscv/opentitan: Rename machine_[class]_init() functions Date: Wed, 14 Jun 2023 11:19:43 +1000 Message-Id: <20230614012017.3100663-27-alistair.francis@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230614012017.3100663-1-alistair.francis@wdc.com> References: <20230614012017.3100663-1-alistair.francis@wdc.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::736; envelope-from=alistair23@gmail.com; helo=mail-qk1-x736.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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 From: Philippe Mathieu-Daudé Follow QOM style which declares FOO_init() as instance initializer and FOO_class_init() as class initializer: rename the OpenTitan machine class/instance init() accordingly. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza Message-Id: <20230520054510.68822-2-philmd@linaro.org> Signed-off-by: Alistair Francis --- hw/riscv/opentitan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c index bc678766e7..2d21ee39c5 100644 --- a/hw/riscv/opentitan.c +++ b/hw/riscv/opentitan.c @@ -75,7 +75,7 @@ static const MemMapEntry ibex_memmap[] = { [IBEX_DEV_FLASH_VIRTUAL] = { 0x80000000, 0x80000 }, }; -static void opentitan_board_init(MachineState *machine) +static void opentitan_machine_init(MachineState *machine) { MachineClass *mc = MACHINE_GET_CLASS(machine); const MemMapEntry *memmap = ibex_memmap; @@ -108,17 +108,17 @@ static void opentitan_board_init(MachineState *machine) } } -static void opentitan_machine_init(MachineClass *mc) +static void opentitan_machine_class_init(MachineClass *mc) { mc->desc = "RISC-V Board compatible with OpenTitan"; - mc->init = opentitan_board_init; + mc->init = opentitan_machine_init; mc->max_cpus = 1; mc->default_cpu_type = TYPE_RISCV_CPU_IBEX; mc->default_ram_id = "riscv.lowrisc.ibex.ram"; mc->default_ram_size = ibex_memmap[IBEX_DEV_RAM].size; } -DEFINE_MACHINE("opentitan", opentitan_machine_init) +DEFINE_MACHINE("opentitan", opentitan_machine_class_init) static void lowrisc_ibex_soc_init(Object *obj) {