Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10029193ybi; Wed, 24 Jul 2019 14:30:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqySCpKtGPLRXN1RhWxsp0nP/uZoXK9MqbM5qxIIwofCPXaly2Wbfps/bW1wUoKLd2fEGzYu X-Received: by 2002:a17:902:2aab:: with SMTP id j40mr36645259plb.76.1564003841284; Wed, 24 Jul 2019 14:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564003841; cv=none; d=google.com; s=arc-20160816; b=ysvZKsZWW07hIzujPJW4run2JlneroFaXAiWC2NaMeG6Vdb3GstmrSuz26OUkzshpu Vds2S9+LpxPHogCg7PTK4zIxE/M80RGGbWztY1ROFSVohkMxoG5+igIpbn2DRTXD9IbG fgsWtvszPTwJ2aD9P2alTBTnTFsalDRlziATj/aMFG1rIyNT8vbCvXoaFX+bjrkr4XkX /tMrMaQJbUcxcU9fhYDNqQ0wYlilHvkIoXmt6fS9PPMT4vANQsP4rmr0n4Ac3AMteL/W eB9ZIIoXSvaFIFuGvLJVNJ0skRhg9/e/O53/Q1EgOLWWHGjX5Yg+PHJn8UNgxaU5wlgM RQfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uzIRBKbB7UU2QNs9lNEqqrq3se/+CB7MiPHQYfklzC8=; b=yBy0CrhY4tZm03BM+ko+lfscpzc4vvtVWFPzQL8FLJ0zctefc7YR7MaVx9madUN9fF RRhbIHNYs0393eGWna6R9rViyHLVZmFtuw6XsXdF64nyw+uegthudx0fQRfQpHiICGI3 XHtxCZbEObd9O+f/bQsQJBhfnG8fQUogD0+DPWfxnCSJaFnw8arRuIf+zSYR+Zbqow/E dpExzUcRqwxN9LU0PDklQT9arRkQqst9+fqY1VkPir2RiJP/AYBKKjRjK7nwNo/iqYaK DUfOZTAJ+n22mD8iB/ZMBE22OW5W449aJ/zpip0uYjKurNBHCiO72v+t80fO0rktZlAm 9JFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=vBfFUiqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si13156378plr.187.2019.07.24.14.30.26; Wed, 24 Jul 2019 14:30:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=vBfFUiqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387777AbfGXR2R (ORCPT + 99 others); Wed, 24 Jul 2019 13:28:17 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:52056 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728027AbfGXR2Q (ORCPT ); Wed, 24 Jul 2019 13:28:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1563988665; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uzIRBKbB7UU2QNs9lNEqqrq3se/+CB7MiPHQYfklzC8=; b=vBfFUiqaUOJAoAv6zMOJv+FLPitr8wCJi+GcqrB341SCXYgHJ3lJR8xaUn8F3J/PYavDfC tySQI3rwuKbvsBcfd3ThujnMl0PTdJPo4eL+pIhPIdJcQ3OjCuBP8ovg6zA6KFKh8oABMq gCB+ugQsu2DAZZpNvSKY/ZOsQZP31i0= From: Paul Cercueil To: Ralf Baechle , Paul Burton , James Hogan , Jonathan Corbet , Lee Jones , Arnd Bergmann , Daniel Lezcano , Thomas Gleixner , Michael Turquette , Stephen Boyd , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, od@zcrc.me, Mathieu Malaterre , Paul Cercueil , Artur Rojek Subject: [PATCH v15 11/13] MIPS: CI20: Reduce system timer and clocksource to 3 MHz Date: Wed, 24 Jul 2019 13:16:13 -0400 Message-Id: <20190724171615.20774-12-paul@crapouillou.net> In-Reply-To: <20190724171615.20774-1-paul@crapouillou.net> References: <20190724171615.20774-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The default clock (48 MHz) is too fast for the system timer. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Tested-by: Artur Rojek --- Notes: v5: New patch v6: Set also the rate for the clocksource channel's clock v7: No change v8: No change v9: Don't configure clock timer1, as the OS Timer is used as clocksource on this SoC v10: Revert back to v8 bahaviour. Let the user choose what clocksource should be used. v11-v15: No change arch/mips/boot/dts/ingenic/ci20.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts index 4f7b1fa31cf5..2e9952311ecd 100644 --- a/arch/mips/boot/dts/ingenic/ci20.dts +++ b/arch/mips/boot/dts/ingenic/ci20.dts @@ -2,6 +2,7 @@ /dts-v1/; #include "jz4780.dtsi" +#include #include / { @@ -238,3 +239,9 @@ bias-disable; }; }; + +&tcu { + /* 3 MHz for the system timer and clocksource */ + assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>; + assigned-clock-rates = <3000000>, <3000000>; +}; -- 2.21.0.593.g511ec345e18