aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mca-legacy.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/mca-legacy.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/mca-legacy.h')
-rw-r--r--include/linux/mca-legacy.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/include/linux/mca-legacy.h b/include/linux/mca-legacy.h
new file mode 100644
index 000000000000..f2bb770e530a
--- /dev/null
+++ b/include/linux/mca-legacy.h
@@ -0,0 +1,67 @@
1/* -*- mode: c; c-basic-offset: 8 -*- */
2
3/* This is the function prototypes for the old legacy MCA interface
4 *
5 * Please move your driver to the new sysfs based one instead */
6
7#ifndef _LINUX_MCA_LEGACY_H
8#define _LINUX_MCA_LEGACY_H
9
10#include <linux/mca.h>
11
12#warning "MCA legacy - please move your driver to the new sysfs api"
13
14/* MCA_NOTFOUND is an error condition. The other two indicate
15 * motherboard POS registers contain the adapter. They might be
16 * returned by the mca_find_adapter() function, and can be used as
17 * arguments to mca_read_stored_pos(). I'm not going to allow direct
18 * access to the motherboard registers until we run across an adapter
19 * that requires it. We don't know enough about them to know if it's
20 * safe.
21 *
22 * See Documentation/mca.txt or one of the existing drivers for
23 * more information.
24 */
25#define MCA_NOTFOUND (-1)
26
27
28
29/* Returns the slot of the first enabled adapter matching id. User can
30 * specify a starting slot beyond zero, to deal with detecting multiple
31 * devices. Returns MCA_NOTFOUND if id not found. Also checks the
32 * integrated adapters.
33 */
34extern int mca_find_adapter(int id, int start);
35extern int mca_find_unused_adapter(int id, int start);
36
37extern int mca_is_adapter_used(int slot);
38extern int mca_mark_as_used(int slot);
39extern void mca_mark_as_unused(int slot);
40
41/* gets a byte out of POS register (stored in memory) */
42extern unsigned char mca_read_stored_pos(int slot, int reg);
43
44/* This can be expanded later. Right now, it gives us a way of
45 * getting meaningful information into the MCA_info structure,
46 * so we can have a more interesting /proc/mca.
47 */
48extern void mca_set_adapter_name(int slot, char* name);
49
50/* These routines actually mess with the hardware POS registers. They
51 * temporarily disable the device (and interrupts), so make sure you know
52 * what you're doing if you use them. Furthermore, writing to a POS may
53 * result in two devices trying to share a resource, which in turn can
54 * result in multiple devices sharing memory spaces, IRQs, or even trashing
55 * hardware. YOU HAVE BEEN WARNED.
56 *
57 * You can only access slots with this. Motherboard registers are off
58 * limits.
59 */
60
61/* read a byte from the specified POS register. */
62extern unsigned char mca_read_pos(int slot, int reg);
63
64/* write a byte to the specified POS register. */
65extern void mca_write_pos(int slot, int reg, unsigned char byte);
66
67#endif