Add in aic7770.c (EISA/VL Adaptors) and aic7870.c (PCI adaptor) dependancies
for the ahc driver.
This commit is contained in:
parent
5b93488a53
commit
25a2799a2b
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
|
||||
#
|
||||
# $Id: GENERIC,v 1.22 1994/12/18 12:01:40 jkh Exp $
|
||||
# $Id: GENERIC,v 1.23 1995/01/12 15:37:14 jkh Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -42,10 +42,11 @@ disk wd2 at wdc1 drive 0
|
||||
disk wd3 at wdc1 drive 1
|
||||
|
||||
controller ncr0
|
||||
controller ahc0
|
||||
|
||||
controller bt0 at isa? port "IO_BT0" bio irq ? vector btintr
|
||||
controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr
|
||||
controller ahc0 at isa? bio irq ? vector ahcintr
|
||||
controller ahc1 at isa? bio irq ? vector ahcintr
|
||||
controller ahb0 at isa? bio irq ? vector ahbintr
|
||||
controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
|
||||
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.69 1995/01/07 14:51:48 jkh Exp $
|
||||
# $Id: files.i386,v 1.70 1995/01/12 13:05:00 ugen Exp $
|
||||
#
|
||||
i386/apm/apm.c optional apm device-driver
|
||||
i386/apm/apm_setup.s optional apm
|
||||
@ -46,16 +46,18 @@ i386/ibcs2/imgact_coff.c optional ibcs2
|
||||
#i386/ibcs2/imgact_elf.c optional svr4
|
||||
i386/isa/aha1542.c optional aha device-driver
|
||||
i386/isa/aha1742.c optional ahb device-driver
|
||||
aic7770 optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7770/aic7770.c" \
|
||||
aic7xxx optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7xxx/aic7xxx.c" \
|
||||
compile-with "${CC} -o $@ $>" \
|
||||
no-obj no-implicit-rule
|
||||
aic7770_seq.h optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7770/aic7770.seq aic7770" \
|
||||
compile-with "./aic7770 -o $@ $S/gnu/misc/aic7770/aic7770.seq" \
|
||||
aic7xxx_seq.h optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7xxx/aic7xxx.seq aic7xxx" \
|
||||
compile-with "./aic7xxx -o $@ $S/gnu/misc/aic7xxx/aic7xxx.seq" \
|
||||
no-obj no-implicit-rule before-depend
|
||||
i386/isa/aic7770.c optional ahc device-driver \
|
||||
dependancy "aic7770_seq.h"
|
||||
i386/isa/aic7xxx.c optional ahc device-driver \
|
||||
dependancy "aic7xxx_seq.h"
|
||||
i386/isa/aic7770.c optional ahc device-driver
|
||||
i386/pci/aic7870.c optional ahc device-driver
|
||||
i386/isa/aic6360.c optional aic device-driver
|
||||
i386/isa/b004.c optional bqu device-driver
|
||||
i386/isa/bt742a.c optional bt device-driver
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
|
||||
#
|
||||
# $Id: GENERIC,v 1.22 1994/12/18 12:01:40 jkh Exp $
|
||||
# $Id: GENERIC,v 1.23 1995/01/12 15:37:14 jkh Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -42,10 +42,11 @@ disk wd2 at wdc1 drive 0
|
||||
disk wd3 at wdc1 drive 1
|
||||
|
||||
controller ncr0
|
||||
controller ahc0
|
||||
|
||||
controller bt0 at isa? port "IO_BT0" bio irq ? vector btintr
|
||||
controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr
|
||||
controller ahc0 at isa? bio irq ? vector ahcintr
|
||||
controller ahc1 at isa? bio irq ? vector ahcintr
|
||||
controller ahb0 at isa? bio irq ? vector ahbintr
|
||||
controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
|
||||
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.69 1995/01/07 14:51:48 jkh Exp $
|
||||
# $Id: files.i386,v 1.70 1995/01/12 13:05:00 ugen Exp $
|
||||
#
|
||||
i386/apm/apm.c optional apm device-driver
|
||||
i386/apm/apm_setup.s optional apm
|
||||
@ -46,16 +46,18 @@ i386/ibcs2/imgact_coff.c optional ibcs2
|
||||
#i386/ibcs2/imgact_elf.c optional svr4
|
||||
i386/isa/aha1542.c optional aha device-driver
|
||||
i386/isa/aha1742.c optional ahb device-driver
|
||||
aic7770 optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7770/aic7770.c" \
|
||||
aic7xxx optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7xxx/aic7xxx.c" \
|
||||
compile-with "${CC} -o $@ $>" \
|
||||
no-obj no-implicit-rule
|
||||
aic7770_seq.h optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7770/aic7770.seq aic7770" \
|
||||
compile-with "./aic7770 -o $@ $S/gnu/misc/aic7770/aic7770.seq" \
|
||||
aic7xxx_seq.h optional ahc device-driver \
|
||||
dependancy "$S/gnu/misc/aic7xxx/aic7xxx.seq aic7xxx" \
|
||||
compile-with "./aic7xxx -o $@ $S/gnu/misc/aic7xxx/aic7xxx.seq" \
|
||||
no-obj no-implicit-rule before-depend
|
||||
i386/isa/aic7770.c optional ahc device-driver \
|
||||
dependancy "aic7770_seq.h"
|
||||
i386/isa/aic7xxx.c optional ahc device-driver \
|
||||
dependancy "aic7xxx_seq.h"
|
||||
i386/isa/aic7770.c optional ahc device-driver
|
||||
i386/pci/aic7870.c optional ahc device-driver
|
||||
i386/isa/aic6360.c optional aic device-driver
|
||||
i386/isa/b004.c optional bqu device-driver
|
||||
i386/isa/bt742a.c optional bt device-driver
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
89
sys/i386/pci/aic7870.c
Normal file
89
sys/i386/pci/aic7870.c
Normal file
@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Product specific probe and attach routines for:
|
||||
* 294X and aic7870 motherboard SCSI controllers
|
||||
*
|
||||
* Copyright (c) 1995 Justin T. Gibbs
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice immediately at the beginning of the file, without modification,
|
||||
* this list of conditions, and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Absolutely no warranty of function or purpose is made by the author
|
||||
* Justin T. Gibbs.
|
||||
* 4. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*/
|
||||
|
||||
#include <pci.h>
|
||||
#if NPCI > 0
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <scsi/scsi_all.h>
|
||||
#include <scsi/scsiconf.h>
|
||||
#include <i386/pci/pcireg.h>
|
||||
#include <i386/scsi/aic7xxx.h>
|
||||
|
||||
#define PCI_BASEADR0 PCI_MAP_REG_START
|
||||
#define PCI_DEVICE_ID_ADAPTEC_2940 0x71789004ul
|
||||
|
||||
static char* aic7870_probe __P((pcici_t tag, pcidi_t type));
|
||||
void aic7870_attach __P((pcici_t config_id, int unit));
|
||||
|
||||
static u_long aic7870_count;
|
||||
|
||||
struct pci_driver ahc_device = {
|
||||
aic7870_probe,
|
||||
aic7870_attach,
|
||||
&aic7870_count
|
||||
};
|
||||
|
||||
static char*
|
||||
aic7870_probe (pcici_t tag, pcidi_t type)
|
||||
{
|
||||
switch(type) {
|
||||
case PCI_DEVICE_ID_ADAPTEC_2940:
|
||||
return ("Adaptec 294X SCSI host adapter");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return (0);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
aic7870_attach(config_id, unit)
|
||||
pcici_t config_id;
|
||||
int unit;
|
||||
{
|
||||
u_long io_port;
|
||||
if(!(io_port = pci_conf_read(config_id, PCI_BASEADR0)))
|
||||
return;
|
||||
io_port -= 0xc01ul; /*
|
||||
printf("io_port = 0x%lx\n", io_port);
|
||||
* Make the offsets the same as for EISA
|
||||
* The first bit of PCI_BASEADR0 is always
|
||||
* set hence we subtract 0xc01 instead of the
|
||||
* 0xc00 that you would expect.
|
||||
*/
|
||||
if(ahcprobe(unit, io_port, AHC_294)){
|
||||
ahc_unit++;
|
||||
if(ahc_attach(unit))
|
||||
/*
|
||||
* To be compatible with the isa style of
|
||||
* interrupt handler, we pass the unit number
|
||||
* not a pointer to our per device structure.
|
||||
*/
|
||||
pci_map_int (config_id, ahcintr, (void *)unit,
|
||||
&bio_imask);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* NPCI > 0 */
|
@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: pci_config.c,v 1.8 1994/10/12 11:06:49 se Exp $
|
||||
** $Id: pci_config.c,v 1.9 1994/10/13 01:12:30 se Exp $
|
||||
**
|
||||
** @PCI@ this should be part of "ioconf.c".
|
||||
**
|
||||
@ -48,6 +48,11 @@ extern struct pci_driver ncr_device;
|
||||
extern struct pci_driver dedevice;
|
||||
#endif
|
||||
|
||||
#include <ahc.h>
|
||||
#if NAHC > 0
|
||||
extern struct pci_driver ahc_device;
|
||||
#endif
|
||||
|
||||
extern struct pci_driver chipset_device;
|
||||
extern struct pci_driver vga_device;
|
||||
extern struct pci_driver ign_device;
|
||||
@ -63,6 +68,10 @@ struct pci_device pci_devtab[] = {
|
||||
{&dedevice, "de", 0 },
|
||||
#endif
|
||||
|
||||
#if NAHC>0
|
||||
{&ahc_device, "ahc", 0 },
|
||||
#endif
|
||||
|
||||
{&chipset_device, "chip", 0 },
|
||||
{&vga_device, "graphics", 0 },
|
||||
{&ign_device, "ign", 0 },
|
||||
|
89
sys/pci/aic7870.c
Normal file
89
sys/pci/aic7870.c
Normal file
@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Product specific probe and attach routines for:
|
||||
* 294X and aic7870 motherboard SCSI controllers
|
||||
*
|
||||
* Copyright (c) 1995 Justin T. Gibbs
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice immediately at the beginning of the file, without modification,
|
||||
* this list of conditions, and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Absolutely no warranty of function or purpose is made by the author
|
||||
* Justin T. Gibbs.
|
||||
* 4. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*/
|
||||
|
||||
#include <pci.h>
|
||||
#if NPCI > 0
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <scsi/scsi_all.h>
|
||||
#include <scsi/scsiconf.h>
|
||||
#include <i386/pci/pcireg.h>
|
||||
#include <i386/scsi/aic7xxx.h>
|
||||
|
||||
#define PCI_BASEADR0 PCI_MAP_REG_START
|
||||
#define PCI_DEVICE_ID_ADAPTEC_2940 0x71789004ul
|
||||
|
||||
static char* aic7870_probe __P((pcici_t tag, pcidi_t type));
|
||||
void aic7870_attach __P((pcici_t config_id, int unit));
|
||||
|
||||
static u_long aic7870_count;
|
||||
|
||||
struct pci_driver ahc_device = {
|
||||
aic7870_probe,
|
||||
aic7870_attach,
|
||||
&aic7870_count
|
||||
};
|
||||
|
||||
static char*
|
||||
aic7870_probe (pcici_t tag, pcidi_t type)
|
||||
{
|
||||
switch(type) {
|
||||
case PCI_DEVICE_ID_ADAPTEC_2940:
|
||||
return ("Adaptec 294X SCSI host adapter");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return (0);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
aic7870_attach(config_id, unit)
|
||||
pcici_t config_id;
|
||||
int unit;
|
||||
{
|
||||
u_long io_port;
|
||||
if(!(io_port = pci_conf_read(config_id, PCI_BASEADR0)))
|
||||
return;
|
||||
io_port -= 0xc01ul; /*
|
||||
printf("io_port = 0x%lx\n", io_port);
|
||||
* Make the offsets the same as for EISA
|
||||
* The first bit of PCI_BASEADR0 is always
|
||||
* set hence we subtract 0xc01 instead of the
|
||||
* 0xc00 that you would expect.
|
||||
*/
|
||||
if(ahcprobe(unit, io_port, AHC_294)){
|
||||
ahc_unit++;
|
||||
if(ahc_attach(unit))
|
||||
/*
|
||||
* To be compatible with the isa style of
|
||||
* interrupt handler, we pass the unit number
|
||||
* not a pointer to our per device structure.
|
||||
*/
|
||||
pci_map_int (config_id, ahcintr, (void *)unit,
|
||||
&bio_imask);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* NPCI > 0 */
|
Loading…
Reference in New Issue
Block a user