From patchwork Wed Dec 26 17:19:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 10743257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 10715746 for ; Wed, 26 Dec 2018 17:32:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAA2A28558 for ; Wed, 26 Dec 2018 17:32:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC491286C0; Wed, 26 Dec 2018 17:32:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7972A28558 for ; Wed, 26 Dec 2018 17:32:43 +0000 (UTC) Received: from localhost ([127.0.0.1]:47530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcD2w-0002X7-BR for patchwork-qemu-devel@patchwork.kernel.org; Wed, 26 Dec 2018 12:32:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcCrT-0004Oh-8o for qemu-devel@nongnu.org; Wed, 26 Dec 2018 12:20:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcCrL-0007sy-FJ for qemu-devel@nongnu.org; Wed, 26 Dec 2018 12:20:47 -0500 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]:37105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcCrF-0007k8-Rk for qemu-devel@nongnu.org; Wed, 26 Dec 2018 12:20:39 -0500 Received: by mail-qt1-x844.google.com with SMTP id t33so17840928qtt.4 for ; Wed, 26 Dec 2018 09:20:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:in-reply-to:references:cc:from:to; bh=s8TQWdfmNT9BwGooMFuCxfyNF1ywYtDH9Swp6HiUmKk=; b=DFBjFo5Xlho89FS3sp9ihcTS2r/gSrYbxIFKttkSnXgdoOYtrBsEu4V1KEUniD9moA aUa6kAmQSdfk48nwqHqlrdxH3qnhHw8zrmNCT/7MY9+qzO2KvAd+JMtv5ppSZRV0989O tw3ZIRwEeh9iwUwrCdrUbhkmzYEdi0vmw59dGt8ZdmgHgDL+Np6awBB6DzNe9/0PTaes w/WBlSUZGkfH5WYc13xyPhOcyH7jXdrjQV9/Ql+WJ1VCjVWuXmiQP/S3RhC4xnCHPkOv YTNFUahrjmdgqhio/Ji223lY0PUlXRq1J2ELsWNLNoHF8OzCapXk1WQ65HFFLh1pnxD7 MQkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=s8TQWdfmNT9BwGooMFuCxfyNF1ywYtDH9Swp6HiUmKk=; b=cr2udQrPSE+54UivKUGUr75fNC5disU4pKmBX5ltTsNXYk0lpVKh1XyqNS17XZ/9ko SJbeT8V7vPI2UsGN3c+uviOXtEY2S8VeTShyM03NHfuguyAvzIveS/gP+t3Sur92Cy3n hP8nI7nPFNP9xXqZwBPvZe8GSqaD9p1JObB9vJbrxEzn/y4VqyR6JEFMBFO+4zZ9mE8J k1hwutLWoXvsUbPq/V1bfOQU//h9eF7P0VWpFpzrv63BFyunpucx3cKKOQj7w4b/58Ai 1e28ChGClbLfI7YwPPUlF/4cwXy4JuvHQyKDLN9eCz9eylws+lQQOnkawztrQ/h8zhA5 ZUFw== X-Gm-Message-State: AJcUukfy+KB+IfAL0m02EwmRAoflNl/S2LI0JI/QpNC0yPCKIbgvBF2y nN1ozXtPo0OCzUXt16Hru163E2Jqr7g= X-Google-Smtp-Source: ALg8bN7xKNN6tketP1Qu1TFxG+vJEods9uBT1qec+bQrlfYPMXlrNjxa/KofWgJLYew2EqtJcsc37Q== X-Received: by 2002:a0c:9626:: with SMTP id 35mr19230099qvx.207.1545844824480; Wed, 26 Dec 2018 09:20:24 -0800 (PST) Received: from localhost ([2601:182:c980:96c:8dd:4488:90b1:59d1]) by smtp.gmail.com with ESMTPSA id p47sm17472931qta.36.2018.12.26.09.20.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Dec 2018 09:20:23 -0800 (PST) Date: Wed, 26 Dec 2018 09:19:57 -0800 Message-Id: <20181226172005.26990-7-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181226172005.26990-1-palmer@sifive.com> References: <20181226172005.26990-1-palmer@sifive.com> From: Palmer Dabbelt To: Peter Maydell X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::844 Subject: [Qemu-devel] [PULL 06/14] sifive_u: Set 'clock-frequency' DT property for SiFive UART X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Palmer Dabbelt , qemu-riscv@nongnu.org, Anup Patel , Anup Patel , qemu-devel@nongnu.org, Alistair Francis Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Anup Patel The 'clock-frequency' DT property is required by U-Boot to compute the divider value. This patch sets the 'clock-frequency' DT property of the SiFive UART device tree node (similar to virt machine). Signed-off-by: Anup Patel Signed-off-by: Anup Patel Signed-off-by: Alistair Francis Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_u.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 5c41ee5017e4..849fa2e6311a 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -241,6 +241,8 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, qemu_fdt_setprop_cells(fdt, nodename, "reg", 0x0, memmap[SIFIVE_U_UART0].base, 0x0, memmap[SIFIVE_U_UART0].size); + qemu_fdt_setprop_cell(fdt, nodename, "clock-frequency", + SIFIVE_U_CLOCK_FREQ / 2); qemu_fdt_setprop_cells(fdt, nodename, "interrupt-parent", plic_phandle); qemu_fdt_setprop_cells(fdt, nodename, "interrupts", 1);