From nobody Tue Feb 10 20:48:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.68 as permitted sender) client-ip=209.85.221.68; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f68.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602943493; cv=none; d=zohomail.com; s=zohoarc; b=aZ3GDoZSKPgMvgGPdFhFhfx7RoLc6I+FzBv0a9kwtJZAe6nj5UBxuxYbvnkkqWNvQQRn+hDMGYCX1SIlcDQwQ0pASOjVO/Rtb+Yui5H9dy32j9OIOGfgydArvm/qxgmaiIwnvZykM3opqQYm+SFRe+LaAGITs/bFKmOj+8dp5Rs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602943493; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pk7ivm07JttABN6WhHIewfEZwDkoRMEO3KDnJXLnE38=; b=aIUdPdkg2VSmpwcrAg7rmMHQuCAZtQFMo/vYep/KmJoF/COJhA369phLXVoS5R9r9GvO0nbZJiEifhIYYtwmBBLlfzCzbrm1c6nvJ1fGKHI/8gM1O9ZAwrkLKvTBFiGAHsq5hUVGbdQlIPWHejHX9/BId905+3RUbzhMxalVH8w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.68 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.zohomail.com with SMTPS id 1602943493659853.0016324742795; Sat, 17 Oct 2020 07:04:53 -0700 (PDT) Received: by mail-wr1-f68.google.com with SMTP id y12so6585737wrp.6 for ; Sat, 17 Oct 2020 07:04:53 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (117.red-83-52-172.dynamicip.rima-tde.net. [83.52.172.117]) by smtp.gmail.com with ESMTPSA id m11sm7619662wmf.10.2020.10.17.07.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 07:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pk7ivm07JttABN6WhHIewfEZwDkoRMEO3KDnJXLnE38=; b=q2XkE/zhdvB/kGUH2WLI7AY5nHqrlS8rSDTHpRMu3OS5mnfu7OiIS6yvMD2mzv/cC8 p6mk5cdWNUq5yL0BOI0sZZdzzvDhwEmPyBBnkuMoFmWbWRuGGwXUP8GFxE9rkLmxGr0m newEAn06KGnXDbh8fE3wN21dBpHz3ky7yzL1i1NIlfQisXIs/yjVypw2l6yyPEGompRn HFqwR4PyY+8KOTcL7Fh68GHvWyNXuNyHOPDdL+HxycgUP/ACibbLcDP6B0WIMBJfENgF o05HaJ8Wi4sQ1Zi9jfr6QCRKo2+avhMmKmgbDxVXdQFVCCDQUQTwxNhYSeXKRuylZkhu 2I0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pk7ivm07JttABN6WhHIewfEZwDkoRMEO3KDnJXLnE38=; b=M5V1eARKm41mEf30qsgk2Epf6flSyPoKKWWTgry8qL3SIfJ0So6iengTezDsjAosEI tVB1WnpaabPgC85+GBNMnXfRmulMscMbfK/XtwynWdYTeXiNNbAQWlKtGPC1D7A5K0n1 aT1uO1VgiZfBLm0XPDrZbR6z8Aqw61Q4e+2d/v85R77NCOjb1YkxlDy2ayI81VG1oweH tNfn/eDJaw1gVpdsgTUfZL5Tvl11JMH7cFLpQJaHVX6yDnSsat/Rd0FZ2mLxsRZQEzsN VffkR5IpVy7+1QpvAkdmL6uK6oX9K0p0XmqxlbdWC4iIULgyBSuvM2PsL2+utQTRm1hL 0OWw== X-Gm-Message-State: AOAM530tD5CM0r5ltHA/Iy2uo6UjuB/TfvS//C/XKKZj5v4Mw8sIE352 WUeBuMEipLXFwAH4IYI+Ghs= X-Google-Smtp-Source: ABdhPJxUx1B0eOR4U1/f2dhFaqbJZKKN5dPzToUzHYMYR4CNS8o62qXs2hWqy3zXjm7aJIwFZ+utHg== X-Received: by 2002:adf:e8cf:: with SMTP id k15mr10260053wrn.262.1602943491792; Sat, 17 Oct 2020 07:04:51 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Huacai Chen , Paul Burton , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 27/44] hw/mips/boston: Set CPU frequency to 1 GHz Date: Sat, 17 Oct 2020 16:02:26 +0200 Message-Id: <20201017140243.1078718-28-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201017140243.1078718-1-f4bug@amsat.org> References: <20201017140243.1078718-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) The I6400 can run at 1 GHz or more. Create a 'cpuclk' output clock and connect it to the CPU input clock. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201012095804.3335117-19-f4bug@amsat.org> --- hw/mips/boston.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 1b3f69e949c..cf2296f4488 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -30,6 +30,7 @@ #include "hw/mips/cps.h" #include "hw/mips/cpudevs.h" #include "hw/pci-host/xilinx-pcie.h" +#include "hw/qdev-clock.h" #include "hw/qdev-properties.h" #include "qapi/error.h" #include "qemu/error-report.h" @@ -54,6 +55,7 @@ struct BostonState { MachineState *mach; MIPSCPSState cps; SerialMM *uart; + Clock *cpuclk; =20 CharBackend lcd_display; char lcd_content[8]; @@ -251,10 +253,19 @@ static const MemoryRegionOps boston_platreg_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, }; =20 +static void mips_boston_instance_init(Object *obj) +{ + BostonState *s =3D BOSTON(obj); + + s->cpuclk =3D qdev_init_clock_out(DEVICE(obj), "cpu-refclk"); + clock_set_hz(s->cpuclk, 1000000000); /* 1 GHz */ +} + static const TypeInfo boston_device =3D { .name =3D TYPE_MIPS_BOSTON, .parent =3D TYPE_SYS_BUS_DEVICE, .instance_size =3D sizeof(BostonState), + .instance_init =3D mips_boston_instance_init, }; =20 static void boston_register_types(void) @@ -462,6 +473,8 @@ static void boston_mach_init(MachineState *machine) &error_fatal); object_property_set_int(OBJECT(&s->cps), "num-vp", machine->smp.cpus, &error_fatal); + qdev_connect_clock_in(DEVICE(&s->cps), "clk-in", + qdev_get_clock_out(dev, "cpu-refclk")); sysbus_realize(SYS_BUS_DEVICE(&s->cps), &error_fatal); =20 sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1); --=20 2.26.2