source: svn/trunk/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/linux/isapnp.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 1.5 KB
RevLine 
[2]1/*
2 *  ISA Plug & Play support
3 *  Copyright (c) by Jaroslav Kysela <perex@suse.cz>
4 *
5 *
6 *   This program is free software; you can redistribute it and/or modify
7 *   it under the terms of the GNU General Public License as published by
8 *   the Free Software Foundation; either version 2 of the License, or
9 *   (at your option) any later version.
10 *
11 *   This program is distributed in the hope that it will be useful,
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *   GNU General Public License for more details.
15 *
16 *   You should have received a copy of the GNU General Public License
17 *   along with this program; if not, write to the Free Software
18 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 *
20 */
21
22#ifndef LINUX_ISAPNP_H
23#define LINUX_ISAPNP_H
24
25#include <linux/errno.h>
26#include <linux/pnp.h>
27
28/*
29 *  Configuration registers (TODO: change by specification)
30 */ 
31
32#define ISAPNP_CFG_ACTIVATE             0x30    /* byte */
33#define ISAPNP_CFG_MEM                  0x40    /* 4 * dword */
34#define ISAPNP_CFG_PORT                 0x60    /* 8 * word */
35#define ISAPNP_CFG_IRQ                  0x70    /* 2 * word */
36#define ISAPNP_CFG_DMA                  0x74    /* 2 * byte */
37
38/*
39 *
40 */
41
42#define ISAPNP_VENDOR(a,b,c)    (((((a)-'A'+1)&0x3f)<<2)|\
43                                ((((b)-'A'+1)&0x18)>>3)|((((b)-'A'+1)&7)<<13)|\
44                                ((((c)-'A'+1)&0x1f)<<8))
45#define ISAPNP_DEVICE(x)        ((((x)&0xf000)>>8)|\
46                                 (((x)&0x0f00)>>8)|\
47                                 (((x)&0x00f0)<<8)|\
48                                 (((x)&0x000f)<<8))
49#define ISAPNP_FUNCTION(x)      ISAPNP_DEVICE(x)
50
51#endif /* LINUX_ISAPNP_H */
Note: See TracBrowser for help on using the repository browser.