]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/blob - libc/kernel/common/linux/mca.h
auto import from //depot/cupcake/@132589
[android-sdk/platform-bionic.git] / libc / kernel / common / linux / mca.h
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
15 #include <linux/device.h>
17 #define MCA_bus 0
19 typedef int (*MCA_ProcFn)(char* buf, int slot, void* dev);
21 enum MCA_AdapterStatus {
22  MCA_ADAPTER_NORMAL = 0,
23  MCA_ADAPTER_NONE = 1,
24  MCA_ADAPTER_DISABLED = 2,
25  MCA_ADAPTER_ERROR = 3
26 };
28 struct mca_device {
29  u64 dma_mask;
30  int pos_id;
31  int slot;
33  int index;
35  int driver_loaded;
37  unsigned char pos[8];
39  short pos_register;
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)
47 struct 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 };
58 struct 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)
67 struct 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)
74 #endif