summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/arc/arc/conf.c8
-rw-r--r--sys/arch/arc/conf/PICA2
-rw-r--r--sys/arch/arc/conf/files.arc8
-rw-r--r--sys/arch/arc/dev/ace.c68
-rw-r--r--sys/arch/arc/include/bus.h10
5 files changed, 50 insertions, 46 deletions
diff --git a/sys/arch/arc/arc/conf.c b/sys/arch/arc/arc/conf.c
index 7bfd2009c58..e347c030248 100644
--- a/sys/arch/arc/arc/conf.c
+++ b/sys/arch/arc/arc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.1 1996/06/24 09:07:20 pefo Exp $ */
+/* $OpenBSD: conf.c,v 1.2 1996/06/24 20:05:34 pefo Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.c 8.2 (Berkeley) 11/14/93
- * $Id: conf.c,v 1.1 1996/06/24 09:07:20 pefo Exp $
+ * $Id: conf.c,v 1.2 1996/06/24 20:05:34 pefo Exp $
*/
#include <sys/param.h>
@@ -168,7 +168,7 @@ struct cdevsw cdevsw[] =
cdev_pc_init(NPC,pc), /* 14: builtin pc style console dev */
cdev_mouse_init(1,pms), /* 15: builtin PS2 style mouse */
cdev_lpt_init(NLPT,lpt), /* 16: lpt paralell printer interface */
- cdev_tty_init(NCOM,ace), /* 17: ace 16C450 serial interface */
+ cdev_tty_init(NACE,ace), /* 17: ace 16C450 serial interface */
cdev_notdef(), /* 18: */
cdev_notdef(), /* 19: */
cdev_tty_init(NPTY,pts), /* 20: pseudo-tty slave */
@@ -323,7 +323,7 @@ struct consdev constab[] = {
#if NPC + NVT > 0
cons_init(pc),
#endif
-#if NCOM > 0
+#if NACE > 0
cons_init(ace),
#endif
{ 0 },
diff --git a/sys/arch/arc/conf/PICA b/sys/arch/arc/conf/PICA
index 9251c84728d..03718922ed1 100644
--- a/sys/arch/arc/conf/PICA
+++ b/sys/arch/arc/conf/PICA
@@ -73,7 +73,7 @@ pc0 at pica?
pms0 at pica?
ace0 at pica?
ace1 at pica?
-lpt0 at pica?
+lpr0 at pica?
sn0 at pica?
fdc0 at pica?
diff --git a/sys/arch/arc/conf/files.arc b/sys/arch/arc/conf/files.arc
index 3d57f328b3c..24bc6c15356 100644
--- a/sys/arch/arc/conf/files.arc
+++ b/sys/arch/arc/conf/files.arc
@@ -1,4 +1,4 @@
-# $OpenBSD: files.arc,v 1.1 1996/06/24 09:07:20 pefo Exp $
+# $OpenBSD: files.arc,v 1.2 1996/06/24 20:05:35 pefo Exp $
#
# maxpartitions must be first item in files.${ARCH}
#
@@ -111,6 +111,12 @@ attach ace at commulti with ace_commulti
attach ace at pica with ace_pica
file arch/arc/dev/ace.c ace & (ace_isa | ace_commulti | ace_pica) needs-flag
+# Parallel ports (XXX what chip?)
+device lpr
+attach lpr at isa with lpr_isa
+attach lpr at pica with lpr_pica
+file arch/arc/dev/lpr.c lpr & (lpr_isa | lpr_pica) needs-flag
+
#
file dev/cons.c
diff --git a/sys/arch/arc/dev/ace.c b/sys/arch/arc/dev/ace.c
index a285e748ff7..ef0bd7dcb13 100644
--- a/sys/arch/arc/dev/ace.c
+++ b/sys/arch/arc/dev/ace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ace.c,v 1.1 1996/06/24 09:07:19 pefo Exp $ */
+/* $OpenBSD: ace.c,v 1.2 1996/06/24 20:05:35 pefo Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*-
@@ -69,7 +69,7 @@
#endif
#define com_lcr com_cfcr
-#include "com.h"
+#include "ace.h"
#define COM_IBUFSIZE (2 * 512)
@@ -129,11 +129,11 @@ cdev_decl(com);
bdev_decl(com);
struct consdev;
-void comcnprobe __P((struct consdev *));
-void comcninit __P((struct consdev *));
-int comcngetc __P((dev_t));
-void comcnputc __P((dev_t, int));
-void comcnpollc __P((dev_t, int));
+void acecnprobe __P((struct consdev *));
+void acecninit __P((struct consdev *));
+int acecngetc __P((dev_t));
+void acecnputc __P((dev_t, int));
+void acecnpollc __P((dev_t, int));
static u_char tiocm_xxx2mcr __P((int));
@@ -169,7 +169,7 @@ struct cfattach ace_pica_ca = {
struct cfdriver ace_cd = {
- NULL, "com", DV_TTY
+ NULL, "ace", DV_TTY
};
void cominit __P((bus_chipset_tag_t, bus_io_handle_t, int));
@@ -777,7 +777,7 @@ comattach(parent, self, aux)
}
int
-comopen(dev, flag, mode, p)
+aceopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
@@ -790,9 +790,9 @@ comopen(dev, flag, mode, p)
int s;
int error = 0;
- if (unit >= com_cd.cd_ndevs)
+ if (unit >= ace_cd.cd_ndevs)
return ENXIO;
- sc = com_cd.cd_devs[unit];
+ sc = ace_cd.cd_devs[unit];
if (!sc || ISSET(sc->sc_hwflags, COM_HW_ABSENT|COM_HW_ABSENT_PENDING))
return ENXIO;
@@ -916,13 +916,13 @@ comopen(dev, flag, mode, p)
}
int
-comclose(dev, flag, mode, p)
+aceclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
{
int unit = COMUNIT(dev);
- struct com_softc *sc = com_cd.cd_devs[unit];
+ struct com_softc *sc = ace_cd.cd_devs[unit];
struct tty *tp = sc->sc_tty;
bus_chipset_tag_t bc = sc->sc_bc;
bus_io_handle_t ioh = sc->sc_ioh;
@@ -953,7 +953,7 @@ comclose(dev, flag, mode, p)
#ifdef COM_DEBUG
/* mark it ready for more use if reattached earlier */
if (ISSET(sc->sc_hwflags, COM_HW_ABSENT_PENDING)) {
- printf("comclose pending cleared\n");
+ printf("aceclose pending cleared\n");
}
#endif
CLR(sc->sc_hwflags, COM_HW_ABSENT_PENDING);
@@ -968,12 +968,12 @@ comclose(dev, flag, mode, p)
}
int
-comread(dev, uio, flag)
+aceread(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
{
- struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)];
+ struct com_softc *sc = ace_cd.cd_devs[COMUNIT(dev)];
struct tty *tp = sc->sc_tty;
if (ISSET(sc->sc_hwflags, COM_HW_ABSENT|COM_HW_ABSENT_PENDING)) {
@@ -987,12 +987,12 @@ comread(dev, uio, flag)
}
int
-comwrite(dev, uio, flag)
+acewrite(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
{
- struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)];
+ struct com_softc *sc = ace_cd.cd_devs[COMUNIT(dev)];
struct tty *tp = sc->sc_tty;
if (ISSET(sc->sc_hwflags, COM_HW_ABSENT|COM_HW_ABSENT_PENDING)) {
@@ -1006,10 +1006,10 @@ comwrite(dev, uio, flag)
}
struct tty *
-comtty(dev)
+acetty(dev)
dev_t dev;
{
- struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)];
+ struct com_softc *sc = ace_cd.cd_devs[COMUNIT(dev)];
struct tty *tp = sc->sc_tty;
return (tp);
@@ -1029,7 +1029,7 @@ tiocm_xxx2mcr(data)
}
int
-comioctl(dev, cmd, data, flag, p)
+aceioctl(dev, cmd, data, flag, p)
dev_t dev;
u_long cmd;
caddr_t data;
@@ -1037,7 +1037,7 @@ comioctl(dev, cmd, data, flag, p)
struct proc *p;
{
int unit = COMUNIT(dev);
- struct com_softc *sc = com_cd.cd_devs[unit];
+ struct com_softc *sc = ace_cd.cd_devs[unit];
struct tty *tp = sc->sc_tty;
bus_chipset_tag_t bc = sc->sc_bc;
bus_io_handle_t ioh = sc->sc_ioh;
@@ -1156,7 +1156,7 @@ comparam(tp, t)
struct tty *tp;
struct termios *t;
{
- struct com_softc *sc = com_cd.cd_devs[COMUNIT(tp->t_dev)];
+ struct com_softc *sc = ace_cd.cd_devs[COMUNIT(tp->t_dev)];
bus_chipset_tag_t bc = sc->sc_bc;
bus_io_handle_t ioh = sc->sc_ioh;
int ospeed = comspeed(t->c_ospeed);
@@ -1314,7 +1314,7 @@ void
comstart(tp)
struct tty *tp;
{
- struct com_softc *sc = com_cd.cd_devs[COMUNIT(tp->t_dev)];
+ struct com_softc *sc = ace_cd.cd_devs[COMUNIT(tp->t_dev)];
bus_chipset_tag_t bc = sc->sc_bc;
bus_io_handle_t ioh = sc->sc_ioh;
int s;
@@ -1385,7 +1385,7 @@ stopped:
* Stop output on a line.
*/
int
-comstop(tp, flag)
+acestop(tp, flag)
struct tty *tp;
int flag;
{
@@ -1447,8 +1447,8 @@ compoll(arg)
comevents = 0;
splx(s);
- for (unit = 0; unit < com_cd.cd_ndevs; unit++) {
- sc = com_cd.cd_devs[unit];
+ for (unit = 0; unit < ace_cd.cd_ndevs; unit++) {
+ sc = ace_cd.cd_devs[unit];
if (sc == 0 || sc->sc_ibufp == sc->sc_ibuf)
continue;
@@ -1648,7 +1648,7 @@ ohfudge:
#include <dev/cons.h>
void
-comcnprobe(cp)
+acecnprobe(cp)
struct consdev *cp;
{
/* XXX NEEDS TO BE FIXED XXX */
@@ -1673,7 +1673,7 @@ comcnprobe(cp)
/* locate the major number */
for (commajor = 0; commajor < nchrdev; commajor++)
- if (cdevsw[commajor].d_open == comopen)
+ if (cdevsw[commajor].d_open == aceopen)
break;
/* initialize required fields */
@@ -1686,7 +1686,7 @@ comcnprobe(cp)
}
void
-comcninit(cp)
+acecninit(cp)
struct consdev *cp;
{
@@ -1695,7 +1695,7 @@ comcninit(cp)
comconsbc = ???;
#endif
if (bus_io_map(comconsbc, CONADDR, COM_NPORTS, &comconsioh))
- panic("comcninit: mapping failed");
+ panic("acecninit: mapping failed");
cominit(comconsbc, comconsioh, comdefaultrate);
comconsaddr = CONADDR;
@@ -1723,7 +1723,7 @@ cominit(bc, ioh, rate)
}
int
-comcngetc(dev)
+acecngetc(dev)
dev_t dev;
{
int s = splhigh();
@@ -1743,7 +1743,7 @@ comcngetc(dev)
* Console kernel output character routine.
*/
void
-comcnputc(dev, c)
+acecnputc(dev, c)
dev_t dev;
int c;
{
@@ -1775,7 +1775,7 @@ comcnputc(dev, c)
}
void
-comcnpollc(dev, on)
+acecnpollc(dev, on)
dev_t dev;
int on;
{
diff --git a/sys/arch/arc/include/bus.h b/sys/arch/arc/include/bus.h
index 8f9d234ac15..49203479164 100644
--- a/sys/arch/arc/include/bus.h
+++ b/sys/arch/arc/include/bus.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: bus.h,v 1.1 1996/06/24 09:07:18 pefo Exp $ */
-/* $NetBSD: bus.h,v 1.2 1996/04/05 23:59:37 thorpej Exp $ */
+/* $OpenBSD: bus.h,v 1.2 1996/06/24 20:05:36 pefo Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -101,10 +100,9 @@ struct arc_isa_busmap {
!!! bus_io_write_multi_8 unimplimented !!!
#endif
-int bus_mem_map __P((bus_chipset_tag_t t, bus_mem_addr_t bpa,
- bus_mem_size_t size, int cacheable, bus_mem_handle_t *mhp));
-void bus_mem_unmap __P((bus_chipset_tag_t t, bus_mem_handle_t memh,
- bus_mem_size_t size));
+#define bus_mem_map(t, addr, size, cacheable, mhp) \
+ (*mhp = (t == NULL ? port : port + (ulong)(t->isa_mem_base)), 0)
+#define bus_mem_unmap(t, ioh, size)
#define bus_mem_read_1(t, h, o) (*(volatile u_int8_t *)((h) + (o)))
#define bus_mem_read_2(t, h, o) (*(volatile u_int16_t *)((h) + (o)))