Switched to usign the default z8530 and mc68681 register access routines.

This commit is contained in:
Joel Sherrill
1998-07-15 23:55:04 +00:00
parent 8414c033e2
commit 670d0378e7
7 changed files with 17 additions and 272 deletions

View File

@@ -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)

View File

@@ -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 */
},

View File

@@ -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 */
},

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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