summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-05 11:00:00 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-05 11:00:00 +0000
commit92a6454654b03e2ae1204f9ad2bac940ebad079a (patch)
treec42a9773ef38e2bd1f3f1655cd0a86c4aa26c2a7 /c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c
parentRenamed old_start340.s to startfor340only.s (diff)
downloadrtems-92a6454654b03e2ae1204f9ad2bac940ebad079a.tar.bz2
Converted the console driver to use libchip/serial and added support
for the z85c30 found on the DMV177. This effort started with the console driver from the Radstone PPC2. But some simplifications were made in the hope that console.c can be made a shared file at some point in the near future. Split the debugio from console. This was done so at some point in the future printk support as is found in the pc386 BSP can be shared across all BSPs.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c b/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c
new file mode 100644
index 0000000000..0ea7243546
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c
@@ -0,0 +1,53 @@
+/*
+ * This file contains the console driver chip level routines for the
+ * mc68681 chip.
+ *
+ * COPYRIGHT (c) 1989-1997.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * $Id$
+ */
+
+#include <rtems.h>
+#include <bsp.h>
+
+#define CALCULATE_REGISTER_ADDRESS( _base, _reg ) \
+ (unsigned8 *)((_base) + ((_reg) * 8 ))
+
+/*
+ * Read_mc68681_register
+ */
+
+unsigned8 Read_mc68681_register(
+ unsigned32 ulCtrlPort,
+ unsigned8 ucRegNum
+)
+{
+ unsigned8 *port;
+
+ port = CALCULATE_REGISTER_ADDRESS( ulCtrlPort, ucRegNum );
+
+ return *port;
+}
+
+/*
+ * Write_mc68681_register
+ */
+
+void Write_mc68681_register(
+ unsigned32 ulCtrlPort,
+ unsigned8 ucRegNum,
+ unsigned8 ucData
+)
+{
+ unsigned8 *port;
+
+ port = CALCULATE_REGISTER_ADDRESS( ulCtrlPort, ucRegNum );
+
+ *port = ucData;
+}