blob: e27e1efd53c6655571ce9b2fbd101f3e6956685d [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris38062f92014-07-09 15:33:25 -07007#ifndef _UAPI_LINUX_ZORRO_H
8#define _UAPI_LINUX_ZORRO_H
9#include <linux/types.h>
10#define ZORRO_MANUF(id) ((id) >> 16)
Christopher Ferris38062f92014-07-09 15:33:25 -070011#define ZORRO_PROD(id) (((id) >> 8) & 0xff)
12#define ZORRO_EPC(id) ((id) & 0xff)
Tao Baod7db5942015-01-28 10:07:51 -080013#define ZORRO_ID(manuf,prod,epc) ((ZORRO_MANUF_ ##manuf << 16) | ((prod) << 8) | (epc))
Christopher Ferris38062f92014-07-09 15:33:25 -070014typedef __u32 zorro_id;
Christopher Ferris38062f92014-07-09 15:33:25 -070015#include <linux/zorro_ids.h>
16#define GVP_PRODMASK (0xf8)
17#define GVP_SCSICLKMASK (0x01)
18enum GVP_flags {
Tao Baod7db5942015-01-28 10:07:51 -080019 GVP_IO = 0x01,
20 GVP_ACCEL = 0x02,
21 GVP_SCSI = 0x04,
22 GVP_24BITDMA = 0x08,
Tao Baod7db5942015-01-28 10:07:51 -080023 GVP_25BITDMA = 0x10,
24 GVP_NOBANK = 0x20,
25 GVP_14MHZ = 0x40,
Christopher Ferris38062f92014-07-09 15:33:25 -070026};
Christopher Ferris38062f92014-07-09 15:33:25 -070027struct Node {
Tao Baod7db5942015-01-28 10:07:51 -080028 __be32 ln_Succ;
29 __be32 ln_Pred;
30 __u8 ln_Type;
Tao Baod7db5942015-01-28 10:07:51 -080031 __s8 ln_Pri;
32 __be32 ln_Name;
Colin Cross4ac33222022-12-15 15:45:35 -080033} __attribute__((__packed__));
Christopher Ferris38062f92014-07-09 15:33:25 -070034struct ExpansionRom {
Tao Baod7db5942015-01-28 10:07:51 -080035 __u8 er_Type;
36 __u8 er_Product;
37 __u8 er_Flags;
38 __u8 er_Reserved03;
Tao Baod7db5942015-01-28 10:07:51 -080039 __be16 er_Manufacturer;
40 __be32 er_SerialNumber;
41 __be16 er_InitDiagVec;
42 __u8 er_Reserved0c;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u8 er_Reserved0d;
44 __u8 er_Reserved0e;
45 __u8 er_Reserved0f;
Colin Cross4ac33222022-12-15 15:45:35 -080046} __attribute__((__packed__));
Christopher Ferris38062f92014-07-09 15:33:25 -070047#define ERT_TYPEMASK 0xc0
48#define ERT_ZORROII 0xc0
49#define ERT_ZORROIII 0x80
50#define ERTB_MEMLIST 5
Tao Baod7db5942015-01-28 10:07:51 -080051#define ERTF_MEMLIST (1 << 5)
Christopher Ferris38062f92014-07-09 15:33:25 -070052struct ConfigDev {
Tao Baod7db5942015-01-28 10:07:51 -080053 struct Node cd_Node;
54 __u8 cd_Flags;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u8 cd_Pad;
56 struct ExpansionRom cd_Rom;
57 __be32 cd_BoardAddr;
58 __be32 cd_BoardSize;
Tao Baod7db5942015-01-28 10:07:51 -080059 __be16 cd_SlotAddr;
60 __be16 cd_SlotSize;
61 __be32 cd_Driver;
62 __be32 cd_NextCD;
Tao Baod7db5942015-01-28 10:07:51 -080063 __be32 cd_Unused[4];
Colin Cross4ac33222022-12-15 15:45:35 -080064} __attribute__((__packed__));
Christopher Ferris38062f92014-07-09 15:33:25 -070065#define ZORRO_NUM_AUTO 16
66#endif