summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2011-10-18 18:33:04 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2011-10-18 18:33:04 +0000
commit00991a3100d89e75935b82df4da2704085179206 (patch)
treefcadd6b790c3d3b37edb09dcf2a085a7b3e1eeda /c
parent2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff)
downloadrtems-00991a3100d89e75935b82df4da2704085179206.tar.bz2
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.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/ChangeLog7
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/Makefile.am12
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/config.c16
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c16
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c3
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/printk_support.c4
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/preinstall.am4
7 files changed, 39 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/powerpc/ep1a/ChangeLog b/c/src/lib/libbsp/powerpc/ep1a/ChangeLog
index f371026004..eaf8e544c4 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/ep1a/ChangeLog
@@ -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.
diff --git a/c/src/lib/libbsp/powerpc/ep1a/Makefile.am b/c/src/lib/libbsp/powerpc/ep1a/Makefile.am
index 85cb9b11a8..94fca63057 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ep1a/Makefile.am
@@ -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 \
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/config.c b/c/src/lib/libbsp/powerpc/ep1a/console/config.c
index 6a47c7b764..57066b7121 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/config.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/config.c
@@ -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;
}
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c b/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
index e9f07a6a50..7fc8eb2f81 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
@@ -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)
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c b/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c
index f34c6f7aac..378d291981 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c
@@ -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
{
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/printk_support.c b/c/src/lib/libbsp/powerpc/ep1a/console/printk_support.c
index 97ba1d6c68..441fa19a07 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/printk_support.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/printk_support.c
@@ -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)
diff --git a/c/src/lib/libbsp/powerpc/ep1a/preinstall.am b/c/src/lib/libbsp/powerpc/ep1a/preinstall.am
index 247c63a3a1..3680071fde 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/preinstall.am
+++ b/c/src/lib/libbsp/powerpc/ep1a/preinstall.am
@@ -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