edb93xx: Enable UART1
A message that is not in the archive (sent off-list or not yet received): d5ecf68c69351ddcef35759f76e7e8ce3d7e0571.1265500315.git.matthias@kaehlcke.net
PATCH 1/1 edb93xx: Enable UART1
edb93xx: according to the datasheet UART1 needs to be enabled explicitly
Signed-off-by Matthias Kaehlcke <[email protected]>
--- board/edb93xx/edb93xx.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
board/edb93xx/edb93xx.c +8 -0
@@ -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 ;
Signature · 7 lines
1.6.5 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/1 edb93xx: Avoid stack usage in early_udelay()
In reply to a message not in the archiveedb93xx: The purpose of early_udelay() is to provide delay functionality in the early board setup, when the stack isn't set up yet. With some compiler versions the current implementation makes use of the stack and ends up crashing. Fix this by removing an explicit division from early_udelay()
Signed-off-by Matthias Kaehlcke <[email protected]>
--- board/edb93xx/early_udelay.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/edb93xx/early_udelay.h +1 -1
@@ -26,7 +26,7 @@static inline void early_udelay (uint32_t usecs) {/* loop takes 4 cycles at 5.0ns (fastest case, running at 200MHz) */ - registeruint32_t loops = (usecs *1000 ) /20 ; + registeruint32_t loops = usecs * (1000 /20 ); __asm__volatile ("1:\n" "subs %0, %1, #1\n"
Signature · 7 lines
1.6.5 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox