[rtems commit] bsp/lpc32xx: Add UART_CLKMODE settings
Sebastian Huber
sebh at rtems.org
Tue Dec 18 10:18:04 UTC 2012
Module: rtems
Branch: master
Commit: c9562c593b485590774ad8a7c2564aaa64223ed3
Changeset: http://git.rtems.org/rtems/commit/?id=c9562c593b485590774ad8a7c2564aaa64223ed3
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Dec 18 11:18:40 2012 +0100
bsp/lpc32xx: Add UART_CLKMODE settings
---
.../libbsp/arm/lpc32xx/console/console-config.c | 3 +++
.../lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c b/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
index 1230dfd..738f5d8 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
@@ -47,6 +47,7 @@ static void lpc32xx_uart_set_register(uintptr_t addr, uint8_t i, uint8_t val)
{
LPC32XX_UARTCLK_CTRL |= 1U << 0;
LPC32XX_U3CLK = LPC32XX_CONFIG_U3CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 4, 5);
return true;
}
@@ -65,6 +66,7 @@ static void lpc32xx_uart_set_register(uintptr_t addr, uint8_t i, uint8_t val)
LPC32XX_UARTCLK_CTRL |= 1U << 1;
LPC32XX_U4CLK = LPC32XX_CONFIG_U4CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 6, 7);
return true;
}
@@ -75,6 +77,7 @@ static void lpc32xx_uart_set_register(uintptr_t addr, uint8_t i, uint8_t val)
{
LPC32XX_UARTCLK_CTRL |= 1U << 3;
LPC32XX_U6CLK = LPC32XX_CONFIG_U6CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 10, 11);
return true;
}
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
index 21b49de..acc24e9 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
@@ -269,6 +269,7 @@ static BSP_START_TEXT_SECTION void setup_uarts(void)
#ifdef LPC32XX_UART_5_BAUD
LPC32XX_UARTCLK_CTRL |= 1U << 2;
LPC32XX_U5CLK = LPC32XX_CONFIG_U5CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 8, 9);
BSP_CONSOLE_UART_INIT(0x01);
#endif
}
More information about the vc
mailing list