/* $NetBSD: am79900.c,v 1.17 2005/12/24 20:27:29 perry Exp $ */
/* $FreeBSD: src/sys/dev/le/am79900.c,v 1.3 2006/05/16 21:04:01 marius Exp $ */
-/* $DragonFly: src/sys/dev/netif/lnc/am79900.c,v 1.5 2008/05/14 11:59:20 sephe Exp $ */
-
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
struct lermd rmd;
uint32_t rmd1;
int bix, rp;
-#if defined(__i386__) && !defined(PC98)
+#if defined(__i386__)
struct ether_header *eh;
#endif
/* $NetBSD: i82365reg.h,v 1.3 1998/12/20 17:53:28 nathanw Exp $ */
/* $FreeBSD: src/sys/dev/exca/excareg.h,v 1.5 2005/01/06 01:42:40 imp Exp $ */
-/* $DragonFly: src/sys/dev/pccard/exca/excareg.h,v 1.3 2007/07/05 12:08:54 sephe Exp $ */
/*-
* Copyright (c) 2002 M Warner Losh. All rights reserved.
#define EXCA_PNP_82365_CARDBUS 0x030ED041 /* PNP0E03 */
#define EXCA_PNP_SCM_SWAPBOX 0x69046d4c /* SMC0469 */
-/* C-Bus PnP Definitions */
-#define EXCA_NEC_PC9801_102 0x9180a3b8 /* NEC8091 PC-9801-102 */
-#define EXCA_NEC_PC9821RA_E01 0x2181a3b8 /* NEC8121 PC-9821RA-E01 */
-
/*
* Mask of allowable interrupts.
*
* cbus add-in cards. He has confirmed this routing with a visual
* inspection of his card or a VOM.
*/
-#ifdef PC98
-#define EXCA_INT_MASK_ALLOWED 0x3E68 /* PC98 */
-#else
#define EXCA_INT_MASK_ALLOWED 0xDEB8 /* AT */
-#endif
#endif /* !_SYS_DEV_EXCA_EXCAREG_H */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/sound/isa/mss.c,v 1.95.2.3 2006/04/04 17:30:59 ariff Exp $
- * $DragonFly: src/sys/dev/sound/isa/mss.c,v 1.11 2007/06/16 20:07:18 dillon Exp $
*/
#include <dev/sound/pcm/sound.h>
/* prototypes for local functions */
static int mss_detect(device_t dev, struct mss_info *mss);
-#ifndef PC98
static int opti_detect(device_t dev, struct mss_info *mss);
-#endif
static char *ymf_test(device_t dev, struct mss_info *mss);
static void ad_unmute(struct mss_info *mss);
/* OPTi-specific functions */
static void opti_write(struct mss_info *mss, u_char reg,
u_char data);
-#ifndef PC98
static u_char opti_read(struct mss_info *mss, u_char reg);
-#endif
static int opti_init(device_t dev, struct mss_info *mss);
/* io primitives */
name = "AD1848";
mss->bd_id = MD_AD1848; /* AD1848 or CS4248 */
-#ifndef PC98
if (opti_detect(dev, mss)) {
switch (mss->bd_id) {
case MD_OPTI924:
kprintf("Found OPTi device %s\n", name);
if (opti_init(dev, mss) == 0) goto gotit;
}
-#endif
/*
* Check that the I/O address is in use.
return ENXIO;
}
-#ifndef PC98
static int
opti_detect(device_t dev, struct mss_info *mss)
{
}
return 0;
}
-#endif
static char *
ymf_test(device_t dev, struct mss_info *mss)
if (!j) {
bus_release_resource(dev, SYS_RES_IOPORT,
mss->conf_rid, mss->conf_base);
-#ifdef PC98
- /* PC98 need this. I don't know reason why. */
- bus_delete_resource(dev, SYS_RES_IOPORT, mss->conf_rid);
-#endif
mss->conf_base = 0;
continue;
}
rdma = rman_get_start(mss->drq2);
if (flags & DV_F_TRUE_MSS) {
/* has IRQ/DMA registers, set IRQ and DMA addr */
-#ifdef PC98 /* CS423[12] in PC98 can use IRQ3,5,10,12 */
- static char interrupt_bits[13] =
- {-1, -1, -1, 0x08, -1, 0x10, -1, -1, -1, -1, 0x18, -1, 0x20};
-#else
static char interrupt_bits[12] =
{-1, -1, -1, -1, -1, 0x28, -1, 0x08, -1, 0x10, 0x18, 0x20};
-#endif
static char pdma_bits[4] = {1, 2, -1, 3};
static char valid_rdma[4] = {1, 0, -1, 0};
char bits;
if (!mss->irq || (bits = interrupt_bits[rman_get_start(mss->irq)]) == -1)
goto no;
-#ifndef PC98 /* CS423[12] in PC98 don't support this. */
io_wr(mss, 0, bits | 0x40); /* config port */
if ((io_rd(mss, 3) & 0x40) == 0) device_printf(dev, "IRQ Conflict?\n");
-#endif
/* Write IRQ+DMA setup */
if (pdma_bits[pdma] == -1) goto no;
bits |= pdma_bits[pdma];
}
}
-#ifndef PC98
u_char
opti_read(struct mss_info *mss, u_char reg)
{
}
return -1;
}
-#endif
static device_method_t pnpmss_methods[] = {
/* Device interface */
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/sound/isa/mss.h,v 1.12 2005/01/06 01:43:17 imp Exp $
- * $DragonFly: src/sys/dev/sound/isa/mss.h,v 1.4 2007/01/04 21:47:02 corecode Exp $
*/
/*
MIX_NONE(SOUND_MIXER_VOLUME),
MIX_NONE(SOUND_MIXER_BASS),
MIX_NONE(SOUND_MIXER_TREBLE),
-#ifdef PC98 /* PC98's synth is assigned to AUX#2 */
-MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5),
-#else /* AT386's synth is assigned to AUX#1 */
MIX_ENT(SOUND_MIXER_SYNTH, 2, 1, 0, 5, 3, 1, 0, 5),
-#endif
MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6),
MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0),
MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5),
MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1),
-#ifdef PC98 /* PC98's cd-audio is assigned to AUX#1 */
-MIX_ENT(SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5),
-#else /* AT386's cd-audio is assigned to AUX#2 */
MIX_ENT(SOUND_MIXER_CD, 4, 1, 0, 5, 5, 1, 0, 5),
-#endif
MIX_ENT(SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0),
MIX_NONE(SOUND_MIXER_ALTPCM),
MIX_NONE(SOUND_MIXER_RECLEV),
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/sound/isa/sbc.c,v 1.44.2.1 2005/12/30 19:55:53 netchild Exp $
- * $DragonFly: src/sys/dev/sound/isa/sbc.c,v 1.10 2007/06/16 20:07:18 dillon Exp $
*/
#include <dev/sound/chip.h>
static int io_range[3] = {0x10, 0x2, 0x4};
-#ifdef PC98 /* I/O address table for PC98 */
-static bus_addr_t pcm_iat[] = {
- 0x000, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700,
- 0x800, 0x900, 0xa00, 0xb00, 0xc00, 0xd00, 0xe00, 0xf00
-};
-static bus_addr_t midi_iat[] = {
- 0x000, 0x100
-};
-static bus_addr_t opl_iat[] = {
- 0x000, 0x100, 0x200, 0x300
-};
-static bus_addr_t *sb_iat[] = { pcm_iat, midi_iat, opl_iat };
-#endif
-
static int sb_rd(struct resource *io, int reg);
static void sb_wr(struct resource *io, int reg, u_int8_t val);
static int sb_dspready(struct resource *io);
int rid = 0, ver;
struct resource *io;
-#ifdef PC98
- io = isa_alloc_resourcev(dev, SYS_RES_IOPORT, &rid,
- pcm_iat, 16, RF_ACTIVE);
-#else
io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
0, ~0, 16, RF_ACTIVE);
-#endif
if (!io) goto bad;
-#ifdef PC98
- isa_load_resourcev(io, pcm_iat, 16);
-#endif
if (sb_reset_dsp(io)) goto bad2;
ver = sb_identify_board(io);
if (ver == 0) goto bad2;
/* soft irq/dma configuration */
x = -1;
irq = rman_get_start(scp->irq[0]);
-#ifdef PC98
- /* SB16 in PC98 use different IRQ table */
- if (irq == 3) x = 1;
- else if (irq == 5) x = 8;
- else if (irq == 10) x = 2;
- else if (irq == 12) x = 4;
- if (x == -1) {
- err = "bad irq (3/5/10/12 valid)";
- goto bad;
- }
- else sb_setmixer(scp->io[0], IRQ_NR, x);
- /* SB16 in PC98 use different dma setting */
- sb_setmixer(scp->io[0], DMA_NR, dh == 0 ? 1 : 2);
-#else
if (irq == 5) x = 2;
else if (irq == 7) x = 4;
else if (irq == 9) x = 1;
}
else sb_setmixer(scp->io[0], IRQ_NR, x);
sb_setmixer(scp->io[0], DMA_NR, (1 << dh) | (1 << dl));
-#endif
if (bootverbose) {
device_printf(dev, "setting card to irq %d, drq %d", irq, dl);
if (dl != dh) kprintf(", %d", dh);
struct sbc_softc *scp;
int *alloced, rid_max, alloced_max;
struct resource **res;
-#ifdef PC98
- int i;
-#endif
scp = device_get_softc(bus);
switch (type) {
case SYS_RES_IOPORT:
alloced = scp->io_alloced;
res = scp->io;
-#ifdef PC98
- rid_max = 0;
- for (i = 0; i < IO_MAX; i++)
- rid_max += io_range[i];
-#else
rid_max = IO_MAX - 1;
-#endif
alloced_max = 1;
break;
case SYS_RES_DRQ:
for (i = 0 ; i < IO_MAX ; i++) {
if (scp->io[i] == NULL) {
-#ifdef PC98
- scp->io_rid[i] = i > 0 ?
- scp->io_rid[i - 1] + io_range[i - 1] : 0;
- scp->io[i] = isa_alloc_resourcev(scp->dev,
- SYS_RES_IOPORT,
- &scp->io_rid[i],
- sb_iat[i],
- io_range[i],
- RF_ACTIVE);
- if (scp->io[i] != NULL)
- isa_load_resourcev(scp->io[i], sb_iat[i],
- io_range[i]);
-#else
scp->io_rid[i] = i;
scp->io[i] = bus_alloc_resource(scp->dev, SYS_RES_IOPORT, &scp->io_rid[i],
0, ~0, io_range[i], RF_ACTIVE);
-#endif
if (i == 0 && scp->io[i] == NULL)
return (1);
scp->io_alloced[i] = 0;
# ----------------------------------------------------------------------------
#
# $FreeBSD: src/tools/tools/kerninclude/kerninclude.sh,v 1.1.2.1 2001/03/05 12:18:27 kris Exp $
-# $DragonFly: src/tools/tools/kerninclude/kerninclude.sh,v 1.2 2003/06/17 04:29:11 dillon Exp $
#
# This script tries to find #include statements which are not needed in
# the FreeBSD kernel tree.
init=false
# Which kernels you want to check
-kernels="LINT GENERIC GENERIC98"
+kernels="LINT GENERIC"
NO_MODULES=yes
export NO_MODULES
config GENERIC
fi
)
-(
- cd pc98/conf
- cp -f GENERIC GENERIC98
- if $init ; then
- config -r GENERIC98
- else
- config GENERIC98
- fi
-)
for i in $kernels
do