[PATCH] edb93xx: Enable UART1
Matthias Kaehlcke
matthias at kaehlcke.net
Sat Feb 6 18:54:56 EST 2010
edb93xx: according to the datasheet UART1 needs to be enabled explicitly
Signed-off-by: Matthias Kaehlcke <matthias at kaehlcke.net>
---
board/edb93xx/edb93xx.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/board/edb93xx/edb93xx.c b/board/edb93xx/edb93xx.c
index add88e1..6316988 100644
--- a/board/edb93xx/edb93xx.c
+++ b/board/edb93xx/edb93xx.c
@@ -32,6 +32,8 @@
#include <mach/ep93xx-regs.h>
#include "edb93xx.h"
+#define DEVCFG_U1EN (1 << 18)
+
/*
* Up to 32MiB NOR type flash, connected to
* CS line 6, data width is 16 bit
@@ -164,6 +166,12 @@ static int edb93xx_console_init(void)
value |= SYSCON_PWRCNT_UART_BAUD;
writel(value, &syscon->pwrcnt);
+ /* Enable UART1 */
+ value = readl(&syscon->devicecfg);
+ value |= DEVCFG_U1EN;
+ writel(0xAA, &syscon->sysswlock);
+ writel(value, &syscon->devicecfg);
+
register_device(&edb93xx_serial_device);
return 0;
--
1.6.5
More information about the barebox
mailing list