summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/console
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-04-08 18:39:38 +1000
committerChris Johns <chrisj@rtems.org>2016-05-11 11:45:01 +1000
commit014292a164b8bb5286b6c7dae7c37a469ef6f0cc (patch)
treec7343485ef520fc71f36e5cf8271e08a2c1de789 /c/src/lib/libbsp/i386/pc386/console
parentbsp/qoriq: Add portal clear functions (diff)
downloadrtems-014292a164b8bb5286b6c7dae7c37a469ef6f0cc.tar.bz2
i386/pc386: Add support for the gdb stub to use available console drivers.
Move the gdb stub from the i386 UART code to use the libchip drivers. Use any ports discovered during the probes. Add gdb control to the boot command line. Change the device naming to the full device path, not a partial path. For example /dev/com1.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/console')
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/conscfg.c88
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/console_control.c39
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/console_select.c106
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/gdb_select.c169
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/uart_bus_pci.c135
5 files changed, 336 insertions, 201 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/console/conscfg.c b/c/src/lib/libbsp/i386/pc386/console/conscfg.c
index 5b7ebc5d4a..82d3cf9f98 100644
--- a/c/src/lib/libbsp/i386/pc386/console/conscfg.c
+++ b/c/src/lib/libbsp/i386/pc386/console/conscfg.c
@@ -16,13 +16,14 @@
*/
#include <bsp.h>
+#include <bsp/bspimpl.h>
#include <libchip/serial.h>
#include <libchip/ns16550.h>
#if BSP_ENABLE_VGA
#include "vgacons.h"
#endif
#include <bsp/irq.h>
-#include <rtems/pci.h>
+#include "../../../shared/console_private.h"
#if BSP_ENABLE_VGA
#define VGA_CONSOLE_FUNCTIONS &vgacons_fns
@@ -43,7 +44,7 @@
#define COM3_BASE_IO 0x2F8
#define COM4_BASE_IO 0x2E8
- #define CLOCK_RATE (115200 * 16)
+ #define CLOCK_RATE (115200 * 16)
static uint8_t com_get_register(uint32_t addr, uint8_t i)
{
@@ -57,21 +58,26 @@
{
outport_byte( (addr + i), val );
}
-
- extern bool pc386_com1_com4_enabled(int);
#endif
#if (BSP_IS_EDISON == 1 )
extern const console_fns edison_fns;
#endif
-console_tbl Console_Configuration_Ports[] = {
-#if (BSP_IS_EDISON == 1)
+/*
+ * Default to the PC VGA console if present and configured.
+ */
+console_tbl Console_Configuration_Ports[] = {
+#if BSP_ENABLE_VGA
+ /*
+ * If present the VGA console must always be minor 0.
+ * See console_control.
+ */
{
- "/dev/com1", /* sDeviceName */
- -1, /* deviceType */
- &edison_fns, /* pDeviceFns */
- NULL, /* deviceProbe */
+ "/dev/vgacons", /* sDeviceName */
+ VGA_CONSOLE, /* deviceType */
+ VGA_CONSOLE_FUNCTIONS, /* pDeviceFns */
+ vgacons_probe, /* deviceProbe */
NULL, /* pDeviceFlow */
16, /* ulMargin */
8, /* ulHysteresis */
@@ -83,16 +89,22 @@ console_tbl Console_Configuration_Ports[] = {
NULL, /* setRegister */
NULL,/* unused */ /* getData */
NULL,/* unused */ /* setData */
- 0X0, /* ulClock */
- 0x0 /* ulIntVector -- base for port */
+ 0x0, /* ulClock */
+ 0x0 /* ulIntVector -- base for port */
},
#endif
-#if BSP_ENABLE_VGA
+};
+
+unsigned long Console_Configuration_Count =
+ (sizeof(Console_Configuration_Ports)/sizeof(console_tbl));
+
+static console_tbl Legacy_Ports[] = {
+#if (BSP_IS_EDISON == 1)
{
- "/dev/vgacons", /* sDeviceName */
- VGA_CONSOLE, /* deviceType */
- VGA_CONSOLE_FUNCTIONS, /* pDeviceFns */
- vgacons_probe, /* deviceProbe */
+ "/dev/com1", /* sDeviceName */
+ -1, /* deviceType */
+ &edison_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
16, /* ulMargin */
8, /* ulHysteresis */
@@ -104,8 +116,8 @@ console_tbl Console_Configuration_Ports[] = {
NULL, /* setRegister */
NULL,/* unused */ /* getData */
NULL,/* unused */ /* setData */
- 0X0, /* ulClock */
- 0x0 /* ulIntVector -- base for port */
+ 0x0, /* ulClock */
+ 0x0 /* ulIntVector -- base for port */
},
#endif
#if BSP_ENABLE_COM1_COM4
@@ -113,7 +125,7 @@ console_tbl Console_Configuration_Ports[] = {
"/dev/com1", /* sDeviceName */
SERIAL_NS16550, /* deviceType */
COM_CONSOLE_FUNCTIONS, /* pDeviceFns */
- pc386_com1_com4_enabled, /* deviceProbe */
+ NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
16, /* ulMargin */
8, /* ulHysteresis */
@@ -132,7 +144,7 @@ console_tbl Console_Configuration_Ports[] = {
"/dev/com2", /* sDeviceName */
SERIAL_NS16550, /* deviceType */
COM_CONSOLE_FUNCTIONS, /* pDeviceFns */
- pc386_com1_com4_enabled, /* deviceProbe */
+ NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
16, /* ulMargin */
8, /* ulHysteresis */
@@ -147,12 +159,11 @@ console_tbl Console_Configuration_Ports[] = {
CLOCK_RATE, /* ulClock */
BSP_UART_COM2_IRQ /* ulIntVector -- base for port */
},
-
{
"/dev/com3", /* sDeviceName */
SERIAL_NS16550, /* deviceType */
COM_CONSOLE_FUNCTIONS, /* pDeviceFns */
- pc386_com1_com4_enabled, /* deviceProbe */
+ NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
16, /* ulMargin */
8, /* ulHysteresis */
@@ -167,12 +178,11 @@ console_tbl Console_Configuration_Ports[] = {
CLOCK_RATE, /* ulClock */
BSP_UART_COM3_IRQ /* ulIntVector -- base for port */
},
-
{
"/dev/com4", /* sDeviceName */
SERIAL_NS16550, /* deviceType */
COM_CONSOLE_FUNCTIONS, /* pDeviceFns */
- pc386_com1_com4_enabled, /* deviceProbe */
+ NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
16, /* ulMargin */
8, /* ulHysteresis */
@@ -188,12 +198,26 @@ console_tbl Console_Configuration_Ports[] = {
BSP_UART_COM4_IRQ /* ulIntVector -- base for port */
},
#endif
-
};
-/*
- * Define a variable that contains the number of statically configured
- * console devices.
- */
-unsigned long Console_Configuration_Count = \
- (sizeof(Console_Configuration_Ports)/sizeof(console_tbl));
+#define Legacy_Port_Count \
+ (sizeof(Legacy_Ports)/sizeof(console_tbl))
+
+void legacy_uart_probe(void)
+{
+#if BSP_ENABLE_COM1_COM4
+ const char *opt;
+ /*
+ * Check the command line to see if com1-com4 are disabled.
+ */
+ opt = bsp_cmdline_arg("--disable-com1-com4");
+ if ( opt ) {
+ printk( "COM1-COM4: disabled\n" );
+ } else {
+ if (Legacy_Port_Count) {
+ printk("Legacy UART Ports: COM1-COM4\n");
+ console_register_devices( Legacy_Ports, Legacy_Port_Count );
+ }
+ }
+#endif
+}
diff --git a/c/src/lib/libbsp/i386/pc386/console/console_control.c b/c/src/lib/libbsp/i386/pc386/console/console_control.c
index a0b9220bba..3a454d97e9 100644
--- a/c/src/lib/libbsp/i386/pc386/console/console_control.c
+++ b/c/src/lib/libbsp/i386/pc386/console/console_control.c
@@ -1,5 +1,5 @@
/*
- * This file is an extension of the generic console driver
+ * This file is an extension of the generic console driver
* shell used by all console drivers using libchip, it contains
* the console_control routine, This bsp needs its own version
* of this method to handle the keyboard and mouse as a single
@@ -44,27 +44,28 @@ rtems_device_driver console_control(
)
{
#if BSP_ENABLE_VGA
- rtems_libio_ioctl_args_t *args = arg;
+ if (minor == 0) {
+ rtems_libio_ioctl_args_t *args = arg;
- switch (args->command) {
- default:
- if( vt_ioctl( args->command, (unsigned long)args->buffer ) != 0 )
- return rtems_termios_ioctl (arg);
- break;
+ switch (args->command) {
+ default:
+ if( vt_ioctl( args->command, (unsigned long)args->buffer ) != 0 )
+ return rtems_termios_ioctl (arg);
+ break;
- case MW_UID_REGISTER_DEVICE:
- printk( "SerialMouse: reg=%s\n", args->buffer );
- register_kbd_msg_queue( args->buffer, 0 );
- break;
+ case MW_UID_REGISTER_DEVICE:
+ printk( "SerialMouse: reg=%s\n", args->buffer );
+ register_kbd_msg_queue( args->buffer, 0 );
+ break;
- case MW_UID_UNREGISTER_DEVICE:
- unregister_kbd_msg_queue( 0 );
- break;
+ case MW_UID_UNREGISTER_DEVICE:
+ unregister_kbd_msg_queue( 0 );
+ break;
+ }
+
+ args->ioctl_return = 0;
+ return RTEMS_SUCCESSFUL;
}
-
- args->ioctl_return = 0;
- return RTEMS_SUCCESSFUL;
-#else
- return rtems_termios_ioctl (arg);
#endif
+ return rtems_termios_ioctl (arg);
}
diff --git a/c/src/lib/libbsp/i386/pc386/console/console_select.c b/c/src/lib/libbsp/i386/pc386/console/console_select.c
index 6a91a96083..f7e6bbc8e9 100644
--- a/c/src/lib/libbsp/i386/pc386/console/console_select.c
+++ b/c/src/lib/libbsp/i386/pc386/console/console_select.c
@@ -3,7 +3,7 @@
*
* @ingroup Console
*
- * @brief pc397 console select
+ * @brief pc386 console select
*
* This file contains a routine to select the console based upon a number
* of criteria.
@@ -33,24 +33,6 @@
#include <crt.h>
#endif
-#include <bsp/bspimpl.h>
-
-/*
- * Forward prototype
- */
-extern bool pc386_com1_com4_enabled(int);
-
-/*
- * This method is used to determine if COM1-COM4 are enabled based upon
- * boot command line arguments.
- */
-static bool are_com1_com4_enabled;
-
-bool pc386_com1_com4_enabled(int minor)
-{
- return are_com1_com4_enabled;
-}
-
/*
* Method to return true if the device associated with the
* minor number probs available.
@@ -97,48 +79,6 @@ static rtems_device_minor_number bsp_First_Available_Device( void )
rtems_fatal_error_occurred(RTEMS_IO_ERROR);
}
-static bool bsp_find_console_entry(
- const char *match,
- size_t length,
- rtems_device_minor_number *match_minor
-)
-{
- rtems_device_minor_number minor;
- const char *name;
-
- for (minor=0; minor < Console_Port_Count ; minor++) {
- console_tbl *cptr = Console_Port_Tbl[minor];
-
- /*
- * Console table entries include /dev/ prefix, device names passed
- * in on command line do not.
- */
- name = cptr->sDeviceName + sizeof("/dev");
- if ( !strncmp( name, match, length ) ) {
- *match_minor = minor;
- return true;
- }
- }
-
- return false;
-}
-
-static void parse_com1_com4_enable(void)
-{
- static const char *opt;
-
- /*
- * Check the command line to see if com1-com4 are disabled.
- */
- opt = bsp_cmdline_arg("--disable-com1-com4");
- if ( opt ) {
- printk( "Disable COM1-COM4 per boot argument\n" );
- are_com1_com4_enabled = false;
- } else {
- are_com1_com4_enabled = true;
- }
-}
-
static bool parse_printk_or_console(
const char *param,
rtems_device_minor_number *minor_out
@@ -150,6 +90,7 @@ static bool parse_printk_or_console(
size_t length;
size_t index;
rtems_device_minor_number minor;
+ console_tbl *conscfg;
/*
* Check the command line for the type of mode the console is.
@@ -198,16 +139,14 @@ static bool parse_printk_or_console(
length = &opt[index] - option;
- if ( !bsp_find_console_entry( option, length, &minor ) ) {
+ conscfg = console_find_console_entry( option, length, &minor );
+ if ( conscfg == NULL ) {
return false;
}
*minor_out = minor;
if (comma) {
- console_tbl *conscfg = &Console_Configuration_Ports[minor];
-
option = comma + 1;
-
if (strncmp (option, "115200", sizeof ("115200") - 1) == 0)
conscfg->pDeviceParams = (void *)115200;
else if (strncmp (option, "57600", sizeof ("57600") - 1) == 0)
@@ -241,39 +180,34 @@ static inline const char *get_name(
*/
void pc386_parse_console_arguments(void)
{
- rtems_device_minor_number minor;
-
- /*
- * The console device driver must have its data structures initialized
- * before we can iterate the table of devices for names.
- */
- console_initialize_data();
-
- /*
- * Determine if COM1-COM4 were disabled.
- */
- parse_com1_com4_enable();
+ rtems_device_minor_number minor;
+ rtems_device_minor_number minor_console = 0;
+ rtems_device_minor_number minor_printk = 0;
/*
* Assume that if only --console is specified, that printk() should
* follow that selection by default.
*/
if ( parse_printk_or_console( "--console=", &minor ) ) {
- Console_Port_Minor = minor;
- BSPPrintkPort = minor;
+ minor_console = minor;
+ minor_printk = minor;
}
/*
* But if explicitly specified, attempt to honor it.
*/
if ( parse_printk_or_console( "--printk=", &minor ) ) {
- BSPPrintkPort = minor;
+ minor_printk = minor;
}
-#if 0
- printk( "Console device: %s\n", get_name(Console_Port_Minor) );
- printk( "printk device: %s\n", get_name(BSPPrintkPort) );
-#endif
+ printk( "Console: %s printk: %s\n",
+ get_name(minor_console),get_name(minor_printk) );
+
+ /*
+ * Any output after this can cause problems until termios is initialised.
+ */
+ Console_Port_Minor = minor_console;
+ BSPPrintkPort = minor_printk;
}
/*
@@ -283,6 +217,10 @@ void pc386_parse_console_arguments(void)
void bsp_console_select(void)
{
#ifdef RTEMS_RUNTIME_CONSOLE_SELECT
+ /*
+ * WARNING: This code is really needed any more and should be removed.
+ * references to COM1 and COM2 like they are wrong.
+ */
if ( BSP_runtime_console_select )
BSP_runtime_console_select(&BSPPrintkPort, &Console_Port_Minor);
diff --git a/c/src/lib/libbsp/i386/pc386/console/gdb_select.c b/c/src/lib/libbsp/i386/pc386/console/gdb_select.c
new file mode 100644
index 0000000000..8e646586f6
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/console/gdb_select.c
@@ -0,0 +1,169 @@
+/**
+ * @file
+ *
+ * @ingroup GDB
+ *
+ * @brief pc386 gdb select
+ *
+ * This file contains a routine to enable and select the UART the gdb stub
+ * connects too. Currently limited to COM1 and COM2. See
+ * shared/comm/i386-stub-glue.c file.
+ */
+
+/*
+ * COPYRIGHT (c) 2016.
+ * Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <stdlib.h>
+
+#include <bsp.h>
+#include <rtems/libio.h>
+#include <rtems/console.h>
+#include <rtems/termiostypes.h>
+#include <libchip/serial.h>
+#include <libchip/ns16550.h>
+#include <bsp/bspimpl.h>
+
+#include "../../../shared/console_private.h"
+
+/*
+ * Used in the stub to print output.
+ */
+int remote_debug;
+/*
+ * Defined in the stub, used here.
+ */
+void set_debug_traps(void);
+
+/*
+ * Added here to get a valid baudrate. Needs to go once we
+ * move to the standard UART driver.
+ */
+int BSPBaseBaud;
+
+static bool gdb_port_probe(int minor)
+{
+ /* Return false as GDB has claimed the port */
+ return false;
+}
+
+void pc386_parse_gdb_arguments(void)
+{
+ static const char *opt;
+
+ /*
+ * Check the command line to see if com1-com4 are disabled.
+ */
+ opt = bsp_cmdline_arg("--gdb=");
+ if ( opt ) {
+ const char *option;
+ const char *comma;
+ size_t length;
+ size_t index;
+ rtems_device_minor_number minor;
+ uint32_t baudrate = 115200;
+ bool halt = false;
+ console_tbl *port;
+
+ /*
+ * Fine the length, there can be more command line visible.
+ */
+ length = 0;
+ while ((opt[length] != ' ') && (opt[length] != '\0')) {
+ ++length;
+ if (length > NAME_MAX) {
+ printk("invalid option (--gdb): too long\n");
+ return;
+ }
+ }
+
+ /*
+ * Only match up to a comma or NULL
+ */
+ index = 0;
+ while ((opt[index] != '=') && (index < length)) {
+ ++index;
+ }
+
+ if (opt[index] != '=') {
+ printk("invalid option (--gdb): no equals\n");
+ return;
+ }
+
+ ++index;
+ option = &opt[index];
+
+ while ((opt[index] != ',') && (index < length)) {
+ ++index;
+ }
+
+ if (opt[index] == ',')
+ comma = &opt[index];
+ else
+ comma = NULL;
+
+ length = &opt[index] - option;
+
+ port = console_find_console_entry( option, length, &minor );
+
+ if ( port == NULL ) {
+ printk("invalid option (--gdb): port not found\n");
+ return;
+ }
+
+ if (comma) {
+ option = comma + 1;
+ baudrate = strtoul(option, 0, 10);
+ switch (baudrate) {
+ case 115200:
+ case 57600:
+ case 38400:
+ case 19200:
+ case 9600:
+ case 4800:
+ port->pDeviceParams = (void*) baudrate;
+ BSPBaseBaud = baudrate; /* REMOVE ME */
+ break;
+ default:
+ printk("invalid option (--gdb): bad baudrate\n");
+ return;
+ }
+ }
+
+ /*
+ * Provide a probe that fails so the device is not part of termios. All
+ * functions are polling.
+ */
+ port->deviceProbe = gdb_port_probe;
+ port->pDeviceFns = &ns16550_fns_polled;
+
+ opt = bsp_cmdline_arg("--gdb-remote-debug");
+ if ( opt ) {
+ remote_debug = 1;
+ }
+
+ opt = bsp_cmdline_arg("--gdb-break");
+ if ( opt ) {
+ halt = true;
+ }
+
+ printk("GDB stub: enable %s%s%s\n",
+ port->sDeviceName,
+ remote_debug ? ", remote-debug" : "",
+ halt ? ", halting" : "");
+
+ i386_stub_glue_init(minor);
+ set_debug_traps();
+ i386_stub_glue_init_breakin();
+
+ if ( halt ) {
+ printk("GDB stub: waiting for remote connection..\n");
+ breakpoint();
+ }
+ }
+}
diff --git a/c/src/lib/libbsp/i386/pc386/console/uart_bus_pci.c b/c/src/lib/libbsp/i386/pc386/console/uart_bus_pci.c
index 36afb73c46..60d35e8322 100644
--- a/c/src/lib/libbsp/i386/pc386/console/uart_bus_pci.c
+++ b/c/src/lib/libbsp/i386/pc386/console/uart_bus_pci.c
@@ -314,85 +314,88 @@ void pci_uart_probe(void)
&fun
);
if ( status == PCIB_ERR_SUCCESS ) {
+ uint8_t irq;
+ uint32_t base;
+
boards++;
conf[instance].found = true;
conf[instance].clock = pci_ns8250_ids[i].rclk;
conf[instance].ports = 1;
total_ports += conf[instance].ports;
- break;
- }
- }
-
- if ( status != PCIB_ERR_SUCCESS )
- continue;
- uint8_t irq;
- uint32_t base;
+ pci_read_config_byte( bus, dev, fun, PCI_INTERRUPT_LINE, &irq );
+ pci_read_config_dword( bus, dev, fun, PCI_BASE_ADDRESS_0, &base );
- pci_read_config_byte( bus, dev, fun, PCI_INTERRUPT_LINE, &irq );
- pci_read_config_dword( bus, dev, fun, PCI_BASE_ADDRESS_0, &base );
+ conf[instance].irq = irq;
+ conf[instance].base = base;
- conf[instance].irq = irq;
- conf[instance].base = base;
-
- printk(
- "Found %s #%d at 0x%08x IRQ %d with %d clock\n",
- pci_ns8250_ids[i].desc,
- instance,
- conf[instance].base,
- conf[instance].irq,
- conf[instance].clock
- );
+ printk(
+ "Found %s #%d at 0x%08x IRQ %d with %d clock\n",
+ pci_ns8250_ids[i].desc,
+ instance,
+ conf[instance].base,
+ conf[instance].irq,
+ conf[instance].clock
+ );
+ }
+ }
}
/*
* Now allocate array of device structures and fill them in
*/
- int device_instance;
- ports = calloc( total_ports, sizeof( console_tbl ) );
- port_p = ports;
- device_instance = 1;
- for ( b=0 ; b<MAX_BOARDS ; b++ ) {
- if ( conf[b].found == false )
- continue;
- char name[32];
-
- sprintf( name, "/dev/pcicom%d", device_instance++ );
- port_p->sDeviceName = strdup( name );
- port_p->deviceType = SERIAL_NS16550;
- if ( conf[b].irq <= 15 ) {
- port_p->pDeviceFns = &ns16550_fns;
- } else {
- printk(
- "%s IRQ=%d >= 16 requires APIC support, using polling\n",
- name,
- conf[b].irq <= 15
- );
- port_p->pDeviceFns = &ns16550_fns_polled;
- }
-
- port_p->deviceProbe = NULL;
- port_p->pDeviceFlow = NULL;
- port_p->ulMargin = 16;
- port_p->ulHysteresis = 8;
- port_p->pDeviceParams = (void *) 9600;
- port_p->ulCtrlPort1 = conf[b].base;
- port_p->ulCtrlPort2 = 0; /* NA */
- port_p->ulDataPort = 0; /* NA */
- port_p->getRegister = pci_ns16550_get_register;
- port_p->setRegister = pci_ns16550_set_register;
- port_p->getData = NULL; /* NA */
- port_p->setData = NULL; /* NA */
- port_p->ulClock = conf[b].clock;
- port_p->ulIntVector = conf[b].irq;
-
- port_p++;
- } /* end boards */
+ if (boards) {
+ int device_instance;
+
+ ports = calloc( total_ports, sizeof( console_tbl ) );
+ if (ports != NULL) {
+ port_p = ports;
+ device_instance = 1;
+ for (b = 0; b < MAX_BOARDS; b++) {
+ char name[32];
+ if ( conf[b].found == false )
+ continue;
+ sprintf( name, "/dev/pcicom%d", device_instance++ );
+ port_p->sDeviceName = strdup( name );
+ port_p->deviceType = SERIAL_NS16550;
+ if ( conf[b].irq <= 15 ) {
+ port_p->pDeviceFns = &ns16550_fns;
+ } else {
+ printk(
+ "%s IRQ=%d >= 16 requires APIC support, using polling\n",
+ name,
+ conf[b].irq
+ );
+ port_p->pDeviceFns = &ns16550_fns_polled;
+ }
- /*
- * Register the devices
- */
- if ( boards )
- console_register_devices( ports, total_ports );
+ port_p->deviceProbe = NULL;
+ port_p->pDeviceFlow = NULL;
+ port_p->ulMargin = 16;
+ port_p->ulHysteresis = 8;
+ port_p->pDeviceParams = (void *) 9600;
+ port_p->ulCtrlPort1 = conf[b].base;
+ port_p->ulCtrlPort2 = 0; /* NA */
+ port_p->ulDataPort = 0; /* NA */
+ port_p->getRegister = pci_ns16550_get_register;
+ port_p->setRegister = pci_ns16550_set_register;
+ port_p->getData = NULL; /* NA */
+ port_p->setData = NULL; /* NA */
+ port_p->ulClock = conf[b].clock;
+ port_p->ulIntVector = conf[b].irq;
+
+ port_p++;
+ } /* end boards */
+
+ /*
+ * Register the devices
+ */
+ console_register_devices( ports, total_ports );
+
+ /*
+ * Do not free the ports memory, the console hold this memory for-ever.
+ */
+ }
+ }
}
#endif