summaryrefslogtreecommitdiffstats
path: root/sys/dev/hfa
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-10-12 07:42:34 +0000
committerphk <phk@FreeBSD.org>2000-10-12 07:42:34 +0000
commitacecaa1fc20521bb074aac431cdae4193ce27ee6 (patch)
treed6b40770b3946bce9efff1787a71d0a4c5e81e06 /sys/dev/hfa
parent1324e3deb9c9197e7d69099fb8758c7d54d0f5be (diff)
downloadFreeBSD-src-acecaa1fc20521bb074aac431cdae4193ce27ee6.zip
FreeBSD-src-acecaa1fc20521bb074aac431cdae4193ce27ee6.tar.gz
More HARP polishina:
unifdef -UFORE_SBUS -DFORE_PCI s/ATM_KERNEL/_KERNER/g
Diffstat (limited to 'sys/dev/hfa')
-rw-r--r--sys/dev/hfa/fore.h9
-rw-r--r--sys/dev/hfa/fore_aali.h8
-rw-r--r--sys/dev/hfa/fore_command.c6
-rw-r--r--sys/dev/hfa/fore_globals.c13
-rw-r--r--sys/dev/hfa/fore_include.h2
-rw-r--r--sys/dev/hfa/fore_init.c6
-rw-r--r--sys/dev/hfa/fore_intr.c15
-rw-r--r--sys/dev/hfa/fore_load.c21
-rw-r--r--sys/dev/hfa/fore_var.h7
9 files changed, 4 insertions, 83 deletions
diff --git a/sys/dev/hfa/fore.h b/sys/dev/hfa/fore.h
index 0409982..5b43cae 100644
--- a/sys/dev/hfa/fore.h
+++ b/sys/dev/hfa/fore.h
@@ -66,16 +66,7 @@
*/
#define BUF_MIN_VCC 4 /* Minimum for buffer supply calculations */
-#ifdef FORE_SBUS
-#if defined(sun4c)
-#define BUF_DATA_ALIGN 32 /* Fore-required data alignment */
-#elif defined(sun4m)
-#define BUF_DATA_ALIGN 64 /* Fore-required data alignment */
-#endif
-#endif
-#ifdef FORE_PCI
#define BUF_DATA_ALIGN 4 /* Fore-required data alignment */
-#endif
#if defined(BSD)
/*
diff --git a/sys/dev/hfa/fore_aali.h b/sys/dev/hfa/fore_aali.h
index c5bf803..ccf3922 100644
--- a/sys/dev/hfa/fore_aali.h
+++ b/sys/dev/hfa/fore_aali.h
@@ -125,7 +125,7 @@ typedef volatile struct buf_strategy Buf_strategy;
-#ifdef ATM_KERNEL
+#ifdef _KERNEL
/*
* Common Queue Element
*
@@ -333,7 +333,7 @@ typedef volatile unsigned long Cmd_code;
#define CMD_GET_PROM 0x09 /* Get PROM data */
#define CMD_INTR_REQ 0x80 /* Request host interrupt */
-#endif /* ATM_KERNEL */
+#endif /* _KERNEL */
/*
@@ -359,7 +359,7 @@ struct init_parms {
typedef volatile struct init_parms Init_parms;
-#ifdef ATM_KERNEL
+#ifdef _KERNEL
/*
* Structure defining the parameters for the Activate commands
*/
@@ -464,7 +464,7 @@ struct cmd_queue {
#define cmdq_prom cmdq_u.cmdqu_prom
typedef volatile struct cmd_queue Cmd_queue;
-#endif /* ATM_KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/dev/hfa/fore_command.c b/sys/dev/hfa/fore_command.c
index 5823a36..75df3ec 100644
--- a/sys/dev/hfa/fore_command.c
+++ b/sys/dev/hfa/fore_command.c
@@ -94,7 +94,6 @@ fore_cmd_allocate(fup)
}
fup->fu_stats = (Fore_stats *) memp;
-#ifdef FORE_PCI
/*
* Allocate memory for PROM buffer
*/
@@ -103,7 +102,6 @@ fore_cmd_allocate(fup)
return (1);
}
fup->fu_prom = (Fore_prom *) memp;
-#endif
return (0);
}
@@ -312,7 +310,6 @@ fore_cmd_drain(fup)
wakeup((caddr_t)&fup->fu_stats);
break;
-#ifdef FORE_PCI
case CMD_GET_PROM:
if (*hcp->hcq_status & QSTAT_ERROR) {
/*
@@ -353,7 +350,6 @@ fore_cmd_drain(fup)
DMA_FREE_ADDR(fup->fu_prom, fup->fu_promd,
sizeof(Fore_prom), 0);
break;
-#endif /* FORE_PCI */
default:
log(LOG_ERR, "fore_cmd_drain: unknown command %ld\n",
@@ -418,7 +414,6 @@ fore_cmd_free(fup)
fup->fu_stats = NULL;
}
-#ifdef FORE_PCI
/*
* Free the PROM buffer
*/
@@ -426,7 +421,6 @@ fore_cmd_free(fup)
atm_dev_free(fup->fu_prom);
fup->fu_prom = NULL;
}
-#endif
/*
* Free the status words
diff --git a/sys/dev/hfa/fore_globals.c b/sys/dev/hfa/fore_globals.c
index ff8cc6c..b2e14b4 100644
--- a/sys/dev/hfa/fore_globals.c
+++ b/sys/dev/hfa/fore_globals.c
@@ -41,19 +41,6 @@
__RCSID("@(#) $FreeBSD$");
#endif
-
-/*
- * Supported device models
- */
-Fore_device fore_devices[] = {
-#ifdef FORE_SBUS
- {SBA200E_PROM_NAME, DEV_FORE_SBA200E},
- {SBA200_PROM_NAME, DEV_FORE_SBA200},
-#endif
- {""}
-};
-
-
/*
* Device unit table
*/
diff --git a/sys/dev/hfa/fore_include.h b/sys/dev/hfa/fore_include.h
index 4ffe4ce..ef455d5 100644
--- a/sys/dev/hfa/fore_include.h
+++ b/sys/dev/hfa/fore_include.h
@@ -51,10 +51,8 @@
#endif
#endif
-#ifdef FORE_PCI
#include <pci/pcireg.h>
#include <pci/pcivar.h>
-#endif
#include <dev/hfa/fore.h>
#include <dev/hfa/fore_aali.h>
diff --git a/sys/dev/hfa/fore_init.c b/sys/dev/hfa/fore_init.c
index d0e6192..5ec2104 100644
--- a/sys/dev/hfa/fore_init.c
+++ b/sys/dev/hfa/fore_init.c
@@ -45,9 +45,7 @@ __RCSID("@(#) $FreeBSD$");
/*
* Local functions
*/
-#ifdef FORE_PCI
static void fore_get_prom __P((Fore_unit *));
-#endif
/*
@@ -241,14 +239,11 @@ fore_initialize_complete(fup)
*/
fup->fu_flags |= CUF_INITED;
-#ifdef FORE_PCI
fore_get_prom(fup);
-#endif
return;
}
-#ifdef FORE_PCI
/*
* Get device PROM values from CP
*
@@ -311,5 +306,4 @@ fore_get_prom(fup)
return;
}
-#endif /* FORE_PCI */
diff --git a/sys/dev/hfa/fore_intr.c b/sys/dev/hfa/fore_intr.c
index aa7f05c..65eb14f 100644
--- a/sys/dev/hfa/fore_intr.c
+++ b/sys/dev/hfa/fore_intr.c
@@ -129,11 +129,7 @@ fore_intr(arg)
/*
* Has this card issued an interrupt??
*/
-#ifdef FORE_PCI
if (*fup->fu_psr) {
-#else
- if (aap->aali_intr_sent) {
-#endif
/*
* Indicate that we've serviced an interrupt.
@@ -147,20 +143,9 @@ fore_intr(arg)
*/
switch (fup->fu_config.ac_device) {
-#ifdef FORE_SBUS
- case DEV_FORE_SBA200E:
- SBA200E_HCR_SET(*fup->fu_ctlreg, SBA200E_CLR_SBUS_INTR);
- break;
-
- case DEV_FORE_SBA200:
- *fup->fu_ctlreg = SBA200_CLR_SBUS_INTR;
- break;
-#endif
-#ifdef FORE_PCI
case DEV_FORE_PCA200E:
PCA200E_HCR_SET(*fup->fu_ctlreg, PCA200E_CLR_HBUS_INT);
break;
-#endif
}
aap->aali_intr_sent = CP_WRITE(0);
diff --git a/sys/dev/hfa/fore_load.c b/sys/dev/hfa/fore_load.c
index 4748f58..1590891 100644
--- a/sys/dev/hfa/fore_load.c
+++ b/sys/dev/hfa/fore_load.c
@@ -520,26 +520,6 @@ fore_reset(fup)
switch (fup->fu_config.ac_device) {
-#ifdef FORE_SBUS
- case DEV_FORE_SBA200E:
- /*
- * Reset i960 by setting and clearing RESET
- */
- SBA200E_HCR_INIT(*fup->fu_ctlreg, SBA200E_RESET);
- SBA200E_HCR_CLR(*fup->fu_ctlreg, SBA200E_RESET);
- break;
-
- case DEV_FORE_SBA200:
- /*
- * Reset i960 by setting and clearing RESET
- *
- * SBA200 will NOT reset if bit is OR'd in!
- */
- *fup->fu_ctlreg = SBA200_RESET;
- *fup->fu_ctlreg = SBA200_RESET_CLR;
- break;
-#endif /* FORE_SBUS */
-#ifdef FORE_PCI
case DEV_FORE_PCA200E:
/*
* Reset i960 by setting and clearing RESET
@@ -549,7 +529,6 @@ fore_reset(fup)
PCA200E_HCR_CLR(*fup->fu_ctlreg, PCA200E_RESET);
break;
-#endif
}
}
diff --git a/sys/dev/hfa/fore_var.h b/sys/dev/hfa/fore_var.h
index 540ec12..5f844e8 100644
--- a/sys/dev/hfa/fore_var.h
+++ b/sys/dev/hfa/fore_var.h
@@ -164,14 +164,9 @@ typedef struct buf_handle Buf_handle;
struct fore_unit {
Cmn_unit fu_cmn; /* Common unit stuff */
Fore_reg *fu_ctlreg; /* Device control register */
-#ifdef FORE_SBUS
- Fore_reg *fu_intlvl; /* Interrupt level register */
-#endif
-#ifdef FORE_PCI
Fore_reg *fu_imask; /* Interrupt mask register */
Fore_reg *fu_psr; /* PCI specific register */
pcici_t fu_pcitag; /* PCI tag */
-#endif
Fore_mem *fu_ram; /* Device RAM */
u_int fu_ramsize; /* Size of device RAM */
Mon960 *fu_mon; /* Monitor program interface */
@@ -226,10 +221,8 @@ struct fore_unit {
Fore_stats *fu_statsd; /* Device statistics buffer (DMA) */
time_t fu_stats_time; /* Last stats request timestamp */
int fu_stats_ret; /* Stats request return code */
-#ifdef FORE_PCI
Fore_prom *fu_prom; /* Device PROM buffer */
Fore_prom *fu_promd; /* Device PROM buffer (DMA) */
-#endif
struct callout_handle fu_thandle; /* Timer handle */
};
typedef struct fore_unit Fore_unit;
OpenPOWER on IntegriCloud