Linux 5.7.6
[linux/fpc-iii.git] / arch / arm / mach-rpc / ecard.h
blob873dd3d9f274683ca7c27b82cd5e7ddc6b507c09
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * ecard.h
5 * Copyright 2007 Russell King
6 */
8 /* Definitions internal to ecard.c - for it's use only!!
10 * External expansion card header as read from the card
12 struct ex_ecid {
13 unsigned char r_irq:1;
14 unsigned char r_zero:1;
15 unsigned char r_fiq:1;
16 unsigned char r_id:4;
17 unsigned char r_a:1;
19 unsigned char r_cd:1;
20 unsigned char r_is:1;
21 unsigned char r_w:2;
22 unsigned char r_r1:4;
24 unsigned char r_r2:8;
26 unsigned char r_prod[2];
28 unsigned char r_manu[2];
30 unsigned char r_country;
32 unsigned char r_fiqmask;
33 unsigned char r_fiqoff[3];
35 unsigned char r_irqmask;
36 unsigned char r_irqoff[3];
40 * Chunk directory entry as read from the card
42 struct ex_chunk_dir {
43 unsigned char r_id;
44 unsigned char r_len[3];
45 unsigned long r_start;
46 union {
47 char string[256];
48 char data[1];
49 } d;
50 #define c_id(x) ((x)->r_id)
51 #define c_len(x) ((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16))
52 #define c_start(x) ((x)->r_start)
55 typedef enum ecard_type { /* Cards address space */
56 ECARD_IOC,
57 ECARD_MEMC,
58 ECARD_EASI
59 } card_type_t;
61 typedef enum { /* Speed for ECARD_IOC space */
62 ECARD_SLOW = 0,
63 ECARD_MEDIUM = 1,
64 ECARD_FAST = 2,
65 ECARD_SYNC = 3
66 } card_speed_t;