public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bob Liu <lliubbo@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/16] Blackfin: add more print info for Bf60x
Date: Tue, 7 Aug 2012 16:07:47 +0800	[thread overview]
Message-ID: <1344326875-348-8-git-send-email-lliubbo@gmail.com> (raw)
In-Reply-To: <1344326875-348-1-git-send-email-lliubbo@gmail.com>

Add system0, system1, dclk and cgu print info for Bf60x.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
 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
-- 
1.7.9.5

  parent reply	other threads:[~2012-08-07  8:07 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07  8:07 [U-Boot] [PATCH 01/16] Blackfin: BF60x: new processor port Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 02/16] Blackfin: bf609-ezkit: new board port Bob Liu
2012-08-08  4:41   ` Mike Frysinger
2012-08-20  7:55     ` Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 03/16] Blackfin: Bf60x: support big cplb page Bob Liu
2012-08-08  4:48   ` Mike Frysinger
2012-08-20  8:00     ` Bob Liu
2012-08-23  3:49       ` Mike Frysinger
2012-08-07  8:07 ` [U-Boot] [PATCH 04/16] Blackfin: Rsi: add support for bf609-ezkit Bob Liu
2012-08-08  4:52   ` Mike Frysinger
2012-08-20  8:01     ` Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 05/16] Blackfin: Paraflash: " Bob Liu
2012-08-08  4:55   ` Mike Frysinger
2012-08-20  8:01     ` Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 06/16] Blackfin: Bf609-ezkit: implement soft switch Bob Liu
2012-08-08  4:59   ` Mike Frysinger
2012-08-20  8:11     ` Bob Liu
2012-08-23  3:53       ` Mike Frysinger
2012-08-07  8:07 ` [U-Boot] [PATCH 07/16] Blackfin: Spi: add bf6xx spi driver Bob Liu
2012-08-08  5:02   ` Mike Frysinger
2012-08-20  8:11     ` Bob Liu
2012-08-07  8:07 ` Bob Liu [this message]
2012-08-08  5:04   ` [U-Boot] [PATCH 08/16] Blackfin: add more print info for Bf60x Mike Frysinger
2012-08-20  8:12     ` Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 09/16] Blackfin: Bf60x: add reset support Bob Liu
2012-08-08  5:05   ` Mike Frysinger
2012-08-20  8:13     ` Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 10/16] Blackfin: Bf60x: Check card ready for each RSI command Bob Liu
2012-08-08  5:05   ` Mike Frysinger
2012-08-20  8:13     ` Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 11/16] Blackfin: Bf60x: support clock init Bob Liu
2012-08-08  5:06   ` Mike Frysinger
2012-08-07  8:07 ` [U-Boot] [PATCH 12/16] Blackfin: Bf60x: initcode: set up uart baud properly Bob Liu
2012-08-08  5:06   ` Mike Frysinger
2012-08-07  8:07 ` [U-Boot] [PATCH 13/16] Blackfin: Bf60x: add hw watchdog support Bob Liu
2012-08-08  5:11   ` Mike Frysinger
2012-08-20  8:25     ` Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 14/16] Blackfin: setup SMC if user desires it Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 15/16] Blackfin: Bf60x: add resume from hibernate Bob Liu
2012-08-07  8:07 ` [U-Boot] [PATCH 16/16] Blackfin: update license to Clear BSD license Bob Liu
2012-08-08  5:12   ` Mike Frysinger
2012-08-20  8:25     ` Bob Liu
2012-08-08  4:39 ` [U-Boot] [PATCH 01/16] Blackfin: BF60x: new processor port Mike Frysinger
2012-08-20  7:54   ` Bob Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344326875-348-8-git-send-email-lliubbo@gmail.com \
    --to=lliubbo@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox