The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_MCA_H |
| 20 | #define _LINUX_MCA_H |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #include <linux/device.h> |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 22 | #define MCA_bus 0 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | typedef int (*MCA_ProcFn)(char* buf, int slot, void* dev); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 25 | enum MCA_AdapterStatus { |
| 26 | MCA_ADAPTER_NORMAL = 0, |
| 27 | MCA_ADAPTER_NONE = 1, |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | MCA_ADAPTER_DISABLED = 2, |
| 30 | MCA_ADAPTER_ERROR = 3 |
| 31 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 32 | struct mca_device { |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | u64 dma_mask; |
| 35 | int pos_id; |
| 36 | int slot; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 37 | int index; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 39 | int driver_loaded; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 40 | unsigned char pos[8]; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 41 | short pos_register; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 42 | enum MCA_AdapterStatus status; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | struct device dev; |
| 45 | char name[32]; |
| 46 | }; |
| 47 | #define to_mca_device(mdev) container_of(mdev, struct mca_device, dev) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 49 | struct mca_bus_accessor_functions { |
| 50 | unsigned char (*mca_read_pos)(struct mca_device *, int reg); |
| 51 | void (*mca_write_pos)(struct mca_device *, int reg, |
| 52 | unsigned char byte); |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | int (*mca_transform_irq)(struct mca_device *, int irq); |
| 55 | int (*mca_transform_ioport)(struct mca_device *, |
| 56 | int region); |
| 57 | void * (*mca_transform_memory)(struct mca_device *, |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 59 | void *memory); |
| 60 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 61 | struct mca_bus { |
| 62 | u64 default_dma_mask; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | int number; |
| 65 | struct mca_bus_accessor_functions f; |
| 66 | struct device dev; |
| 67 | char name[32]; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 69 | }; |
| 70 | #define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 71 | struct mca_driver { |
| 72 | const short *id_table; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 74 | void *driver_data; |
| 75 | struct device_driver driver; |
| 76 | }; |
| 77 | #define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 79 | #endif |