mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 1/5] MIPS: rzx50: prepare for new debug_ll
Date: Mon,  3 Jun 2013 14:53:23 +0400	[thread overview]
Message-ID: <1370256807-26755-2-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1370256807-26755-1-git-send-email-antonynpavlov@gmail.com>

Set DEBUG_LL_UART_DIVISOR to use <asm/debug_ll_ns16550.h>.

The JZ4755 uses 24 MHz as the main reference frequency (EXCLK).
The UART controller can work on full EXCLK or on EXCLK/2.
Just now we use EXCLK/2 legacy clock setup made by U-Boot.
So set UART controller base frequency to 12 MHz.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h b/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h
index 7bf66b1..2a55dea 100644
--- a/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h
+++ b/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h
@@ -34,4 +34,8 @@
 
 #define DEBUG_LL_UART_SHIFT	2
 
+#define DEBUG_LL_UART_CLK	(12000000 / 16)
+#define DEBUG_LL_UART_BPS	CONFIG_BAUDRATE
+#define DEBUG_LL_UART_DIVISOR	(DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)
+
 #endif /* __INCLUDE_DEBUG_LL_JZ4750D_H__ */
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-06-03 11:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 10:53 [PATCH v2 0/5] MIPS: rework ns16550 debug_ll Antony Pavlov
2013-06-03 10:53 ` Antony Pavlov [this message]
2013-06-03 10:53 ` [PATCH v2 2/5] MIPS: malta: prepare for new debug_ll Antony Pavlov
2013-06-03 10:53 ` [PATCH v2 3/5] MIPS: unify ns16550 debug_ll support code Antony Pavlov
2013-06-03 10:53 ` [PATCH v2 4/5] MIPS: rzx50: pbl: use debug_ll Antony Pavlov
2013-06-03 10:53 ` [PATCH v2 5/5] MIPS: rzx50_defconfig: use UART1 for low-level debug Antony Pavlov
2013-06-04  7:03 ` [PATCH v2 0/5] MIPS: rework ns16550 debug_ll Sascha Hauer

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=1370256807-26755-2-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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