Received: by 10.223.164.202 with SMTP id h10csp2040114wrb; Mon, 27 Nov 2017 10:58:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMZMeLkTFXHbfQvP+Hunp3EjidUyelDzyWj95p82s/uXDRLYkVEHDmV/qxqe2NnyLtxSW03B X-Received: by 10.159.204.147 with SMTP id t19mr11466692plo.222.1511809088423; Mon, 27 Nov 2017 10:58:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511809088; cv=none; d=google.com; s=arc-20160816; b=LDnJ+wMR7vUo47oI2BDjj0JBLfsVwvbQ77S1zc8VZrFL8Slp+SuLkV9mkNJwbFeQ3+ BEcHqz8OR0wpHLwe9zo2dzFiKqpGHCjERkddesBjYij90gQ5YgT8gujp8eDkTzWFqKSf zfh7L0LzqOxggL70C3QEe9CwxVUQMDtm+IUqS3a7eMsfraPpy+IszwmIOT05oQOWM5fN 4et67jSHY5p8qXsvaTZc+Ms6GmZ30k4zLCyhLqj/8BeSRcUoZPFZuEmGetBroj7g4sjS QSuEky1hwjN7bZ2C4VnMtfYdeymphfZeambmlkRl+/O+vpVAFV7Xutx9WDhxwdOeHhp0 kuUw== 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=6E5pwXDQSQYbofCgd7ywSJ0BNdnCAG0gg/Spr2ANVi8=; b=BXfWFKREn44e4eQ2VE/vFoOPvaCpZiahbz55MMZNkproPvEEVE+VXMAhK6ZArke88j WUbXT8lqjA+Ki48FEN7P1u3Z6ZOKMz3t5wW/MXFFgLeyUjVraImgY4njlkTgHdtCCmvE EN/0nHcaYN32F2+ryeY+NgSWJPywr44IrH9QG/iR8tCvYW96TPBK0arJ+AVtEtM2W4cE NQqh0jp5QgIO+M0RsG9WTHRR4gc+oa+a/PFrOHogPZIakzAJDypHS7n64LGMxjNWBe6R NBL8QJw5EWBhz/+Z/JjGbbTL2Uyp9se8tI6nm6IBO6aUtKq7SpUM65cs/ZKxCXWpwMFv SbfA== 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.10.57.56; Mon, 27 Nov 2017 10:58:08 -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 S932483AbdK0S43 (ORCPT + 78 others); Mon, 27 Nov 2017 13:56:29 -0500 Received: from smtprelay.synopsys.com ([198.182.60.111]:49656 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753442AbdK0S40 (ORCPT ); Mon, 27 Nov 2017 13:56:26 -0500 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id D18A110C02D9; Mon, 27 Nov 2017 10:56:25 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id BE981614; Mon, 27 Nov 2017 10:56:25 -0800 (PST) Received: from localhost.internal.synopsys.com (unknown [10.121.8.106]) by mailhost.synopsys.com (Postfix) with ESMTP id 6B70E60E; Mon, 27 Nov 2017 10:56:24 -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 2/4] ARC: [plat-hsdk]: Get rid of core pll frequency set in platform code Date: Mon, 27 Nov 2017 21:56:09 +0300 Message-Id: <20171127185611.12379-3-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 Get rid of core pll frequency set in platform code as we set it via device tree using 'assigned-clock-rates' property. Signed-off-by: Eugeniy Paltsev --- arch/arc/plat-hsdk/platform.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/arch/arc/plat-hsdk/platform.c b/arch/arc/plat-hsdk/platform.c index fd0ae5e..2958aed 100644 --- a/arch/arc/plat-hsdk/platform.c +++ b/arch/arc/plat-hsdk/platform.c @@ -38,42 +38,6 @@ static void __init hsdk_init_per_cpu(unsigned int cpu) #define CREG_PAE (CREG_BASE + 0x180) #define CREG_PAE_UPDATE (CREG_BASE + 0x194) -#define CREG_CORE_IF_CLK_DIV (CREG_BASE + 0x4B8) -#define CREG_CORE_IF_CLK_DIV_2 0x1 -#define CGU_BASE ARC_PERIPHERAL_BASE -#define CGU_PLL_STATUS (ARC_PERIPHERAL_BASE + 0x4) -#define CGU_PLL_CTRL (ARC_PERIPHERAL_BASE + 0x0) -#define CGU_PLL_STATUS_LOCK BIT(0) -#define CGU_PLL_STATUS_ERR BIT(1) -#define CGU_PLL_CTRL_1GHZ 0x3A10 -#define HSDK_PLL_LOCK_TIMEOUT 500 - -#define HSDK_PLL_LOCKED() \ - !!(ioread32((void __iomem *) CGU_PLL_STATUS) & CGU_PLL_STATUS_LOCK) - -#define HSDK_PLL_ERR() \ - !!(ioread32((void __iomem *) CGU_PLL_STATUS) & CGU_PLL_STATUS_ERR) - -static void __init hsdk_set_cpu_freq_1ghz(void) -{ - u32 timeout = HSDK_PLL_LOCK_TIMEOUT; - - /* - * As we set cpu clock which exceeds 500MHz, the divider for the interface - * clock must be programmed to div-by-2. - */ - iowrite32(CREG_CORE_IF_CLK_DIV_2, (void __iomem *) CREG_CORE_IF_CLK_DIV); - - /* Set cpu clock to 1GHz */ - iowrite32(CGU_PLL_CTRL_1GHZ, (void __iomem *) CGU_PLL_CTRL); - - while (!HSDK_PLL_LOCKED() && timeout--) - cpu_relax(); - - if (!HSDK_PLL_LOCKED() || HSDK_PLL_ERR()) - pr_err("Failed to setup CPU frequency to 1GHz!"); -} - #define SDIO_BASE (ARC_PERIPHERAL_BASE + 0xA000) #define SDIO_UHS_REG_EXT (SDIO_BASE + 0x108) #define SDIO_UHS_REG_EXT_DIV_2 (2 << 30) @@ -98,12 +62,6 @@ static void __init hsdk_init_early(void) * minimum possible div-by-2. */ iowrite32(SDIO_UHS_REG_EXT_DIV_2, (void __iomem *) SDIO_UHS_REG_EXT); - - /* - * Setup CPU frequency to 1GHz. - * TODO: remove it after smart hsdk pll driver will be introduced. - */ - hsdk_set_cpu_freq_1ghz(); } static const char *hsdk_compat[] __initconst = { -- 2.9.3 From 1585238892251443062@xxx Mon Nov 27 16:53:36 +0000 2017 X-GM-THRID: 1583429945593164381 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread