From patchwork Thu Aug 7 00:23:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 377695 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 42331140092 for ; Thu, 7 Aug 2014 10:24:36 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2AA3DA7603; Thu, 7 Aug 2014 02:24:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jJcbbKmbjzUf; Thu, 7 Aug 2014 02:24:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 71C34A7618; Thu, 7 Aug 2014 02:24:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BBB23A760C for ; Thu, 7 Aug 2014 02:24:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id evetwGLbQqgP for ; Thu, 7 Aug 2014 02:24:08 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by theia.denx.de (Postfix) with ESMTPS id 44ED5A75FB for ; Thu, 7 Aug 2014 02:23:50 +0200 (CEST) Received: by mail-pa0-f41.google.com with SMTP id rd3so4324470pab.14 for ; Wed, 06 Aug 2014 17:23:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=wGYlS2uCdnR/4GVOI4p5xriPp1lF3GUwaqfz1T21sQ4=; b=Ul2Ek94dzHLJ0Oy9nekS2zJmtJud8SE0qt9l6UJfJaRxoKX7Y0hooPIW4dhxMJqY9J QfcqwOMzg/KSBogzS5jAMNHb4xR+h8RFgow90D6xhu1sOlTqYxb58SuCLAjSD0IZs6Tb v8T5+tloN5gAu48F2iR2eBMoP917KHmDo2cgWGnEZ+4eJjtXBnX+h+TUy5P0rpqWyALK dEvIQuB3MD/dLyB72N0YO2iL4kc7ltl6SX2M8zxJiEkwTM9Bpnq/F2djqVs5EXoGrUD+ Bh7BTk3wxkHdEi8nWf4wgefBMA+CSIIwEIqGOsbpfMscV53c9RTHOSPWqKt9NlyculwN PQ7g== X-Gm-Message-State: ALoCoQmo7p019miiMUgInC9pln7+M2UkM93F0R8xr/a3WVsxgldOXz8EsQrLOPNQNMmWUA3TCODM X-Received: by 10.66.246.138 with SMTP id xw10mr46537pac.142.1407371029659; Wed, 06 Aug 2014 17:23:49 -0700 (PDT) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id u7sm3678257pdj.34.2014.08.06.17.23.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Aug 2014 17:23:48 -0700 (PDT) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de, Nobuhiro Iwamatsu Date: Thu, 7 Aug 2014 09:23:21 +0900 Message-Id: <1407371002-14133-5-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1407371002-14133-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> References: <1407371002-14133-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> Cc: Nobuhiro Iwamatsu Subject: [U-Boot] [PATCH 5/6] arm: rmobile: lager: Fix CPU frequency setting X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Setting to change the CPU frequency is only used version2. Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/lager/lager.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index a5a0474..5302839 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -29,15 +29,17 @@ void s_init(void) { struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE; - u32 stc; /* Watchdog init */ writel(0xA5A5A500, &rwdt->rwtcsra); writel(0xA5A5A500, &swdt->swtcsra); /* CPU frequency setting. Set to 1.4GHz */ - stc = ((1500 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT; - clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); + if (rmobile_get_cpu_rev_integer() >= R8A7790_CUT_ES2X) { + u32 stc = ((1400 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) + << PLL0_STC_BIT; + clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); + } /* QoS(Quality-of-Service) Init */ qos_init();