public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] da850: provide davinci_enable_uart0
Date: Mon, 22 Apr 2013 17:54:59 +0200	[thread overview]
Message-ID: <1366646100-2456-1-git-send-email-eric@eukrea.com> (raw)

this is needed to bring UART0 out of reset but this function
currently only exists for dm644x/355/365/646x when da850 (at
least am1808 also need it).

Signed-off-by: Eric B?nard <eric@eukrea.com>
---
 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 8 ++++++++
 arch/arm/include/asm/arch-davinci/hardware.h    | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
index ff2e2e3..127beb8 100644
--- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
+++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
@@ -32,6 +32,14 @@
 #include <asm/arch/emif_defs.h>
 #include <asm/arch/pll_defs.h>
 
+void davinci_enable_uart0(void)
+{
+	lpsc_on(DAVINCI_LPSC_UART0);
+
+	/* Bringup UART0 out of reset */
+	REG(UART0_PWREMU_MGMT) = 0x00006001;
+}
+
 #if defined(CONFIG_SYS_DA850_PLL_INIT)
 void da850_waitloop(unsigned long loopcnt)
 {
diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h
index 6eed6c9..a9017e4 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -346,6 +346,8 @@ void davinci_errata_workarounds(void);
 #define PSC_PSC0_MODULE_ID_CNT		16
 #define PSC_PSC1_MODULE_ID_CNT		32
 
+#define UART0_PWREMU_MGMT		(0x01c42030)
+
 struct davinci_psc_regs {
 	dv_reg	revid;
 	dv_reg	rsvd0[71];
-- 
1.7.11.7

             reply	other threads:[~2013-04-22 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 15:54 Eric Bénard [this message]
2013-04-22 15:55 ` [U-Boot] [PATCH 2/2] davinci: handle CONFIG_SYS_CLE_MASK and CONFIG_SYS_ALE_MASK Eric Bénard
2013-04-29 20:22 ` [U-Boot] [PATCH 1/2] da850: provide davinci_enable_uart0 Tom Rini

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=1366646100-2456-1-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.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