From patchwork Fri Dec 21 16:02:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 1017618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="HmnWOGrh"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Lv1F7338z9sLt for ; Sat, 22 Dec 2018 03:17:53 +1100 (AEDT) Received: from localhost ([::1]:46498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaNUl-0005l7-HG for incoming@patchwork.ozlabs.org; Fri, 21 Dec 2018 11:17:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaNHO-0001fT-Si for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaNHN-0004Ew-J8 for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:02 -0500 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]:41917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gaNHN-00046f-6M for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:01 -0500 Received: by mail-qt1-x842.google.com with SMTP id l12so6163727qtf.8 for ; Fri, 21 Dec 2018 08:03:44 -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=HmnWOGrhMrl296xxyVHR+r175c/qLnVAdcPreioVdik2VoHJIT4bgodSzT5AQc+dIn FHr20ZFfc6xY1NM5pCHlVDfwGw5Lc9+tlC3jUV6GOa6mNtUZsQJYRKa54EMOFzo4po5R WyLcmqT4eeC7ycC0FkSeQmypiwJrjAC9NpSgCqf5Tt+ME9xSReBbJd0DTN+9XGNF9sl5 TgRoqJsodZYkZKFn1CjmEgxQO7su2gatE9W2Q9+uK1iilvkkYoapajhtVUwRqMO8sbXa CpHF4XixvbwkJyHwh1o21gI+J1Ou2SkcAmk4Fhpa3cSR4TCcPjSq0gqHoca78/jy6fDA bM+A== 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=ZC1kNLy3wkPfGuFnRXR0tZblCnlIBVY+1IJCQ31p6A4Rq5s84TJC0VpkYvCxyDJDQB 7oXqwbZ8mRPmtAQPWWGUHEFvGoyg7QJ2fh92yFGnW7fMxyj7RhXYT62OqiALio0UqbXh XRFZxWLlGo/RycNZBv6/ruiPv5za/GLo8BSVf8vzIIq87pU6ycBE/WXFWawgmfA2xGyE t6UKUwIQudEBLNNoJmznCDOl2sPdBJdWG0iV43blFBXxDLQuO9tGYUKIdmLCIyZ9ladt bgXsPBhmtAegFojHyYbtbmSRCFx4Mx6ePRx16AzBN/+hZXZnzxHR5n2wnJX6p7w73YsT ZIYA== X-Gm-Message-State: AJcUukctxxK/lAaAP3JtcblBblQLd8GCQ6yz089Itr2w0lQZqtFBSUeF V+BxhwFqXpTLdLAHfOPIUuYGVfu7/Zs= X-Google-Smtp-Source: ALg8bN6y1K1+8ngKd5jTVguehXr0Jqg/CjM30bnW8hLqwiIsKopWNTOgbH0Prpbah4/2+hRGWeUYTA== X-Received: by 2002:a0c:f8cb:: with SMTP id h11mr3041515qvo.134.1545408223949; Fri, 21 Dec 2018 08:03:43 -0800 (PST) Received: from localhost ([2601:182:c980:96c:8dd:4488:90b1:59d1]) by smtp.gmail.com with ESMTPSA id o21sm6057974qto.18.2018.12.21.08.03.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 08:03:43 -0800 (PST) Date: Fri, 21 Dec 2018 08:02:59 -0800 Message-Id: <20181221160307.14819-7-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181221160307.14819-1-palmer@sifive.com> References: <20181221160307.14819-1-palmer@sifive.com> From: Palmer Dabbelt To: qemu-riscv@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::842 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: Anup Patel , Anup Patel , Alistair Francis , qemu-devel@nongnu.org, Palmer Dabbelt Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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);