From patchwork Tue Aug 7 08:07:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Liu X-Patchwork-Id: 175520 X-Patchwork-Delegate: vapier@gentoo.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 002422C007C for ; Tue, 7 Aug 2012 18:23:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 90A7B28228; Tue, 7 Aug 2012 10:23:00 +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 Momwk82WuriE; Tue, 7 Aug 2012 10:23:00 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7B7392820B; Tue, 7 Aug 2012 10:22:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9A794281F9 for ; Tue, 7 Aug 2012 10:22:50 +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 rAouyDmb0nLA for ; Tue, 7 Aug 2012 10:22:49 +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 am1outboundpool.messaging.microsoft.com (am1ehsobe002.messaging.microsoft.com [213.199.154.205]) by theia.denx.de (Postfix) with ESMTPS id B660D281F1 for ; Tue, 7 Aug 2012 10:22:48 +0200 (CEST) Received: from mail6-am1-R.bigfish.com (10.3.201.249) by AM1EHSOBE005.bigfish.com (10.3.204.25) with Microsoft SMTP Server id 14.1.225.23; Tue, 7 Aug 2012 08:07:45 +0000 Received: from mail6-am1 (localhost [127.0.0.1]) by mail6-am1-R.bigfish.com (Postfix) with ESMTP id AEAEF3A0085; Tue, 7 Aug 2012 08:07:45 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI X-SpamScore: 8 X-BigFish: VS8(zzzz1202hzz8275bhz2ei87h2a8h668h839hd24he5bhe96h107ahff4o) Received-SPF: neutral (mail6-am1: 137.71.25.55 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.55; envelope-from=lliubbo@gmail.com; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail6-am1 (localhost.localdomain [127.0.0.1]) by mail6-am1 (MessageSwitch) id 1344326863575915_16816; Tue, 7 Aug 2012 08:07:43 +0000 (UTC) Received: from AM1EHSMHS014.bigfish.com (unknown [10.3.201.247]) by mail6-am1.bigfish.com (Postfix) with ESMTP id 89E31180044; Tue, 7 Aug 2012 08:07:43 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by AM1EHSMHS014.bigfish.com (10.3.207.152) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 7 Aug 2012 08:07:43 +0000 Received: from NWD2HUBCAS1.ad.analog.com (nwd2hubcas1.ad.analog.com [10.64.73.29]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id q777rg2L029134 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 7 Aug 2012 03:53:42 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.3.83.0; Tue, 7 Aug 2012 04:07:41 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.5/8.14.5) with ESMTP id q7787d80031421; Tue, 7 Aug 2012 04:07:40 -0400 Received: from bob-OptiPlex-760.analog.com (unknown [10.99.24.84]) by linux.site (Postfix) with ESMTP id A471C42858BA; Mon, 6 Aug 2012 18:33:25 -0600 (MDT) From: Bob Liu To: , , Date: Tue, 7 Aug 2012 16:07:47 +0800 Message-ID: <1344326875-348-8-git-send-email-lliubbo@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1344326875-348-1-git-send-email-lliubbo@gmail.com> References: <1344326875-348-1-git-send-email-lliubbo@gmail.com> MIME-Version: 1.0 Cc: u-boot-devel@blackfin.uclinux.org Subject: [U-Boot] [PATCH 08/16] Blackfin: add more print info for Bf60x 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add system0, system1, dclk and cgu print info for Bf60x. Signed-off-by: Bob Liu --- arch/blackfin/lib/board.c | 6 ++++++ arch/blackfin/lib/clocks.c | 10 +++++++++- common/cmd_reginfo.c | 17 +++++++++++++++++ include/configs/bf609-ezkit.h | 1 + 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 4e44bf0..e03bd57 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -311,7 +311,13 @@ void board_init_f(ulong bootflag) printf("Clock: VCO: %s MHz, ", strmhz(buf, get_vco())); printf("Core: %s MHz, ", strmhz(buf, get_cclk())); +#if defined(__ADSPBF60x__) + printf("System0: %s MHz, ", strmhz(buf, get_sclk0())); + printf("System1: %s MHz, ", strmhz(buf, get_sclk1())); + printf("Dclk: %s MHz\n", strmhz(buf, get_dclk())); +#else printf("System: %s MHz\n", strmhz(buf, get_sclk())); +#endif if (CONFIG_MEM_SIZE) { printf("RAM: "); diff --git a/arch/blackfin/lib/clocks.c b/arch/blackfin/lib/clocks.c index f867123..519a3e1 100644 --- a/arch/blackfin/lib/clocks.c +++ b/arch/blackfin/lib/clocks.c @@ -79,7 +79,7 @@ u_long get_cclk(void) /* Get the System clock */ #ifdef CGU_DIV -static u_long cached_sclk_pll_div, cached_sclk, cached_sclk0, cached_sclk1; +static u_long cached_sclk_pll_div, cached_sclk, cached_sclk0, cached_sclk1, cached_dclk; static u_long _get_sclk(u_long *cache) { u_long div, ssel; @@ -132,6 +132,14 @@ u_long get_sclk1(void) #endif } +u_long get_dclk(void) +{ +#ifndef CONFIG_BFIN_GET_DCLK + return _get_sclk(&cached_dclk); +#else + return CONFIG_BFIN_GET_DCLK; +#endif +} #else u_long get_sclk(void) diff --git a/common/cmd_reginfo.c b/common/cmd_reginfo.c index bf94119..ef49017 100644 --- a/common/cmd_reginfo.c +++ b/common/cmd_reginfo.c @@ -226,6 +226,23 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("\tEBIU_SDSTAT: 0x%04x EBIU_SDGCTL: 0x%08x\n", bfin_read_EBIU_SDSTAT(), bfin_read_EBIU_SDGCTL()); # endif +#else + puts("\nCGU Registers\n"); + printf("\tCGU_DIV: 0x%08x CGU_CTL: 0x%08x\n", + bfin_read_CGU_DIV(), bfin_read_CGU_CTL()); + printf("\tCGU_STAT: 0x%08x CGU_LOCKCNT: 0x%08x\n", + bfin_read_CGU_STAT(), bfin_read_CGU_CLKOUTSEL()); + + puts("\nSMC DDR Registers\n"); + printf("\tDDR_CFG: 0x%08x DDR_TR0: 0x%08x\n", + bfin_read_DMC0_CFG(), bfin_read_DMC0_TR0()); + printf("\tDDR_TR1: 0x%08x DDR_TR2: 0x%08x\n", + bfin_read_DMC0_TR1(), bfin_read_DMC0_TR2()); + printf("\tDDR_MR: 0x%08x DDR_EMR1: 0x%08x\n", + bfin_read_DMC0_MR(), bfin_read_DMC0_EMR1()); + printf("\tDDR_CTL: 0x%08x DDR_STAT: 0x%08x\n", + bfin_read_DMC0_CTL(), bfin_read_DMC0_STAT()); + printf("\tDDR_DLLCTL:0x%08x\n", bfin_read_DMC0_DLLCTL()); #endif #endif /* CONFIG_BLACKFIN */ diff --git a/include/configs/bf609-ezkit.h b/include/configs/bf609-ezkit.h index c847069..c7cb834 100644 --- a/include/configs/bf609-ezkit.h +++ b/include/configs/bf609-ezkit.h @@ -64,6 +64,7 @@ #define CONFIG_BFIN_GET_SCLK (CONFIG_PLL_CLK/CONFIG_SYSCLK_DIV) #define CONFIG_BFIN_GET_SCLK0 (get_sclk()/CONFIG_SCLK0_DIV) #define CONFIG_BFIN_GET_SCLK1 (get_sclk()/CONFIG_SCLK1_DIV) +#define CONFIG_BFIN_GET_DCLK (get_cclk()/CONFIG_DCLK_DIV) /* * Memory Settings