Merge remote-tracking branch 's5p/for-next'
[linux-2.6/next.git] / arch / arm / kernel / ecard.h
blob4642d436be2ad1ee28c7e03d5a29e5f5d35a4b67
1 /*
2 * ecard.h
4 * Copyright 2007 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
11 /* Definitions internal to ecard.c - for it's use only!!
13 * External expansion card header as read from the card
15 struct ex_ecid {
16 unsigned char r_irq:1;
17 unsigned char r_zero:1;
18 unsigned char r_fiq:1;
19 unsigned char r_id:4;
20 unsigned char r_a:1;
22 unsigned char r_cd:1;
23 unsigned char r_is:1;
24 unsigned char r_w:2;
25 unsigned char r_r1:4;
27 unsigned char r_r2:8;
29 unsigned char r_prod[2];
31 unsigned char r_manu[2];
33 unsigned char r_country;
35 unsigned char r_fiqmask;
36 unsigned char r_fiqoff[3];
38 unsigned char r_irqmask;
39 unsigned char r_irqoff[3];
43 * Chunk directory entry as read from the card
45 struct ex_chunk_dir {
46 unsigned char r_id;
47 unsigned char r_len[3];
48 unsigned long r_start;
49 union {
50 char string[256];
51 char data[1];
52 } d;
53 #define c_id(x) ((x)->r_id)
54 #define c_len(x) ((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16))
55 #define c_start(x) ((x)->r_start)
58 typedef enum ecard_type { /* Cards address space */
59 ECARD_IOC,
60 ECARD_MEMC,
61 ECARD_EASI
62 } card_type_t;
64 typedef enum { /* Speed for ECARD_IOC space */
65 ECARD_SLOW = 0,
66 ECARD_MEDIUM = 1,
67 ECARD_FAST = 2,
68 ECARD_SYNC = 3
69 } card_speed_t;