Root/
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 | */ |
34 | extern int mca_find_adapter(int id, int start); |
35 | extern int mca_find_unused_adapter(int id, int start); |
36 | |
37 | extern int mca_mark_as_used(int slot); |
38 | extern void mca_mark_as_unused(int slot); |
39 | |
40 | /* gets a byte out of POS register (stored in memory) */ |
41 | extern unsigned char mca_read_stored_pos(int slot, int reg); |
42 | |
43 | /* This can be expanded later. Right now, it gives us a way of |
44 | * getting meaningful information into the MCA_info structure, |
45 | * so we can have a more interesting /proc/mca. |
46 | */ |
47 | extern void mca_set_adapter_name(int slot, char* name); |
48 | |
49 | /* These routines actually mess with the hardware POS registers. They |
50 | * temporarily disable the device (and interrupts), so make sure you know |
51 | * what you're doing if you use them. Furthermore, writing to a POS may |
52 | * result in two devices trying to share a resource, which in turn can |
53 | * result in multiple devices sharing memory spaces, IRQs, or even trashing |
54 | * hardware. YOU HAVE BEEN WARNED. |
55 | * |
56 | * You can only access slots with this. Motherboard registers are off |
57 | * limits. |
58 | */ |
59 | |
60 | /* read a byte from the specified POS register. */ |
61 | extern unsigned char mca_read_pos(int slot, int reg); |
62 | |
63 | /* write a byte to the specified POS register. */ |
64 | extern void mca_write_pos(int slot, int reg, unsigned char byte); |
65 | |
66 | #endif |
67 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9