1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _LINUX_MCA_H
13#define _LINUX_MCA_H
14
15#include <linux/device.h>
16
17#define MCA_bus 0
18
19typedef int (*MCA_ProcFn)(char* buf, int slot, void* dev);
20
21enum MCA_AdapterStatus {
22 MCA_ADAPTER_NORMAL = 0,
23 MCA_ADAPTER_NONE = 1,
24 MCA_ADAPTER_DISABLED = 2,
25 MCA_ADAPTER_ERROR = 3
26};
27
28struct mca_device {
29 u64 dma_mask;
30 int pos_id;
31 int slot;
32
33 int index;
34
35 int driver_loaded;
36
37 unsigned char pos[8];
38
39 short pos_register;
40
41 enum MCA_AdapterStatus status;
42 struct device dev;
43 char name[32];
44};
45#define to_mca_device(mdev) container_of(mdev, struct mca_device, dev)
46
47struct mca_bus_accessor_functions {
48 unsigned char (*mca_read_pos)(struct mca_device *, int reg);
49 void (*mca_write_pos)(struct mca_device *, int reg,
50 unsigned char byte);
51 int (*mca_transform_irq)(struct mca_device *, int irq);
52 int (*mca_transform_ioport)(struct mca_device *,
53 int region);
54 void * (*mca_transform_memory)(struct mca_device *,
55 void *memory);
56};
57
58struct mca_bus {
59 u64 default_dma_mask;
60 int number;
61 struct mca_bus_accessor_functions f;
62 struct device dev;
63 char name[32];
64};
65#define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev)
66
67struct mca_driver {
68 const short *id_table;
69 void *driver_data;
70 struct device_driver driver;
71};
72#define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver)
73
74#endif
75