1*2ad04261Svisa /* $OpenBSD: conf.h,v 1.12 2022/06/28 14:43:50 visa Exp $ */ 2e1e4f5b1Sdrahn /* $NetBSD: conf.h,v 1.7 2002/04/19 01:04:39 wiz Exp $ */ 3e1e4f5b1Sdrahn 4e1e4f5b1Sdrahn /* 5e1e4f5b1Sdrahn * Copyright (c) 1997 Mark Brinicombe. 6e1e4f5b1Sdrahn * All rights reserved. 7e1e4f5b1Sdrahn * 8e1e4f5b1Sdrahn * Redistribution and use in source and binary forms, with or without 9e1e4f5b1Sdrahn * modification, are permitted provided that the following conditions 10e1e4f5b1Sdrahn * are met: 11e1e4f5b1Sdrahn * 1. Redistributions of source code must retain the above copyright 12e1e4f5b1Sdrahn * notice, this list of conditions and the following disclaimer. 13e1e4f5b1Sdrahn * 2. Redistributions in binary form must reproduce the above copyright 14e1e4f5b1Sdrahn * notice, this list of conditions and the following disclaimer in the 15e1e4f5b1Sdrahn * documentation and/or other materials provided with the distribution. 16e1e4f5b1Sdrahn * 3. All advertising materials mentioning features or use of this software 17e1e4f5b1Sdrahn * must display the following acknowledgement: 18e1e4f5b1Sdrahn * This product includes software developed by Mark Brinicombe 19e1e4f5b1Sdrahn * for the NetBSD Project. 20e1e4f5b1Sdrahn * 4. The name of the company nor the name of the author may be used to 21e1e4f5b1Sdrahn * endorse or promote products derived from this software without specific 22e1e4f5b1Sdrahn * prior written permission. 23e1e4f5b1Sdrahn * 24e1e4f5b1Sdrahn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 25e1e4f5b1Sdrahn * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 26e1e4f5b1Sdrahn * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27e1e4f5b1Sdrahn * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 28e1e4f5b1Sdrahn * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 29e1e4f5b1Sdrahn * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30e1e4f5b1Sdrahn * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31e1e4f5b1Sdrahn * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32e1e4f5b1Sdrahn * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33e1e4f5b1Sdrahn * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34e1e4f5b1Sdrahn * SUCH DAMAGE. 35e1e4f5b1Sdrahn * 36e1e4f5b1Sdrahn * RiscBSD kernel project 37e1e4f5b1Sdrahn * 38e1e4f5b1Sdrahn * conf.h 39e1e4f5b1Sdrahn * 40e1e4f5b1Sdrahn * Prototypes for device driver functions 41e1e4f5b1Sdrahn */ 42e1e4f5b1Sdrahn 432fa72412Spirofti #ifndef _ARM_CONF_H_ 442fa72412Spirofti #define _ARM_CONF_H_ 45e1e4f5b1Sdrahn 46e1e4f5b1Sdrahn 47e1e4f5b1Sdrahn #include <sys/conf.h> 48e1e4f5b1Sdrahn 49e1e4f5b1Sdrahn #define mmread mmrw 50e1e4f5b1Sdrahn #define mmwrite mmrw 51e1e4f5b1Sdrahn cdev_decl(mm); 52e1e4f5b1Sdrahn 53e1e4f5b1Sdrahn bdev_decl(wd); 54e1e4f5b1Sdrahn cdev_decl(wd); 55e1e4f5b1Sdrahn bdev_decl(fd); 56e1e4f5b1Sdrahn cdev_decl(fd); 57e1e4f5b1Sdrahn 58e1e4f5b1Sdrahn /* Character device declarations */ 59e1e4f5b1Sdrahn 6038da2a10Suwe /* open, close, ioctl, kqueue */ 6138da2a10Suwe #define cdev_apm_init(c,n) { \ 6238da2a10Suwe dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ 6338da2a10Suwe (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ 64*2ad04261Svisa (dev_type_stop((*))) enodev, 0, \ 65e2ca5dd4Snicm (dev_type_mmap((*))) enodev, 0, 0, dev_init(c,n,kqfilter) } 6638da2a10Suwe 67e1e4f5b1Sdrahn cdev_decl(com); 68e1e4f5b1Sdrahn cdev_decl(lpt); 69e1e4f5b1Sdrahn cdev_decl(pci); 7038da2a10Suwe cdev_decl(apm); 71a56ecf7fSmiod cdev_decl(spkr); 72e1e4f5b1Sdrahn 73d571cddaSkettenis /* open, close, ioctl */ 74d571cddaSkettenis #define cdev_openprom_init(c,n) { \ 75d571cddaSkettenis dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ 76d571cddaSkettenis (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ 77*2ad04261Svisa (dev_type_stop((*))) nullop, 0, \ 78d571cddaSkettenis (dev_type_mmap((*))) enodev } 79d571cddaSkettenis 80d571cddaSkettenis cdev_decl(openprom); 81d571cddaSkettenis 822fa72412Spirofti #endif /* _ARM_CONF_H__ */ 83