summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2011-10-18 18:25:15 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2011-10-18 18:25:15 +0000
commit0a91018fd3d77c6d036eee8e0668ebd15a9faf4b (patch)
tree936331cf054e37a1dc8432fc4154b668d154b3d9 /c
parent2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff)
downloadrtems-0a91018fd3d77c6d036eee8e0668ebd15a9faf4b.tar.bz2
2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
PR 1917/bsps * Makefile.am, console/console-config.c, console/hsu.c: Modifications to add dynamic tables for libchip serial drivers.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/ChangeLog6
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/Makefile.am6
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/console/console-config.c10
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/console/hsu.c10
4 files changed, 19 insertions, 13 deletions
diff --git a/c/src/lib/libbsp/arm/lpc32xx/ChangeLog b/c/src/lib/libbsp/arm/lpc32xx/ChangeLog
index 526811e9a6..6b081515d3 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/ChangeLog
+++ b/c/src/lib/libbsp/arm/lpc32xx/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
+
+ PR 1917/bsps
+ * Makefile.am, console/console-config.c, console/hsu.c: Modifications
+ to add dynamic tables for libchip serial drivers.
+
2011-09-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
* make/custom/lpc32xx.inc: Workaround for GCC bug 50106.
diff --git a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
index afb268de67..e79a8b2d5b 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
+++ b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
@@ -109,8 +109,12 @@ libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
# Console
libbsp_a_SOURCES += ../../shared/console.c \
+ ../../shared/console_select.c \
console/console-config.c \
- console/hsu.c
+ console/hsu.c \
+ ../../shared/console_read.c \
+ ../../shared/console_write.c \
+ ../../shared/console_control.c
# Clock
libbsp_a_SOURCES += ../shared/lpc/clock/lpc-clock-config.c
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 3b8f8a3c25..d70f93ecd8 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
@@ -42,11 +42,9 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
reg [i] = val;
}
-rtems_device_minor_number Console_Port_Minor = 0;
-
/* FIXME: Console selection */
-console_tbl Console_Port_Tbl [] = {
+console_tbl Console_Configuration_Ports [] = {
#ifdef LPC32XX_CONFIG_U5CLK
{
.sDeviceName = "/dev/ttyS5",
@@ -197,8 +195,6 @@ console_tbl Console_Port_Tbl [] = {
};
#define LPC32XX_UART_COUNT \
- (sizeof(Console_Port_Tbl) / sizeof(Console_Port_Tbl [0]))
-
-unsigned long Console_Port_Count = LPC32XX_UART_COUNT;
+ (sizeof(Console_Configuration_Ports) / sizeof(Console_Configuration_Ports [0]))
-console_data Console_Port_Data [LPC32XX_UART_COUNT];
+unsigned long Console_Configuration_Count = LPC32XX_UART_COUNT;
diff --git a/c/src/lib/libbsp/arm/lpc32xx/console/hsu.c b/c/src/lib/libbsp/arm/lpc32xx/console/hsu.c
index cf8a26ee09..44e72789d8 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/console/hsu.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/console/hsu.c
@@ -64,7 +64,7 @@ static int lpc32xx_hsu_first_open(int major, int minor, void *arg)
{
rtems_libio_open_close_args_t *oca = arg;
struct rtems_termios_tty *tty = oca->iop->data1;
- console_tbl *ct = &Console_Port_Tbl [minor];
+ console_tbl *ct = Console_Port_Tbl [minor];
console_data *cd = &Console_Port_Data [minor];
volatile lpc32xx_hsu *hsu = (volatile lpc32xx_hsu *) ct->ulCtrlPort1;
@@ -77,7 +77,7 @@ static int lpc32xx_hsu_first_open(int major, int minor, void *arg)
static ssize_t lpc32xx_hsu_write(int minor, const char *buf, size_t len)
{
- console_tbl *ct = &Console_Port_Tbl [minor];
+ console_tbl *ct = Console_Port_Tbl [minor];
console_data *cd = &Console_Port_Data [minor];
volatile lpc32xx_hsu *hsu = (volatile lpc32xx_hsu *) ct->ulCtrlPort1;
size_t tx_level = (hsu->level & HSU_LEVEL_TX_MASK) >> HSU_LEVEL_TX_SHIFT;
@@ -101,7 +101,7 @@ static ssize_t lpc32xx_hsu_write(int minor, const char *buf, size_t len)
static void lpc32xx_hsu_interrupt_handler(void *arg)
{
int minor = (int) arg;
- console_tbl *ct = &Console_Port_Tbl [minor];
+ console_tbl *ct = Console_Port_Tbl [minor];
console_data *cd = &Console_Port_Data [minor];
volatile lpc32xx_hsu *hsu = (volatile lpc32xx_hsu *) ct->ulCtrlPort1;
@@ -141,7 +141,7 @@ static void lpc32xx_hsu_interrupt_handler(void *arg)
static void lpc32xx_hsu_initialize(int minor)
{
- console_tbl *ct = &Console_Port_Tbl [minor];
+ console_tbl *ct = Console_Port_Tbl [minor];
console_data *cd = &Console_Port_Data [minor];
volatile lpc32xx_hsu *hsu = (volatile lpc32xx_hsu *) ct->ulCtrlPort1;
@@ -166,7 +166,7 @@ static void lpc32xx_hsu_initialize(int minor)
static int lpc32xx_hsu_set_attributes(int minor, const struct termios *term)
{
- console_tbl *ct = &Console_Port_Tbl [minor];
+ console_tbl *ct = Console_Port_Tbl [minor];
volatile lpc32xx_hsu *hsu = (volatile lpc32xx_hsu *) ct->ulCtrlPort1;
int baud_flags = term->c_cflag & CBAUD;