From 591a6794e2aa8385211ad6dd424d91ea7c901ac4 Mon Sep 17 00:00:00 2001 From: matthias Date: Sun, 24 Nov 1996 13:34:44 +0000 Subject: [PATCH] * A few changes to support the new softint mechanism. --- sys/arch/pc532/include/icu.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/arch/pc532/include/icu.h b/sys/arch/pc532/include/icu.h index ebe6568c5550..1aa1ea48242f 100644 --- a/sys/arch/pc532/include/icu.h +++ b/sys/arch/pc532/include/icu.h @@ -1,4 +1,4 @@ -/* $NetBSD: icu.h,v 1.8 1996/10/09 07:28:47 matthias Exp $ */ +/* $NetBSD: icu.h,v 1.9 1996/11/24 13:34:44 matthias Exp $ */ /* * Copyright (c) 1993 Philip A. Nelson. @@ -76,6 +76,16 @@ #define ICUB(n) *((unsigned char *)(ICU_ADR + n)) #define ICUW(n) *((unsigned short *)(ICU_ADR + n)) +/* + * ICU IPND register; + * induce h/w interrupt condition atomicly by poking magic value + * into IPND (Interrupt pending register). + */ +#define IPND_SET 0x80 +#define IPND_CLR 0x00 +#define setsofticu(ir) (ICUB(IPND + (((ir) < 8) ? 0 : 1)) = (IPND_SET + (ir))) +#define clrsofticu(ir) (ICUB(IPND + (((ir) < 8) ? 0 : 1)) = (IPND_CLR + (ir))) + #ifndef _LOCORE /* Interrupt trigger modes */ @@ -95,6 +105,7 @@ enum {HIGH_LEVEL, LOW_LEVEL, RISING_EDGE, FALLING_EDGE} int_modes; #define IR_TTY2RDY 8 #define IR_TTY3 7 #define IR_TTY3RDY 6 +#define IR_SOFT 14 /* edge polarity * 0 0 falling edge @@ -125,7 +136,7 @@ scsi_select_ctlr(int ctlr) old = (ICUB(PDAT) & ICU_SCSI_BIT) == 0; if (ctlr == DP8490) - ICUB(PDAT) &= ~ICU_SCSI_BIT; /* select = 0 for 8490 */ + ICUB(PDAT) &= ~ICU_SCSI_BIT; /* select = 0 for dp8490 */ else ICUB(PDAT) |= ICU_SCSI_BIT; /* select = 1 for AIC6250 */ return(old);