Received: by 10.223.164.202 with SMTP id h10csp2043489wrb; Mon, 27 Nov 2017 11:01:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMYjSe2qZmTnOcFWmT5UAzkPRUMGHTp68h6qkoC4zKvxLhyxxrYwhssWdMn8ALY1HZMORjmX X-Received: by 10.98.75.210 with SMTP id d79mr17824373pfj.230.1511809264903; Mon, 27 Nov 2017 11:01:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511809264; cv=none; d=google.com; s=arc-20160816; b=0URTQyWTOK9h5Zl9gwLv3ginliWt2As7qT/o6HGVfemt/t7fwQmYTnShiZpQSvOAKu lL+OkzUbzbATcAIBIpoYyW4b+nEUO73hDxDfsI6JP0+AQFaB4evz9X+IX5gZGGPAS4cy DLNRRO4KGGessfrQMyhkPHha532gACyaL48fHJd/VL7eVB1MF4NiWCtw23nZLYu0Tvm0 IUTjVZhDSBEHyXtuSrppqzVYrDtp3fEdNy2T9vpqGAi34xWBPZ8qwrBRiWuEdPia+95q Vup9CK0lIKyvY6q/+OzKK8h8/msSzyFdJyiKoag6gTk98p9WDfdYriasl2aXgcf9H1jz FDVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=qOeELyy3Awm5qkjefzuInwkW87UIBUjDtTXGzIhU9n4=; b=Oh1Nx2kJEtRI4mCBuS05z6rgqXuAgmZrJY6Y/uXZeoyaenQUWaFDxK1PCBEmcx07IK HWswobHH87TXgNwxhV5BMSStgo6Sf/3qDsKPcmLWtU/znUePAH3j5XzfrzvU7ERoP9z4 4U8mdlsF9qPtnzubAlw3EIPsQDZ3edRp1wYfVqP5FA/noVwliTQaCNRBK6pPvxyYRySu qHcQxs/w8L/Jg3wi1H/bZ2E8U9FVaNt5/q9/VpYxxXyerdD82Ypw4lDn2H9cG/bS6jGC GlzbyVALlcHBRGhnXwD/8FAh865q2ESlh+bDcQS35/rELQ++X23A8gt7LVlwFxpMP6/2 7d7g== ARC-Authentication-Results: i=1; mx.google.com; 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=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si17056573pgt.466.2017.11.27.11.00.53; Mon, 27 Nov 2017 11:01:04 -0800 (PST) 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; 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=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753693AbdK0S6i (ORCPT + 78 others); Mon, 27 Nov 2017 13:58:38 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:34744 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753305AbdK0S42 (ORCPT ); Mon, 27 Nov 2017 13:56:28 -0500 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 3EACF24E038F; Mon, 27 Nov 2017 10:56:28 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 2AED262C; Mon, 27 Nov 2017 10:56:28 -0800 (PST) Received: from localhost.internal.synopsys.com (unknown [10.121.8.106]) by mailhost.synopsys.com (Postfix) with ESMTP id C48C361F; Mon, 27 Nov 2017 10:56:26 -0800 (PST) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Vineet Gupta , Alexey Brodkin , Eugeniy Paltsev Subject: [PATCH 3/4] ARC: [plat-axs103]: Set initial core pll output frequency Date: Mon, 27 Nov 2017 21:56:10 +0300 Message-Id: <20171127185611.12379-4-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171127185611.12379-1-Eugeniy.Paltsev@synopsys.com> References: <20171127185611.12379-1-Eugeniy.Paltsev@synopsys.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set initial core pll output frequency specified in device tree to 100MHz for SMP configuration and 90MHz for UP configuration. It will be applied at the core pll driver probing. Update platform quirk for decreasing core frequency for quad core configuration. Signed-off-by: Eugeniy Paltsev --- arch/arc/boot/dts/axc003.dtsi | 8 ++++++++ arch/arc/boot/dts/axc003_idu.dtsi | 8 ++++++++ arch/arc/plat-axs10x/axs10x.c | 8 ++------ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/arch/arc/boot/dts/axc003.dtsi b/arch/arc/boot/dts/axc003.dtsi index 4e6e9f5..dc91c66 100644 --- a/arch/arc/boot/dts/axc003.dtsi +++ b/arch/arc/boot/dts/axc003.dtsi @@ -35,6 +35,14 @@ reg = <0x80 0x10>, <0x100 0x10>; #clock-cells = <0>; clocks = <&input_clk>; + + /* + * Set initial core pll output frequency to 90MHz. + * It will be applied at the core pll driver probing + * on early boot. + */ + assigned-clocks = <&core_clk>; + assigned-clock-rates = <90000000>; }; core_intc: archs-intc@cpu { diff --git a/arch/arc/boot/dts/axc003_idu.dtsi b/arch/arc/boot/dts/axc003_idu.dtsi index 63954a8..69ff4895 100644 --- a/arch/arc/boot/dts/axc003_idu.dtsi +++ b/arch/arc/boot/dts/axc003_idu.dtsi @@ -35,6 +35,14 @@ reg = <0x80 0x10>, <0x100 0x10>; #clock-cells = <0>; clocks = <&input_clk>; + + /* + * Set initial core pll output frequency to 100MHz. + * It will be applied at the core pll driver probing + * on early boot. + */ + assigned-clocks = <&core_clk>; + assigned-clock-rates = <100000000>; }; core_intc: archs-intc@cpu { diff --git a/arch/arc/plat-axs10x/axs10x.c b/arch/arc/plat-axs10x/axs10x.c index cf14ebc..28b3cb2 100644 --- a/arch/arc/plat-axs10x/axs10x.c +++ b/arch/arc/plat-axs10x/axs10x.c @@ -327,22 +327,18 @@ static void __init axs103_early_init(void) unsigned int num_cores = (read_aux_reg(ARC_REG_MCIP_BCR) >> 16) & 0x3F; if (num_cores > 2) { u32 freq = 50, orig; - /* - * TODO: use cpu node "cpu-freq" param instead of platform-specific - * "/cpu_card/core_clk" as it works only if we use fixed-clock for cpu. - */ int off = fdt_path_offset(initial_boot_params, "/cpu_card/core_clk"); const struct fdt_property *prop; prop = fdt_get_property(initial_boot_params, off, - "clock-frequency", NULL); + "assigned-clock-rates", NULL); orig = be32_to_cpu(*(u32*)(prop->data)) / 1000000; /* Patching .dtb in-place with new core clock value */ if (freq != orig ) { freq = cpu_to_be32(freq * 1000000); fdt_setprop_inplace(initial_boot_params, off, - "clock-frequency", &freq, sizeof(freq)); + "assigned-clock-rates", &freq, sizeof(freq)); } } #endif -- 2.9.3 From 1585239336206420800@xxx Mon Nov 27 17:00:40 +0000 2017 X-GM-THRID: 1585239336206420800 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread