summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-15 23:55:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-15 23:55:04 +0000
commit670d0378e75af404d50a2debc117435101339b9a (patch)
treeb7ba24820b3442b2debb6f94a9f4dc7bf2652980 /c
parentAdded default z85c30 register access routines. (diff)
downloadrtems-670d0378e75af404d50a2debc117435101339b9a.tar.bz2
Switched to usign the default z8530 and mc68681 register access routines.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in2
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/config.c18
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c18
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c53
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.h52
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.c96
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.h50
7 files changed, 17 insertions, 272 deletions
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in b/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in
index b7dffb0303..24e5de9f37 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in
+++ b/c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in
@@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@
PGM=${ARCH}/console.rel
# C source names, if any, go here -- minus the .c
-C_PIECES=config console debugio mc68681cfg z85c30cfg
+C_PIECES=config console debugio
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/config.c b/c/src/lib/libbsp/powerpc/dmv177/console/config.c
index df2f9ccb57..176c73c6c6 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/console/config.c
+++ b/c/src/lib/libbsp/powerpc/dmv177/console/config.c
@@ -13,8 +13,6 @@
#include <libchip/serial.h>
#include <libchip/mc68681.h>
#include <libchip/z85c30.h>
-#include "mc68681cfg.h"
-#include "z85c30cfg.h"
/*
* Configuration specific probe routines
@@ -156,8 +154,8 @@ console_tbl Console_Port_Tbl[] = {
MC68681_ADDR, /* ulCtrlPort1 */
MC68681_PORT1_ADDR, /* ulCtrlPort2 */
MC68681_PORT_CONFIG, /* ulDataPort */
- Read_mc68681_register, /* getRegister */
- Write_mc68681_register, /* setRegister */
+ mc68681_get_register_8, /* getRegister */
+ mc68681_set_register_8, /* setRegister */
NULL, /* unused */ /* getData */
NULL, /* unused */ /* setData */
(unsigned32)dmv177_mc68681_baud_table, /* ulClock */
@@ -175,8 +173,8 @@ console_tbl Console_Port_Tbl[] = {
MC68681_ADDR, /* ulCtrlPort1 */
MC68681_PORT2_ADDR, /* ulCtrlPort2 */
MC68681_PORT_CONFIG, /* ulDataPort */
- Read_mc68681_register, /* getRegister */
- Write_mc68681_register, /* setRegister */
+ mc68681_get_register_8, /* getRegister */
+ mc68681_set_register_8, /* setRegister */
NULL, /* unused */ /* getData */
NULL, /* unused */ /* setData */
(unsigned32)dmv177_mc68681_baud_table, /* ulClock */
@@ -194,10 +192,10 @@ console_tbl Console_Port_Tbl[] = {
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_get_register, /* getRegister */
+ z85c30_set_register, /* setRegister */
+ z85c30_get_data, /* getData */
+ z85c30_set_data, /* setData */
Z85C30_CLOCK, /* ulClock */
DMV170_SCC_IRQ /* ulIntVector */
},
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c b/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c
index df2f9ccb57..176c73c6c6 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c
+++ b/c/src/lib/libbsp/powerpc/dmv177/console/conscfg.c
@@ -13,8 +13,6 @@
#include <libchip/serial.h>
#include <libchip/mc68681.h>
#include <libchip/z85c30.h>
-#include "mc68681cfg.h"
-#include "z85c30cfg.h"
/*
* Configuration specific probe routines
@@ -156,8 +154,8 @@ console_tbl Console_Port_Tbl[] = {
MC68681_ADDR, /* ulCtrlPort1 */
MC68681_PORT1_ADDR, /* ulCtrlPort2 */
MC68681_PORT_CONFIG, /* ulDataPort */
- Read_mc68681_register, /* getRegister */
- Write_mc68681_register, /* setRegister */
+ mc68681_get_register_8, /* getRegister */
+ mc68681_set_register_8, /* setRegister */
NULL, /* unused */ /* getData */
NULL, /* unused */ /* setData */
(unsigned32)dmv177_mc68681_baud_table, /* ulClock */
@@ -175,8 +173,8 @@ console_tbl Console_Port_Tbl[] = {
MC68681_ADDR, /* ulCtrlPort1 */
MC68681_PORT2_ADDR, /* ulCtrlPort2 */
MC68681_PORT_CONFIG, /* ulDataPort */
- Read_mc68681_register, /* getRegister */
- Write_mc68681_register, /* setRegister */
+ mc68681_get_register_8, /* getRegister */
+ mc68681_set_register_8, /* setRegister */
NULL, /* unused */ /* getData */
NULL, /* unused */ /* setData */
(unsigned32)dmv177_mc68681_baud_table, /* ulClock */
@@ -194,10 +192,10 @@ console_tbl Console_Port_Tbl[] = {
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_get_register, /* getRegister */
+ z85c30_set_register, /* setRegister */
+ z85c30_get_data, /* getData */
+ z85c30_set_data, /* setData */
Z85C30_CLOCK, /* ulClock */
DMV170_SCC_IRQ /* ulIntVector */
},
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c b/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c
deleted file mode 100644
index 0ea7243546..0000000000
--- a/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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;
-}
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.h b/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.h
deleted file mode 100644
index 3dd113b3a7..0000000000
--- a/c/src/lib/libbsp/powerpc/dmv177/console/mc68681cfg.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * This include file contains all console driver definitions for the
- * Motorola MC68681 compatible DUART used as the first two serial
- * ports on the DMV177.
- *
- * 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 in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __MC68681_CONFIG_H
-#define __MC68681_CONFIG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Board specific register access routines
- */
-
-unsigned8 Read_mc68681_register(
- unsigned32 ulCtrlPort,
- unsigned8 ucRegNum
-);
-
-void Write_mc68681_register(
- unsigned32 ulCtrlPort,
- unsigned8 ucRegNum,
- unsigned8 ucData
-);
-
-unsigned8 Read_mc68681_data(
- unsigned32 ulDataPort
-);
-
-void Write_mc68681_data(
- unsigned32 ulDataPort,
- unsigned8 ucData
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.c b/c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.c
deleted file mode 100644
index fd27765850..0000000000
--- a/c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * This file contains the console driver chip level routines for the
- * z85c30 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>
-
-/*PAGE
- *
- * Read_z85c30_register
- */
-
-unsigned8 Read_z85c30_register(
- unsigned32 ulCtrlPort,
- unsigned8 ucRegNum
-)
-{
- unsigned8 *port;
-
- port = (unsigned8 *)ulCtrlPort;
-
- if(ucRegNum) {
- *port = ucRegNum;
- }
- return *port;
-
-}
-
-/*PAGE
- *
- * Write_z85c30_register
- */
-
-void Write_z85c30_register(
- unsigned32 ulCtrlPort,
- unsigned8 ucRegNum,
- unsigned8 ucData
-)
-{
- unsigned8 *port;
-
- port = (unsigned8 *)ulCtrlPort;
-
- if(ucRegNum) {
- *port = ucRegNum;
- }
- *port = ucData;
-}
-
-/*PAGE
- *
- * Read_z85c30_data
- */
-
-unsigned8 Read_z85c30_data(
- unsigned32 ulDataPort
-)
-{
- unsigned8 *port;
-
- port = (unsigned8 *)ulDataPort;
- return *port;
-}
-
-/*PAGE
- *
- * Write_z85c30_data
- */
-
-void Write_z85c30_data(
- unsigned32 ulDataPort,
- unsigned8 ucData
-)
-{
- unsigned8 *port;
-
- port = (unsigned8 *)ulDataPort;
- *port = ucData;
-}
-
-
-
-
-
-
diff --git a/c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.h b/c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.h
deleted file mode 100644
index 63ad0fce6c..0000000000
--- a/c/src/lib/libbsp/powerpc/dmv177/console/z85c30cfg.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This include file contains all console driver definitions for the z85c30
- *
- * 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 in
- * the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __Z85C30_CONFIG_H
-#define __Z85C30_CONFIG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Board specific register access routines
- */
-
-unsigned8 Read_z85c30_register(
- unsigned32 ulCtrlPort,
- unsigned8 ucRegNum
-);
-
-void Write_z85c30_register(
- unsigned32 ulCtrlPort,
- unsigned8 ucRegNum,
- unsigned8 ucData
-);
-
-unsigned8 Read_z85c30_data(
- unsigned32 ulDataPort
-);
-
-void Write_z85c30_data(
- unsigned32 ulDataPort,
- unsigned8 ucData
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif