mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-29 15:49:26 +08:00
2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
PR 1917/bsps * Makefile.am, console/console-config.c, startup/bspstart.c: Modifications to add dynamic tables for libchip serial drivers.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
|
||||
|
||||
PR 1917/bsps
|
||||
* Makefile.am, console/console-config.c, startup/bspstart.c:
|
||||
Modifications to add dynamic tables for libchip serial drivers.
|
||||
|
||||
2011-09-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* make/custom/mpc8309som.cfg, startup/linkcmds.mpc8309som: New file.
|
||||
|
||||
@@ -84,7 +84,11 @@ libbsp_a_SOURCES += irq/irq.c \
|
||||
|
||||
# console
|
||||
libbsp_a_SOURCES += ../../shared/console.c \
|
||||
console/console-config.c
|
||||
../../shared/console_select.c \
|
||||
console/console-config.c \
|
||||
../../shared/console_read.c \
|
||||
../../shared/console_write.c \
|
||||
../../shared/console_control.c
|
||||
# bsp_i2c
|
||||
libbsp_a_SOURCES += i2c/i2c_init.c
|
||||
# bsp_spi
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <libchip/serial.h>
|
||||
#include <libchip/ns16550.h>
|
||||
#include "../../../shared/console_private.h"
|
||||
|
||||
#include <mpc83xx/mpc83xx.h>
|
||||
|
||||
@@ -56,13 +57,9 @@ static void gen83xx_console_set_register(uint32_t addr, uint8_t i, uint8_t val)
|
||||
reg [i] = val;
|
||||
}
|
||||
|
||||
unsigned long Console_Port_Count = PORT_COUNT;
|
||||
unsigned long Console_Configuration_Count = PORT_COUNT;
|
||||
|
||||
rtems_device_minor_number Console_Port_Minor = 0;
|
||||
|
||||
console_data Console_Port_Data [PORT_COUNT];
|
||||
|
||||
console_tbl Console_Port_Tbl [PORT_COUNT] = {
|
||||
console_tbl Console_Configuration_Ports [PORT_COUNT] = {
|
||||
{
|
||||
.sDeviceName = "/dev/ttyS0",
|
||||
.deviceType = SERIAL_NS16550,
|
||||
@@ -115,7 +112,7 @@ console_tbl Console_Port_Tbl [PORT_COUNT] = {
|
||||
|
||||
static void gen83xx_output_char(char c)
|
||||
{
|
||||
const console_fns *console = Console_Port_Tbl [Console_Port_Minor].pDeviceFns;
|
||||
const console_fns *console = Console_Port_Tbl [Console_Port_Minor]->pDeviceFns;
|
||||
|
||||
if (c == '\n') {
|
||||
console->deviceWritePolled((int) Console_Port_Minor, '\r');
|
||||
|
||||
@@ -121,10 +121,10 @@ void bsp_start( void)
|
||||
|
||||
/* Initialize some console parameters */
|
||||
for (i = 0; i < Console_Port_Count; ++i) {
|
||||
Console_Port_Tbl [i].ulClock = BSP_bus_frequency;
|
||||
Console_Configuration_Ports [i].ulClock = BSP_bus_frequency;
|
||||
|
||||
#ifdef HAS_UBOOT
|
||||
Console_Port_Tbl [i].pDeviceParams =
|
||||
Console_Configuration_Ports [i].pDeviceParams =
|
||||
(void *) bsp_uboot_board_info.bi_baudrate;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user