diff options
-rw-r--r-- | drivers/pnp/pnpbios/bioscalls.c | 1 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/core.c | 1 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/pnpbios.h | 136 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/proc.c | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/rsparser.c | 1 | ||||
-rw-r--r-- | include/linux/pnpbios.h | 151 |
6 files changed, 137 insertions, 155 deletions
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index a8364d815222..7ff824496b39 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/pnpbios.h> | ||
11 | #include <linux/device.h> | 10 | #include <linux/device.h> |
12 | #include <linux/pnp.h> | 11 | #include <linux/pnp.h> |
13 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index f5477ca85956..19a4be1a9a31 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c | |||
@@ -50,7 +50,6 @@ | |||
50 | #include <linux/init.h> | 50 | #include <linux/init.h> |
51 | #include <linux/linkage.h> | 51 | #include <linux/linkage.h> |
52 | #include <linux/kernel.h> | 52 | #include <linux/kernel.h> |
53 | #include <linux/pnpbios.h> | ||
54 | #include <linux/device.h> | 53 | #include <linux/device.h> |
55 | #include <linux/pnp.h> | 54 | #include <linux/pnp.h> |
56 | #include <linux/mm.h> | 55 | #include <linux/mm.h> |
diff --git a/drivers/pnp/pnpbios/pnpbios.h b/drivers/pnp/pnpbios/pnpbios.h index 42343fc753ba..b09cf6dc2075 100644 --- a/drivers/pnp/pnpbios/pnpbios.h +++ b/drivers/pnp/pnpbios/pnpbios.h | |||
@@ -2,6 +2,142 @@ | |||
2 | * pnpbios.h - contains local definitions | 2 | * pnpbios.h - contains local definitions |
3 | */ | 3 | */ |
4 | 4 | ||
5 | /* | ||
6 | * Include file for the interface to a PnP BIOS | ||
7 | * | ||
8 | * Original BIOS code (C) 1998 Christian Schmidt (chr.schmidt@tu-bs.de) | ||
9 | * PnP handler parts (c) 1998 Tom Lees <tom@lpsg.demon.co.uk> | ||
10 | * Minor reorganizations by David Hinds <dahinds@users.sourceforge.net> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2, or (at your option) any | ||
15 | * later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, but | ||
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
20 | * General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * Return codes | ||
29 | */ | ||
30 | #define PNP_SUCCESS 0x00 | ||
31 | #define PNP_NOT_SET_STATICALLY 0x7f | ||
32 | #define PNP_UNKNOWN_FUNCTION 0x81 | ||
33 | #define PNP_FUNCTION_NOT_SUPPORTED 0x82 | ||
34 | #define PNP_INVALID_HANDLE 0x83 | ||
35 | #define PNP_BAD_PARAMETER 0x84 | ||
36 | #define PNP_SET_FAILED 0x85 | ||
37 | #define PNP_EVENTS_NOT_PENDING 0x86 | ||
38 | #define PNP_SYSTEM_NOT_DOCKED 0x87 | ||
39 | #define PNP_NO_ISA_PNP_CARDS 0x88 | ||
40 | #define PNP_UNABLE_TO_DETERMINE_DOCK_CAPABILITIES 0x89 | ||
41 | #define PNP_CONFIG_CHANGE_FAILED_NO_BATTERY 0x8a | ||
42 | #define PNP_CONFIG_CHANGE_FAILED_RESOURCE_CONFLICT 0x8b | ||
43 | #define PNP_BUFFER_TOO_SMALL 0x8c | ||
44 | #define PNP_USE_ESCD_SUPPORT 0x8d | ||
45 | #define PNP_MESSAGE_NOT_SUPPORTED 0x8e | ||
46 | #define PNP_HARDWARE_ERROR 0x8f | ||
47 | |||
48 | #define ESCD_SUCCESS 0x00 | ||
49 | #define ESCD_IO_ERROR_READING 0x55 | ||
50 | #define ESCD_INVALID 0x56 | ||
51 | #define ESCD_BUFFER_TOO_SMALL 0x59 | ||
52 | #define ESCD_NVRAM_TOO_SMALL 0x5a | ||
53 | #define ESCD_FUNCTION_NOT_SUPPORTED 0x81 | ||
54 | |||
55 | /* | ||
56 | * Events that can be received by "get event" | ||
57 | */ | ||
58 | #define PNPEV_ABOUT_TO_CHANGE_CONFIG 0x0001 | ||
59 | #define PNPEV_DOCK_CHANGED 0x0002 | ||
60 | #define PNPEV_SYSTEM_DEVICE_CHANGED 0x0003 | ||
61 | #define PNPEV_CONFIG_CHANGED_FAILED 0x0004 | ||
62 | #define PNPEV_UNKNOWN_SYSTEM_EVENT 0xffff | ||
63 | /* 0x8000 through 0xfffe are OEM defined */ | ||
64 | |||
65 | /* | ||
66 | * Messages that should be sent through "send message" | ||
67 | */ | ||
68 | #define PNPMSG_OK 0x00 | ||
69 | #define PNPMSG_ABORT 0x01 | ||
70 | #define PNPMSG_UNDOCK_DEFAULT_ACTION 0x40 | ||
71 | #define PNPMSG_POWER_OFF 0x41 | ||
72 | #define PNPMSG_PNP_OS_ACTIVE 0x42 | ||
73 | #define PNPMSG_PNP_OS_INACTIVE 0x43 | ||
74 | |||
75 | /* | ||
76 | * Plug and Play BIOS flags | ||
77 | */ | ||
78 | #define PNPBIOS_NO_DISABLE 0x0001 | ||
79 | #define PNPBIOS_NO_CONFIG 0x0002 | ||
80 | #define PNPBIOS_OUTPUT 0x0004 | ||
81 | #define PNPBIOS_INPUT 0x0008 | ||
82 | #define PNPBIOS_BOOTABLE 0x0010 | ||
83 | #define PNPBIOS_DOCK 0x0020 | ||
84 | #define PNPBIOS_REMOVABLE 0x0040 | ||
85 | #define pnpbios_is_static(x) (((x)->flags & 0x0100) == 0x0000) | ||
86 | #define pnpbios_is_dynamic(x) ((x)->flags & 0x0080) | ||
87 | |||
88 | /* | ||
89 | * Function Parameters | ||
90 | */ | ||
91 | #define PNPMODE_STATIC 1 | ||
92 | #define PNPMODE_DYNAMIC 0 | ||
93 | |||
94 | /* 0x8000 through 0xffff are OEM defined */ | ||
95 | |||
96 | #pragma pack(1) | ||
97 | struct pnp_dev_node_info { | ||
98 | __u16 no_nodes; | ||
99 | __u16 max_node_size; | ||
100 | }; | ||
101 | struct pnp_docking_station_info { | ||
102 | __u32 location_id; | ||
103 | __u32 serial; | ||
104 | __u16 capabilities; | ||
105 | }; | ||
106 | struct pnp_isa_config_struc { | ||
107 | __u8 revision; | ||
108 | __u8 no_csns; | ||
109 | __u16 isa_rd_data_port; | ||
110 | __u16 reserved; | ||
111 | }; | ||
112 | struct escd_info_struc { | ||
113 | __u16 min_escd_write_size; | ||
114 | __u16 escd_size; | ||
115 | __u32 nv_storage_base; | ||
116 | }; | ||
117 | struct pnp_bios_node { | ||
118 | __u16 size; | ||
119 | __u8 handle; | ||
120 | __u32 eisa_id; | ||
121 | __u8 type_code[3]; | ||
122 | __u16 flags; | ||
123 | __u8 data[0]; | ||
124 | }; | ||
125 | #pragma pack() | ||
126 | |||
127 | /* non-exported */ | ||
128 | extern struct pnp_dev_node_info node_info; | ||
129 | |||
130 | extern int pnp_bios_dev_node_info(struct pnp_dev_node_info *data); | ||
131 | extern int pnp_bios_get_dev_node(u8 *nodenum, char config, | ||
132 | struct pnp_bios_node *data); | ||
133 | extern int pnp_bios_set_dev_node(u8 nodenum, char config, | ||
134 | struct pnp_bios_node *data); | ||
135 | extern int pnp_bios_get_stat_res(char *info); | ||
136 | extern int pnp_bios_isapnp_config(struct pnp_isa_config_struc *data); | ||
137 | extern int pnp_bios_escd_info(struct escd_info_struc *data); | ||
138 | extern int pnp_bios_read_escd(char *data, u32 nvram_base); | ||
139 | extern int pnp_bios_dock_station_info(struct pnp_docking_station_info *data); | ||
140 | |||
5 | #pragma pack(1) | 141 | #pragma pack(1) |
6 | union pnp_bios_install_struct { | 142 | union pnp_bios_install_struct { |
7 | struct { | 143 | struct { |
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c index bb19bc957bad..4f89f1677e69 100644 --- a/drivers/pnp/pnpbios/proc.c +++ b/drivers/pnp/pnpbios/proc.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
26 | #include <linux/pnpbios.h> | 26 | #include <linux/pnp.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | 28 | ||
29 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index ed63ecd9bf40..2e2c457a0fea 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -4,7 +4,6 @@ | |||
4 | 4 | ||
5 | #include <linux/ctype.h> | 5 | #include <linux/ctype.h> |
6 | #include <linux/pnp.h> | 6 | #include <linux/pnp.h> |
7 | #include <linux/pnpbios.h> | ||
8 | #include <linux/string.h> | 7 | #include <linux/string.h> |
9 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
10 | 9 | ||
diff --git a/include/linux/pnpbios.h b/include/linux/pnpbios.h deleted file mode 100644 index 329192adc9dd..000000000000 --- a/include/linux/pnpbios.h +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | /* | ||
2 | * Include file for the interface to a PnP BIOS | ||
3 | * | ||
4 | * Original BIOS code (C) 1998 Christian Schmidt (chr.schmidt@tu-bs.de) | ||
5 | * PnP handler parts (c) 1998 Tom Lees <tom@lpsg.demon.co.uk> | ||
6 | * Minor reorganizations by David Hinds <dahinds@users.sourceforge.net> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2, or (at your option) any | ||
11 | * later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef _LINUX_PNPBIOS_H | ||
24 | #define _LINUX_PNPBIOS_H | ||
25 | |||
26 | #ifdef __KERNEL__ | ||
27 | |||
28 | #include <linux/types.h> | ||
29 | #include <linux/pnp.h> | ||
30 | |||
31 | /* | ||
32 | * Return codes | ||
33 | */ | ||
34 | #define PNP_SUCCESS 0x00 | ||
35 | #define PNP_NOT_SET_STATICALLY 0x7f | ||
36 | #define PNP_UNKNOWN_FUNCTION 0x81 | ||
37 | #define PNP_FUNCTION_NOT_SUPPORTED 0x82 | ||
38 | #define PNP_INVALID_HANDLE 0x83 | ||
39 | #define PNP_BAD_PARAMETER 0x84 | ||
40 | #define PNP_SET_FAILED 0x85 | ||
41 | #define PNP_EVENTS_NOT_PENDING 0x86 | ||
42 | #define PNP_SYSTEM_NOT_DOCKED 0x87 | ||
43 | #define PNP_NO_ISA_PNP_CARDS 0x88 | ||
44 | #define PNP_UNABLE_TO_DETERMINE_DOCK_CAPABILITIES 0x89 | ||
45 | #define PNP_CONFIG_CHANGE_FAILED_NO_BATTERY 0x8a | ||
46 | #define PNP_CONFIG_CHANGE_FAILED_RESOURCE_CONFLICT 0x8b | ||
47 | #define PNP_BUFFER_TOO_SMALL 0x8c | ||
48 | #define PNP_USE_ESCD_SUPPORT 0x8d | ||
49 | #define PNP_MESSAGE_NOT_SUPPORTED 0x8e | ||
50 | #define PNP_HARDWARE_ERROR 0x8f | ||
51 | |||
52 | #define ESCD_SUCCESS 0x00 | ||
53 | #define ESCD_IO_ERROR_READING 0x55 | ||
54 | #define ESCD_INVALID 0x56 | ||
55 | #define ESCD_BUFFER_TOO_SMALL 0x59 | ||
56 | #define ESCD_NVRAM_TOO_SMALL 0x5a | ||
57 | #define ESCD_FUNCTION_NOT_SUPPORTED 0x81 | ||
58 | |||
59 | /* | ||
60 | * Events that can be received by "get event" | ||
61 | */ | ||
62 | #define PNPEV_ABOUT_TO_CHANGE_CONFIG 0x0001 | ||
63 | #define PNPEV_DOCK_CHANGED 0x0002 | ||
64 | #define PNPEV_SYSTEM_DEVICE_CHANGED 0x0003 | ||
65 | #define PNPEV_CONFIG_CHANGED_FAILED 0x0004 | ||
66 | #define PNPEV_UNKNOWN_SYSTEM_EVENT 0xffff | ||
67 | /* 0x8000 through 0xfffe are OEM defined */ | ||
68 | |||
69 | /* | ||
70 | * Messages that should be sent through "send message" | ||
71 | */ | ||
72 | #define PNPMSG_OK 0x00 | ||
73 | #define PNPMSG_ABORT 0x01 | ||
74 | #define PNPMSG_UNDOCK_DEFAULT_ACTION 0x40 | ||
75 | #define PNPMSG_POWER_OFF 0x41 | ||
76 | #define PNPMSG_PNP_OS_ACTIVE 0x42 | ||
77 | #define PNPMSG_PNP_OS_INACTIVE 0x43 | ||
78 | |||
79 | /* | ||
80 | * Plug and Play BIOS flags | ||
81 | */ | ||
82 | #define PNPBIOS_NO_DISABLE 0x0001 | ||
83 | #define PNPBIOS_NO_CONFIG 0x0002 | ||
84 | #define PNPBIOS_OUTPUT 0x0004 | ||
85 | #define PNPBIOS_INPUT 0x0008 | ||
86 | #define PNPBIOS_BOOTABLE 0x0010 | ||
87 | #define PNPBIOS_DOCK 0x0020 | ||
88 | #define PNPBIOS_REMOVABLE 0x0040 | ||
89 | #define pnpbios_is_static(x) (((x)->flags & 0x0100) == 0x0000) | ||
90 | #define pnpbios_is_dynamic(x) ((x)->flags & 0x0080) | ||
91 | |||
92 | /* | ||
93 | * Function Parameters | ||
94 | */ | ||
95 | #define PNPMODE_STATIC 1 | ||
96 | #define PNPMODE_DYNAMIC 0 | ||
97 | |||
98 | /* 0x8000 through 0xffff are OEM defined */ | ||
99 | |||
100 | #pragma pack(1) | ||
101 | struct pnp_dev_node_info { | ||
102 | __u16 no_nodes; | ||
103 | __u16 max_node_size; | ||
104 | }; | ||
105 | struct pnp_docking_station_info { | ||
106 | __u32 location_id; | ||
107 | __u32 serial; | ||
108 | __u16 capabilities; | ||
109 | }; | ||
110 | struct pnp_isa_config_struc { | ||
111 | __u8 revision; | ||
112 | __u8 no_csns; | ||
113 | __u16 isa_rd_data_port; | ||
114 | __u16 reserved; | ||
115 | }; | ||
116 | struct escd_info_struc { | ||
117 | __u16 min_escd_write_size; | ||
118 | __u16 escd_size; | ||
119 | __u32 nv_storage_base; | ||
120 | }; | ||
121 | struct pnp_bios_node { | ||
122 | __u16 size; | ||
123 | __u8 handle; | ||
124 | __u32 eisa_id; | ||
125 | __u8 type_code[3]; | ||
126 | __u16 flags; | ||
127 | __u8 data[0]; | ||
128 | }; | ||
129 | #pragma pack() | ||
130 | |||
131 | #ifdef CONFIG_PNPBIOS | ||
132 | |||
133 | /* non-exported */ | ||
134 | extern struct pnp_dev_node_info node_info; | ||
135 | |||
136 | extern int pnp_bios_dev_node_info(struct pnp_dev_node_info *data); | ||
137 | extern int pnp_bios_get_dev_node(u8 *nodenum, char config, | ||
138 | struct pnp_bios_node *data); | ||
139 | extern int pnp_bios_set_dev_node(u8 nodenum, char config, | ||
140 | struct pnp_bios_node *data); | ||
141 | extern int pnp_bios_get_stat_res(char *info); | ||
142 | extern int pnp_bios_isapnp_config(struct pnp_isa_config_struc *data); | ||
143 | extern int pnp_bios_escd_info(struct escd_info_struc *data); | ||
144 | extern int pnp_bios_read_escd(char *data, u32 nvram_base); | ||
145 | extern int pnp_bios_dock_station_info(struct pnp_docking_station_info *data); | ||
146 | |||
147 | #endif /* CONFIG_PNPBIOS */ | ||
148 | |||
149 | #endif /* __KERNEL__ */ | ||
150 | |||
151 | #endif /* _LINUX_PNPBIOS_H */ | ||