From: hvozda Date: Fri, 26 Jan 1996 21:27:30 +0000 (+0000) Subject: Better config symantics (elimitates 'options PCMCIA_*'; thanks Theo). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2a098214273632fb9af928fa5041a1e202b5749c;p=openbsd Better config symantics (elimitates 'options PCMCIA_*'; thanks Theo). Also a example kernel demonstrating how to configure PCMCIA devices. --- diff --git a/sys/arch/i386/conf/HELIOS_PCMCIA b/sys/arch/i386/conf/HELIOS_PCMCIA new file mode 100644 index 00000000000..b9ec7f51d96 --- /dev/null +++ b/sys/arch/i386/conf/HELIOS_PCMCIA @@ -0,0 +1,83 @@ +# +# HELIOS_PCMCIA -- Eric Hvozda's notebook +# + +machine i386 # architecture, used by config; REQUIRED + +options I486_CPU + +options DUMMY_NOPS # speed hack; recommended +options XSERVER,UCONSOLE +options MACHINE_NONCONTIG + +maxusers 64 # estimated number of users +options TIMEZONE=300 # time zone to adjust RTC time by +options DST=1 # daylight savings time used by RTC + +options SWAPPAGER # paging; REQUIRED +options VNODEPAGER # mmap() of files +options DEVPAGER # mmap() of devices + +options DIAGNOSTIC # internally consistency checks +options KTRACE # system call tracing, a la ktrace(1) + +options COMPAT_NOMID # compatibility with 386BSD, BSDI, NetBSD 0.8, +options COMPAT_09 # NetBSD 0.9, +options COMPAT_10 # NetBSD 1.0, +options COMPAT_43 # and 4.3BSD + +options LKM # loadable kernel modules + +options FFS # UFS +options QUOTA # UFS quotas +options MFS # memory file system + +options NFSCLIENT # Network File System client +options NFSSERVER # Network File System server + +options MSDOSFS # MS-DOS file system +options FDESC # /dev/fd +options FIFO # FIFOs; RECOMMENDED +options KERNFS # /kern +options PROCFS # /proc +options UNION # union file system + +options FDSCRIPTS # secure setuid scripts +#options SETUIDSCRIPTS # secure setuid scripts + +options INET # IP + ICMP + TCP + UDP + +config bsd root on wd0g swap on wd0b dumps on wd0b + +isa0 at root +pci0 at root + +npx0 at isa? port 0xf0 irq 13 # math coprocessor + +pc0 at isa? port 0x60 irq 1 # generic PC console device + +pcic0 at isa? port 0x3E0 flags 0 +pcmciabus0 at isa? iomem 0xd4000 iosiz 4096 +com2 at pcmciabus? port 0x3e8 irq 12 +ed2 at pcmciabus? port 0x300 iomem 0xcc000 irq 10 + +com0 at isa? port 0x3f8 irq 4 # standard PC serial ports +com1 at isa? port 0x2f8 irq 3 + +lpt0 at isa? port 0x378 irq 7 # standard PC parallel ports + +fdc0 at isa? port 0x3f0 irq 6 drq 2 # standard PC floppy controllers +fd0 at fdc? drive 0 + +wdc0 at isa? port 0x1f0 irq 14 # ST506, ESDI, and IDE controllers +wd0 at wdc? drive 0 + +sb0 at isa? port 0x240 irq 5 drq 1 # SoundBlaster + +pseudo-device loop 1 # network loopback +pseudo-device bpfilter 8 # packet filter +pseudo-device sl 2 # CSLIP +pseudo-device ppp 2 # PPP + +pseudo-device pty 64 # pseudo-terminals +pseudo-device vnd 4 # paging to files diff --git a/sys/dev/isa/files.isa b/sys/dev/isa/files.isa index 63981d69dea..29ac9ea2ee6 100644 --- a/sys/dev/isa/files.isa +++ b/sys/dev/isa/files.isa @@ -127,7 +127,7 @@ file dev/isa/elink.c elink # National Semiconductor DS8390/WD83C690-based boards # (WD/SMC 80x3 family, SMC Ultra [8216], 3Com 3C503, NE[12]000, and clones) device ed at isa, pcmciabus: ether, ifnet -file dev/isa/if_ed.c ed +file dev/isa/if_ed.c ed needs-flag # 3Com 3C505 device eg at isa: ether, ifnet @@ -139,7 +139,7 @@ file dev/isa/if_el.c el # 3Com 3C5x9, 3c59x (EtherLink III) family device ep at isa, pci, pcmciabus: ether, ifnet, elink -file dev/isa/if_ep.c ep +file dev/isa/if_ep.c ep needs-flag # Fujitsu MB8696[05]-based boards # (Allied Telesis AT1700) diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c index baae3fecf92..7729774be59 100644 --- a/sys/dev/pcmcia/pcmcia.c +++ b/sys/dev/pcmcia/pcmcia.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcmcia.c,v 1.1 1996/01/15 00:05:03 hvozda Exp $ + * $Id: pcmcia.c,v 1.2 1996/01/26 21:27:31 hvozda Exp $ */ /* derived from scsiconf.c writte by Julian Elischer et al */ @@ -44,6 +44,10 @@ #include #include +#include "ed.h" +#include "com.h" +#include "ep.h" + #ifdef IBM_WD #define PCMCIA_DEBUG #endif @@ -70,24 +74,24 @@ static int ndeldevs = 0; build up the knowndevs struct. Stefan may have ideas... */ -#ifdef PCMCIA_ED +#if NED > 0 extern struct pcmciadevs pcmcia_ed_devs[]; #endif -#ifdef PCMCIA_COM +#if NCOM > 0 extern struct pcmciadevs pcmcia_com_devs[]; #endif -#ifdef PCMCIA_EP +#if NEP > 0 extern struct pcmciadevs pcmcia_ep_devs[]; #endif static struct pcmciadevs *knowndevs[] = { -#ifdef PCMCIA_ED +#if NED > 0 pcmcia_ed_devs, #endif -#ifdef PCMCIA_COM +#if NCOM > 0 pcmcia_com_devs, #endif -#ifdef PCMCIA_EP +#if NEP > 0 pcmcia_ep_devs, #endif NULL