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.
This commit is contained in:
Jennifer Averett
2011-10-18 18:25:15 +00:00
parent ba692232fa
commit 0a91018fd3
4 changed files with 19 additions and 13 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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]))
(sizeof(Console_Configuration_Ports) / sizeof(Console_Configuration_Ports [0]))
unsigned long Console_Port_Count = LPC32XX_UART_COUNT;
console_data Console_Port_Data [LPC32XX_UART_COUNT];
unsigned long Console_Configuration_Count = LPC32XX_UART_COUNT;

View File

@@ -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;