summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/dmv177/console
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-05 11:00:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-05 11:00:57 +0000
commite7ff2b2798ed8ae14b737ae897eb84a73a6c66b6 (patch)
treee2239174159ab77231d0aa1045025b2243229f2b /c/src/lib/libbsp/powerpc/dmv177/console
parentConverted the console driver to use libchip/serial and added support (diff)
downloadrtems-e7ff2b2798ed8ae14b737ae897eb84a73a6c66b6.tar.bz2
New file added in the process of converting the console driver to
libchip/serial.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/dmv177/console')
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/config.c123
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c123
2 files changed, 246 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/config.c b/c/src/lib/libbsp/powerpc/dmv177/console/config.c
new file mode 100644
index 0000000000..624f6573f0
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/dmv177/console/config.c
@@ -0,0 +1,123 @@
+/*
+ * This file contains the TTY driver table for the DY-4 DMV177.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+
+#include <libchip/serial.h>
+#include <libchip/mc68681.h>
+#include <libchip/z85c30.h>
+#include "mc68681cfg.h"
+#include "z85c30cfg.h"
+
+/*
+ * Configuration specific probe routines
+ *
+ *
+ * NOTE: There are no DMV177 specific configuration routines. These
+ * routines could be written to dynamically determine which serial
+ * ports are on a board. Debugging this would require access to
+ * multiple board models.
+ */
+
+/* NONE CURRENTLY PROVIDED */
+
+/*
+ * The following table configures the console drivers used in this BSP.
+ *
+ * The first entry which, when probed, is available, will be named /dev/console,
+ * all others being given the name indicated.
+ */
+
+console_tbl Console_Port_Tbl[] = {
+ {
+ "/dev/com0", /* sDeviceName */
+ &mc68681_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ MC68681_ADDR, /* ulCtrlPort1 */
+ MC68681_PORT1_ADDR, /* ulCtrlPort2 */
+ 0, /* ulDataPort */
+ Read_mc68681_register, /* getRegister */
+ Write_mc68681_register, /* setRegister */
+ NULL, /* unused */ /* getData */
+ NULL, /* unused */ /* setData */
+ 0, /* unused */ /* ulClock */
+ DMV170_DUART_IRQ /* ulIntVector */
+ },
+ {
+ "/dev/com1", /* sDeviceName */
+ &mc68681_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ MC68681_ADDR, /* ulCtrlPort1 */
+ MC68681_PORT2_ADDR, /* ulCtrlPort2 */
+ 0, /* ulDataPort */
+ Read_mc68681_register, /* getRegister */
+ Write_mc68681_register, /* setRegister */
+ NULL, /* unused */ /* getData */
+ NULL, /* unused */ /* setData */
+ 0, /* unused */ /* ulClock */
+ DMV170_DUART_IRQ /* ulIntVector */
+ },
+ {
+ "/dev/com3", /* sDeviceName */
+ &z85c30_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ Z85C30_CTRL_A, /* ulCtrlPort1 */
+ Z85C30_CTRL_A, /* ulCtrlPort2 */
+ Z85C30_DATA_A, /* ulDataPort */
+ Read_z85c30_register, /* getRegister */
+ Write_z85c30_register, /* setRegister */
+ Read_z85c30_data, /* getData */
+ Write_z85c30_data, /* setData */
+ Z85C30_CLOCK, /* ulClock */
+ DMV170_SCC_IRQ /* ulIntVector */
+ },
+ {
+ "/dev/com4", /* sDeviceName */
+ &z85c30_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ Z85C30_CTRL_B, /* ulCtrlPort1 */
+ Z85C30_CTRL_A, /* ulCtrlPort2 */
+ Z85C30_DATA_B, /* ulDataPort */
+ Read_z85c30_register, /* getRegister */
+ Write_z85c30_register, /* setRegister */
+ Read_z85c30_data, /* getData */
+ Write_z85c30_data, /* setData */
+ Z85C30_CLOCK, /* ulClock */
+ DMV170_SCC_IRQ /* ulIntVector */
+ }
+};
+
+/*
+ * Declare some information used by the console driver
+ */
+
+#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];
+
+rtems_device_minor_number Console_Port_Minor;
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c b/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c
new file mode 100644
index 0000000000..624f6573f0
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c
@@ -0,0 +1,123 @@
+/*
+ * This file contains the TTY driver table for the DY-4 DMV177.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+
+#include <libchip/serial.h>
+#include <libchip/mc68681.h>
+#include <libchip/z85c30.h>
+#include "mc68681cfg.h"
+#include "z85c30cfg.h"
+
+/*
+ * Configuration specific probe routines
+ *
+ *
+ * NOTE: There are no DMV177 specific configuration routines. These
+ * routines could be written to dynamically determine which serial
+ * ports are on a board. Debugging this would require access to
+ * multiple board models.
+ */
+
+/* NONE CURRENTLY PROVIDED */
+
+/*
+ * The following table configures the console drivers used in this BSP.
+ *
+ * The first entry which, when probed, is available, will be named /dev/console,
+ * all others being given the name indicated.
+ */
+
+console_tbl Console_Port_Tbl[] = {
+ {
+ "/dev/com0", /* sDeviceName */
+ &mc68681_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ MC68681_ADDR, /* ulCtrlPort1 */
+ MC68681_PORT1_ADDR, /* ulCtrlPort2 */
+ 0, /* ulDataPort */
+ Read_mc68681_register, /* getRegister */
+ Write_mc68681_register, /* setRegister */
+ NULL, /* unused */ /* getData */
+ NULL, /* unused */ /* setData */
+ 0, /* unused */ /* ulClock */
+ DMV170_DUART_IRQ /* ulIntVector */
+ },
+ {
+ "/dev/com1", /* sDeviceName */
+ &mc68681_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ MC68681_ADDR, /* ulCtrlPort1 */
+ MC68681_PORT2_ADDR, /* ulCtrlPort2 */
+ 0, /* ulDataPort */
+ Read_mc68681_register, /* getRegister */
+ Write_mc68681_register, /* setRegister */
+ NULL, /* unused */ /* getData */
+ NULL, /* unused */ /* setData */
+ 0, /* unused */ /* ulClock */
+ DMV170_DUART_IRQ /* ulIntVector */
+ },
+ {
+ "/dev/com3", /* sDeviceName */
+ &z85c30_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ Z85C30_CTRL_A, /* ulCtrlPort1 */
+ Z85C30_CTRL_A, /* ulCtrlPort2 */
+ Z85C30_DATA_A, /* ulDataPort */
+ Read_z85c30_register, /* getRegister */
+ Write_z85c30_register, /* setRegister */
+ Read_z85c30_data, /* getData */
+ Write_z85c30_data, /* setData */
+ Z85C30_CLOCK, /* ulClock */
+ DMV170_SCC_IRQ /* ulIntVector */
+ },
+ {
+ "/dev/com4", /* sDeviceName */
+ &z85c30_fns, /* pDeviceFns */
+ NULL, /* deviceProbe */
+ NULL, /* pDeviceFlow */
+ 16, /* ulMargin */
+ 8, /* ulHysteresis */
+ (void *)9600, /* baud rate */ /* pDeviceParams */
+ Z85C30_CTRL_B, /* ulCtrlPort1 */
+ Z85C30_CTRL_A, /* ulCtrlPort2 */
+ Z85C30_DATA_B, /* ulDataPort */
+ Read_z85c30_register, /* getRegister */
+ Write_z85c30_register, /* setRegister */
+ Read_z85c30_data, /* getData */
+ Write_z85c30_data, /* setData */
+ Z85C30_CLOCK, /* ulClock */
+ DMV170_SCC_IRQ /* ulIntVector */
+ }
+};
+
+/*
+ * Declare some information used by the console driver
+ */
+
+#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];
+
+rtems_device_minor_number Console_Port_Minor;