1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * linux/zorro.h -- Amiga AutoConfig (Zorro) Bus Definitions
5 * Copyright (C) 1995--2003 Geert Uytterhoeven
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive
12 #ifndef _UAPI_LINUX_ZORRO_H
13 #define _UAPI_LINUX_ZORRO_H
15 #include <linux/types.h>
19 * Each Zorro board has a 32-bit ID of the form
21 * mmmmmmmmmmmmmmmmppppppppeeeeeeee
25 * mmmmmmmmmmmmmmmm 16-bit Manufacturer ID (assigned by CBM (sigh))
26 * pppppppp 8-bit Product ID (assigned by manufacturer)
27 * eeeeeeee 8-bit Extended Product ID (currently only used
28 * for some GVP boards)
32 #define ZORRO_MANUF(id) ((id) >> 16)
33 #define ZORRO_PROD(id) (((id) >> 8) & 0xff)
34 #define ZORRO_EPC(id) ((id) & 0xff)
36 #define ZORRO_ID(manuf, prod, epc) \
37 ((ZORRO_MANUF_##manuf << 16) | ((prod) << 8) | (epc))
39 typedef __u32 zorro_id
;
42 /* Include the ID list */
43 #include <linux/zorro_ids.h>
47 * GVP identifies most of its products through the 'extended product code'
48 * (epc). The epc has to be ANDed with the GVP_PRODMASK before the
52 #define GVP_PRODMASK (0xf8)
53 #define GVP_SCSICLKMASK (0x01)
67 __be32 ln_Succ
; /* Pointer to next (successor) */
68 __be32 ln_Pred
; /* Pointer to previous (predecessor) */
70 __s8 ln_Pri
; /* Priority, for sorting */
71 __be32 ln_Name
; /* ID string, null terminated */
75 /* -First 16 bytes of the expansion ROM */
76 __u8 er_Type
; /* Board type, size and flags */
77 __u8 er_Product
; /* Product number, assigned by manufacturer */
78 __u8 er_Flags
; /* Flags */
79 __u8 er_Reserved03
; /* Must be zero ($ff inverted) */
80 __be16 er_Manufacturer
; /* Unique ID, ASSIGNED BY COMMODORE-AMIGA! */
81 __be32 er_SerialNumber
; /* Available for use by manufacturer */
82 __be16 er_InitDiagVec
; /* Offset to optional "DiagArea" structure */
89 /* er_Type board type bits */
90 #define ERT_TYPEMASK 0xc0
91 #define ERT_ZORROII 0xc0
92 #define ERT_ZORROIII 0x80
94 /* other bits defined in er_Type */
95 #define ERTB_MEMLIST 5 /* Link RAM into free memory list */
96 #define ERTF_MEMLIST (1<<5)
100 __u8 cd_Flags
; /* (read/write) */
101 __u8 cd_Pad
; /* reserved */
102 struct ExpansionRom cd_Rom
; /* copy of board's expansion ROM */
103 __be32 cd_BoardAddr
; /* where in memory the board was placed */
104 __be32 cd_BoardSize
; /* size of board in bytes */
105 __be16 cd_SlotAddr
; /* which slot number (PRIVATE) */
106 __be16 cd_SlotSize
; /* number of slots (PRIVATE) */
107 __be32 cd_Driver
; /* pointer to node of driver */
108 __be32 cd_NextCD
; /* linked list of drivers to config */
109 __be32 cd_Unused
[4]; /* for whatever the driver wants */
112 #define ZORRO_NUM_AUTO 16
114 #endif /* _UAPI_LINUX_ZORRO_H */