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  ***   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  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPI_LINUX_ZORRO_H
20 #define _UAPI_LINUX_ZORRO_H
21 #include <linux/types.h>
22 #define ZORRO_MANUF(id) ((id) >> 16)
23 #define ZORRO_PROD(id) (((id) >> 8) & 0xff)
24 #define ZORRO_EPC(id) ((id) & 0xff)
25 #define ZORRO_ID(manuf,prod,epc) ((ZORRO_MANUF_ ##manuf << 16) | ((prod) << 8) | (epc))
26 typedef __u32 zorro_id;
27 #include <linux/zorro_ids.h>
28 #define GVP_PRODMASK (0xf8)
29 #define GVP_SCSICLKMASK (0x01)
30 enum GVP_flags {
31   GVP_IO = 0x01,
32   GVP_ACCEL = 0x02,
33   GVP_SCSI = 0x04,
34   GVP_24BITDMA = 0x08,
35   GVP_25BITDMA = 0x10,
36   GVP_NOBANK = 0x20,
37   GVP_14MHZ = 0x40,
38 };
39 struct Node {
40   __be32 ln_Succ;
41   __be32 ln_Pred;
42   __u8 ln_Type;
43   __s8 ln_Pri;
44   __be32 ln_Name;
45 } __packed;
46 struct ExpansionRom {
47   __u8 er_Type;
48   __u8 er_Product;
49   __u8 er_Flags;
50   __u8 er_Reserved03;
51   __be16 er_Manufacturer;
52   __be32 er_SerialNumber;
53   __be16 er_InitDiagVec;
54   __u8 er_Reserved0c;
55   __u8 er_Reserved0d;
56   __u8 er_Reserved0e;
57   __u8 er_Reserved0f;
58 } __packed;
59 #define ERT_TYPEMASK 0xc0
60 #define ERT_ZORROII 0xc0
61 #define ERT_ZORROIII 0x80
62 #define ERTB_MEMLIST 5
63 #define ERTF_MEMLIST (1 << 5)
64 struct ConfigDev {
65   struct Node cd_Node;
66   __u8 cd_Flags;
67   __u8 cd_Pad;
68   struct ExpansionRom cd_Rom;
69   __be32 cd_BoardAddr;
70   __be32 cd_BoardSize;
71   __be16 cd_SlotAddr;
72   __be16 cd_SlotSize;
73   __be32 cd_Driver;
74   __be32 cd_NextCD;
75   __be32 cd_Unused[4];
76 } __packed;
77 #define ZORRO_NUM_AUTO 16
78 #endif
79