From patchwork Mon Dec 3 20:57:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 10710585 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 4E04A1731 for ; Mon, 3 Dec 2018 20:57:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CB3A2B270 for ; Mon, 3 Dec 2018 20:57:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 314BA2B380; Mon, 3 Dec 2018 20:57:54 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C5BF32B270 for ; Mon, 3 Dec 2018 20:57:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lcMe/7jPvUnAbTwgnxPexPoIZ0KPmPFmnIGxJvEzsDc=; b=WPQo8arALmi/g2+t7QTgzE1K6t ufWQItpiUq7R9Np/pEniFd/aapYDsSOcDjQmY2W7dPc5TFaDE4QStbEd9kIhw0Naa0zqt2NlSsnvQ qXRSE1ubkxnyKWaYQPSFDYhzpr97PYZEHzot23AMt48dHE6CPIhNKze5AuF7gqxqDT8kyn8C+8c2g U2WRk7bmK5mlbtJNUa0dMMZn1+H2XFQU9WAI3Do5wIRCgC4TrZw5fCQi+ZG7V1VAytkbcnFXd6FAP 35ho5HLiAoQmZC+taK4vU2OisVxzMyrtnQZdnD0E/Sbi8ZLdYe9tX8WyWMYX6GeQiwIk6BNqGsfj4 mTaiLwTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTvHs-0002l1-JM; Mon, 03 Dec 2018 20:57:52 +0000 Received: from esa4.hgst.iphmx.com ([216.71.154.42]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTvHp-0002jY-V4 for linux-riscv@lists.infradead.org; Mon, 03 Dec 2018 20:57:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1543870670; x=1575406670; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=3mJpoam2A2xj4ZksT23VyuZFVe6fICI7QinZh5RdjX0=; b=oI5456zpQWAOhqegeELDab0elOm+DAX78PQK6uD7yTpshFfihxLHWU8H ImzynD/9VmOsSD6GR9NEmwNTC0cadnFjuKoyLHudkQmFu0g8AHFFOoIkJ fTjs8pIEDt/E46hJH8VMrULgMmN0r/0DvIwMHMHQhUSy1T4V9Wl7/U9Vd X/q2P5xOZr5gRMkB79cm8qMBnUxBPTzVJAjOiPLrZV2vcMh2wl/DmTZar YdyxPgyC5kIisCF7N/y4KIHDEPXtsnxuJ0Bxt8EaVBRxmozrcyD4rjNO5 UmImeiSy7G/dUBvMdrIML4NpmU9RfCnoWrQTuhnT2V/WDeO5N01Va2GX/ Q==; X-IronPort-AV: E=Sophos;i="5.56,311,1539619200"; d="scan'208";a="95690457" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 04 Dec 2018 04:57:39 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 03 Dec 2018 12:39:55 -0800 Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip02.wdc.com with ESMTP; 03 Dec 2018 12:57:39 -0800 From: Atish Patra To: linux-kernel@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: Correct RISC-V's timebase-frequency Date: Mon, 3 Dec 2018 12:57:28 -0800 Message-Id: <1543870651-16669-2-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543870651-16669-1-git-send-email-atish.patra@wdc.com> References: <1543870651-16669-1-git-send-email-atish.patra@wdc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181203_125750_088872_E0BF48D4 X-CRM114-Status: GOOD ( 12.14 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Damien Le Moal , Palmer Dabbelt , Dmitriy Cherkasov , Anup Patel , Daniel Lezcano , Rob Herring , Atish Patra , Albert Ou , Thomas Gleixner , linux-riscv@lists.infradead.org, Christoph Hellwig MIME-Version: 1.0 Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Palmer Dabbelt Someone must have read the device tree specification incorrectly, because we were putting timebase-frequency in the wrong place. This corrects the issue, moving it from / { cpus { timebase-frequency = X; } } to / { cpus { cpu@0 { timebase-frequency = X; } } } This is great, because the timer's frequency should really be a per-cpu quantity on RISC-V systems since there's a timer per CPU. This should lead to some cleanups in our timer driver. Signed-off-by: Palmer Dabbelt Signed-off-by: Christoph Hellwig Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/riscv/cpus.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/riscv/cpus.txt b/Documentation/devicetree/bindings/riscv/cpus.txt index adf7b7af..b0b038d6 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.txt +++ b/Documentation/devicetree/bindings/riscv/cpus.txt @@ -93,9 +93,9 @@ Linux is allowed to run on. cpus { #address-cells = <1>; #size-cells = <0>; - timebase-frequency = <1000000>; cpu@0 { clock-frequency = <1600000000>; + timebase-frequency = <1000000>; compatible = "sifive,rocket0", "riscv"; device_type = "cpu"; i-cache-block-size = <64>; @@ -113,6 +113,7 @@ Linux is allowed to run on. }; cpu@1 { clock-frequency = <1600000000>; + timebase-frequency = <1000000>; compatible = "sifive,rocket0", "riscv"; d-cache-block-size = <64>; d-cache-sets = <64>; @@ -145,6 +146,7 @@ Example: Spike ISA Simulator with 1 Hart This device tree matches the Spike ISA golden model as run with `spike -p1`. cpus { + timebase-frequency = <1000000>; cpu@0 { device_type = "cpu"; reg = <0x00000000>;