forked from Imagelibrary/rtems
2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
PR 1917/bsps * Makefile.am, preinstall.am, console/config.c, console/mc68360_scc.c, console/ns16550cfg.c, console/printk_support.c: Modifications to add dynamic tables for libchip serial drivers.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
|
||||
|
||||
PR 1917/bsps
|
||||
* Makefile.am, preinstall.am, console/config.c, console/mc68360_scc.c,
|
||||
console/ns16550cfg.c, console/printk_support.c: Modifications to add
|
||||
dynamic tables for libchip serial drivers.
|
||||
|
||||
2011-08-24 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* console/polled_io.c: Update due to API changes.
|
||||
|
||||
@@ -48,13 +48,17 @@ include_bsp_HEADERS = ../../powerpc/shared/console/uart.h \
|
||||
../../powerpc/shared/motorola/motorola.h \
|
||||
../../powerpc/shared/residual/residual.h \
|
||||
../../powerpc/shared/residual/pnp.h \
|
||||
../../powerpc/shared/console/consoleIo.h console/rsPMCQ1.h
|
||||
../../powerpc/shared/console/consoleIo.h console/rsPMCQ1.h \
|
||||
../../shared/console_private.h
|
||||
|
||||
# console
|
||||
libbsp_a_SOURCES += ../../shared/console.c console/ns16550cfg.c \
|
||||
libbsp_a_SOURCES += console/ns16550cfg.c \
|
||||
console/mc68360_scc.c console/rsPMCQ1.c console/alloc360.c \
|
||||
console/init68360.c console/config.c console/printk_support.c \
|
||||
console/config.c
|
||||
|
||||
../../shared/console.c ../../shared/console_select.c \
|
||||
../../shared/console_read.c ../../shared/console_write.c \
|
||||
../../shared/console_control.c
|
||||
|
||||
include_bsp_HEADERS += ../../powerpc/shared/openpic/openpic.h
|
||||
# openpic
|
||||
libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h \
|
||||
|
||||
@@ -81,7 +81,7 @@ extern console_fns mc68360_scc_fns;
|
||||
* ulIntVector This encodes the interrupt vector of the device.
|
||||
*
|
||||
*/
|
||||
console_tbl Console_Port_Tbl[] = {
|
||||
console_tbl Console_Configuration_Ports[] = {
|
||||
/*
|
||||
* NS16550 Chips provide first COM1 and COM2 Ports.
|
||||
*/
|
||||
@@ -363,12 +363,12 @@ console_tbl Console_Port_Tbl[] = {
|
||||
}
|
||||
};
|
||||
|
||||
/* rtems console uses the following minor number */
|
||||
rtems_device_minor_number Console_Port_Minor = 0;
|
||||
|
||||
#define NUM_CONSOLE_PORTS (sizeof(Console_Port_Tbl)/sizeof(console_tbl))
|
||||
unsigned long Console_Port_Count = NUM_CONSOLE_PORTS;
|
||||
console_data Console_Port_Data[NUM_CONSOLE_PORTS];
|
||||
/*
|
||||
* Define a variable that contains the number of statically configured
|
||||
* console devices.
|
||||
*/
|
||||
unsigned long Console_Configuration_Count = \
|
||||
(sizeof(Console_Configuration_Ports)/sizeof(console_tbl));
|
||||
|
||||
static bool config_68360_scc_base_probe(int minor, unsigned long busNo, unsigned long slotNo, int channel)
|
||||
{
|
||||
@@ -386,7 +386,7 @@ static bool config_68360_scc_base_probe(int minor, unsigned long busNo, unsigned
|
||||
if (!chip)
|
||||
return false;
|
||||
|
||||
Console_Port_Tbl[minor].pDeviceParams = &chip->port[ channel-1 ];
|
||||
Console_Port_Tbl[minor]->pDeviceParams = &chip->port[ channel-1 ];
|
||||
chip->port[ channel-1 ].minor = minor;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ void mc68360_Show_length_array(void) {
|
||||
M68360_t M68360_chips = NULL;
|
||||
|
||||
#define SYNC eieio
|
||||
#define mc68360_scc_Is_422( _minor ) (Console_Port_Tbl[minor].sDeviceName[7] == '4' )
|
||||
#define mc68360_scc_Is_422( _minor ) (Console_Port_Tbl[minor]->sDeviceName[7] == '4' )
|
||||
|
||||
|
||||
void mc68360_scc_nullFunc(void) {}
|
||||
@@ -147,7 +147,7 @@ void scc_write32(
|
||||
|
||||
void mc68360_sccShow_Regs(int minor){
|
||||
M68360_serial_ports_t ptr;
|
||||
ptr = Console_Port_Tbl[minor].pDeviceParams;
|
||||
ptr = Console_Port_Tbl[minor]->pDeviceParams;
|
||||
|
||||
printk( "scce 0x%08x", &ptr->pSCCR->scce );
|
||||
printk( " 0x%04x\n", ptr->pSCCR->scce );
|
||||
@@ -343,7 +343,7 @@ int mc68360_scc_open(
|
||||
#endif
|
||||
|
||||
|
||||
ptr = Console_Port_Tbl[minor].pDeviceParams;
|
||||
ptr = Console_Port_Tbl[minor]->pDeviceParams;
|
||||
m360 = ptr->chip->m360;
|
||||
|
||||
/*
|
||||
@@ -402,11 +402,11 @@ void mc68360_scc_initialize_interrupts(int minor)
|
||||
|
||||
#ifdef DEBUG_360
|
||||
printk("mc68360_scc_initialize_interrupts: minor %d\n", minor );
|
||||
printk("Console_Port_Tbl[minor].pDeviceParams 0x%08x\n",
|
||||
Console_Port_Tbl[minor].pDeviceParams );
|
||||
printk("Console_Port_Tbl[minor]->pDeviceParams 0x%08x\n",
|
||||
Console_Port_Tbl[minor]->pDeviceParams );
|
||||
#endif
|
||||
|
||||
ptr = Console_Port_Tbl[minor].pDeviceParams;
|
||||
ptr = Console_Port_Tbl[minor]->pDeviceParams;
|
||||
m360 = ptr->chip->m360;
|
||||
|
||||
#ifdef DEBUG_360
|
||||
@@ -671,7 +671,7 @@ int mc68360_scc_write_support_int(
|
||||
mc68360_length_count=0;
|
||||
#endif
|
||||
|
||||
ptr = Console_Port_Tbl[minor].pDeviceParams;
|
||||
ptr = Console_Port_Tbl[minor]->pDeviceParams;
|
||||
|
||||
/*
|
||||
* We are using interrupt driven output and termios only sends us
|
||||
@@ -744,7 +744,7 @@ int mc68360_scc_set_attributes(
|
||||
printk("mc68360_scc_set_attributes\n");
|
||||
#endif
|
||||
|
||||
ptr = Console_Port_Tbl[minor].pDeviceParams;
|
||||
ptr = Console_Port_Tbl[minor]->pDeviceParams;
|
||||
m360 = ptr->chip->m360;
|
||||
|
||||
switch (t->c_cflag & CBAUD)
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <libchip/serial.h>
|
||||
#include <libchip/ns16550.h>
|
||||
#include <bsp.h>
|
||||
#include "console.h"
|
||||
|
||||
typedef struct uart_reg
|
||||
{
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "console.h"
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
rtems_device_minor_number BSPPrintkPort = 0;
|
||||
|
||||
/* const char arg to be compatible with BSP_output_char decl. */
|
||||
void
|
||||
debug_putc_onlcr(const char c)
|
||||
|
||||
@@ -93,6 +93,10 @@ $(PROJECT_INCLUDE)/bsp/rsPMCQ1.h: console/rsPMCQ1.h $(PROJECT_INCLUDE)/bsp/$(dir
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/rsPMCQ1.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/rsPMCQ1.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/console_private.h: ../../shared/console_private.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/console_private.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/console_private.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/openpic.h: ../../powerpc/shared/openpic/openpic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/openpic.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/openpic.h
|
||||
|
||||
Reference in New Issue
Block a user