aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/firmware.h23
-rw-r--r--include/linux/memstick.h132
-rw-r--r--include/linux/pci.h4
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/tifm.h2
5 files changed, 115 insertions, 47 deletions
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 33d8f2087b6e..4d10c7328d2d 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -10,7 +10,10 @@ struct firmware {
10 size_t size; 10 size_t size;
11 u8 *data; 11 u8 *data;
12}; 12};
13
13struct device; 14struct device;
15
16#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
14int request_firmware(const struct firmware **fw, const char *name, 17int request_firmware(const struct firmware **fw, const char *name,
15 struct device *device); 18 struct device *device);
16int request_firmware_nowait( 19int request_firmware_nowait(
@@ -19,4 +22,24 @@ int request_firmware_nowait(
19 void (*cont)(const struct firmware *fw, void *context)); 22 void (*cont)(const struct firmware *fw, void *context));
20 23
21void release_firmware(const struct firmware *fw); 24void release_firmware(const struct firmware *fw);
25#else
26static inline int request_firmware(const struct firmware **fw,
27 const char *name,
28 struct device *device)
29{
30 return -EINVAL;
31}
32static inline int request_firmware_nowait(
33 struct module *module, int uevent,
34 const char *name, struct device *device, void *context,
35 void (*cont)(const struct firmware *fw, void *context))
36{
37 return -EINVAL;
38}
39
40static inline void release_firmware(const struct firmware *fw)
41{
42}
43#endif
44
22#endif 45#endif
diff --git a/include/linux/memstick.h b/include/linux/memstick.h
index 334d059d6794..b7ee25888836 100644
--- a/include/linux/memstick.h
+++ b/include/linux/memstick.h
@@ -22,6 +22,8 @@ struct ms_status_register {
22 unsigned char reserved; 22 unsigned char reserved;
23 unsigned char interrupt; 23 unsigned char interrupt;
24#define MEMSTICK_INT_CMDNAK 0x0001 24#define MEMSTICK_INT_CMDNAK 0x0001
25#define MEMSTICK_INT_IOREQ 0x0008
26#define MEMSTICK_INT_IOBREQ 0x0010
25#define MEMSTICK_INT_BREQ 0x0020 27#define MEMSTICK_INT_BREQ 0x0020
26#define MEMSTICK_INT_ERR 0x0040 28#define MEMSTICK_INT_ERR 0x0040
27#define MEMSTICK_INT_CED 0x0080 29#define MEMSTICK_INT_CED 0x0080
@@ -47,13 +49,17 @@ struct ms_status_register {
47 49
48struct ms_id_register { 50struct ms_id_register {
49 unsigned char type; 51 unsigned char type;
50 unsigned char reserved; 52 unsigned char if_mode;
51 unsigned char category; 53 unsigned char category;
52 unsigned char class; 54 unsigned char class;
53} __attribute__((packed)); 55} __attribute__((packed));
54 56
55struct ms_param_register { 57struct ms_param_register {
56 unsigned char system; 58 unsigned char system;
59#define MEMSTICK_SYS_ATEN 0xc0
60#define MEMSTICK_SYS_BAMD 0x80
61#define MEMSTICK_SYS_PAM 0x08
62
57 unsigned char block_address_msb; 63 unsigned char block_address_msb;
58 unsigned short block_address; 64 unsigned short block_address;
59 unsigned char cp; 65 unsigned char cp;
@@ -90,16 +96,48 @@ struct ms_register {
90 96
91struct mspro_param_register { 97struct mspro_param_register {
92 unsigned char system; 98 unsigned char system;
99#define MEMSTICK_SYS_SERIAL 0x80
100#define MEMSTICK_SYS_PAR4 0x00
101#define MEMSTICK_SYS_PAR8 0x40
102
103 unsigned short data_count;
104 unsigned int data_address;
105 unsigned char tpc_param;
106} __attribute__((packed));
107
108struct mspro_io_info_register {
109 unsigned char version;
110 unsigned char io_category;
111 unsigned char current_req;
112 unsigned char card_opt_info;
113 unsigned char rdy_wait_time;
114} __attribute__((packed));
115
116struct mspro_io_func_register {
117 unsigned char func_enable;
118 unsigned char func_select;
119 unsigned char func_intmask;
120 unsigned char transfer_mode;
121} __attribute__((packed));
122
123struct mspro_io_cmd_register {
124 unsigned short tpc_param;
93 unsigned short data_count; 125 unsigned short data_count;
94 unsigned int data_address; 126 unsigned int data_address;
95 unsigned char cmd_param;
96} __attribute__((packed)); 127} __attribute__((packed));
97 128
98struct mspro_register { 129struct mspro_register {
99 struct ms_status_register status; 130 struct ms_status_register status;
100 struct ms_id_register id; 131 struct ms_id_register id;
101 unsigned char reserved[8]; 132 unsigned char reserved0[8];
102 struct mspro_param_register param; 133 struct mspro_param_register param;
134 unsigned char reserved1[8];
135 struct mspro_io_info_register io_info;
136 struct mspro_io_func_register io_func;
137 unsigned char reserved2[7];
138 struct mspro_io_cmd_register io_cmd;
139 unsigned char io_int;
140 unsigned char io_int_func;
103} __attribute__((packed)); 141} __attribute__((packed));
104 142
105struct ms_register_addr { 143struct ms_register_addr {
@@ -110,49 +148,55 @@ struct ms_register_addr {
110} __attribute__((packed)); 148} __attribute__((packed));
111 149
112enum { 150enum {
151 MS_TPC_READ_MG_STATUS = 0x01,
113 MS_TPC_READ_LONG_DATA = 0x02, 152 MS_TPC_READ_LONG_DATA = 0x02,
114 MS_TPC_READ_SHORT_DATA = 0x03, 153 MS_TPC_READ_SHORT_DATA = 0x03,
154 MS_TPC_READ_MG_DATA = 0x03,
115 MS_TPC_READ_REG = 0x04, 155 MS_TPC_READ_REG = 0x04,
116 MS_TPC_READ_IO_DATA = 0x05, /* unverified */ 156 MS_TPC_READ_QUAD_DATA = 0x05,
157 MS_TPC_READ_IO_DATA = 0x05,
117 MS_TPC_GET_INT = 0x07, 158 MS_TPC_GET_INT = 0x07,
118 MS_TPC_SET_RW_REG_ADRS = 0x08, 159 MS_TPC_SET_RW_REG_ADRS = 0x08,
119 MS_TPC_EX_SET_CMD = 0x09, 160 MS_TPC_EX_SET_CMD = 0x09,
120 MS_TPC_WRITE_IO_DATA = 0x0a, /* unverified */ 161 MS_TPC_WRITE_QUAD_DATA = 0x0a,
162 MS_TPC_WRITE_IO_DATA = 0x0a,
121 MS_TPC_WRITE_REG = 0x0b, 163 MS_TPC_WRITE_REG = 0x0b,
122 MS_TPC_WRITE_SHORT_DATA = 0x0c, 164 MS_TPC_WRITE_SHORT_DATA = 0x0c,
165 MS_TPC_WRITE_MG_DATA = 0x0c,
123 MS_TPC_WRITE_LONG_DATA = 0x0d, 166 MS_TPC_WRITE_LONG_DATA = 0x0d,
124 MS_TPC_SET_CMD = 0x0e 167 MS_TPC_SET_CMD = 0x0e
125}; 168};
126 169
127enum { 170enum {
128 MS_CMD_BLOCK_END = 0x33, 171 MS_CMD_BLOCK_END = 0x33,
129 MS_CMD_RESET = 0x3c, 172 MS_CMD_RESET = 0x3c,
130 MS_CMD_BLOCK_WRITE = 0x55, 173 MS_CMD_BLOCK_WRITE = 0x55,
131 MS_CMD_SLEEP = 0x5a, 174 MS_CMD_SLEEP = 0x5a,
132 MS_CMD_BLOCK_ERASE = 0x99, 175 MS_CMD_BLOCK_ERASE = 0x99,
133 MS_CMD_BLOCK_READ = 0xaa, 176 MS_CMD_BLOCK_READ = 0xaa,
134 MS_CMD_CLEAR_BUF = 0xc3, 177 MS_CMD_CLEAR_BUF = 0xc3,
135 MS_CMD_FLASH_STOP = 0xcc, 178 MS_CMD_FLASH_STOP = 0xcc,
136 MSPRO_CMD_FORMAT = 0x10, 179 MS_CMD_LOAD_ID = 0x60,
137 MSPRO_CMD_SLEEP = 0x11, 180 MS_CMD_CMP_ICV = 0x7f,
138 MSPRO_CMD_READ_DATA = 0x20, 181 MSPRO_CMD_FORMAT = 0x10,
139 MSPRO_CMD_WRITE_DATA = 0x21, 182 MSPRO_CMD_SLEEP = 0x11,
140 MSPRO_CMD_READ_ATRB = 0x24, 183 MSPRO_CMD_WAKEUP = 0x12,
141 MSPRO_CMD_STOP = 0x25, 184 MSPRO_CMD_READ_DATA = 0x20,
142 MSPRO_CMD_ERASE = 0x26, 185 MSPRO_CMD_WRITE_DATA = 0x21,
143 MSPRO_CMD_SET_IBA = 0x46, 186 MSPRO_CMD_READ_ATRB = 0x24,
144 MSPRO_CMD_SET_IBD = 0x47 187 MSPRO_CMD_STOP = 0x25,
145/* 188 MSPRO_CMD_ERASE = 0x26,
146 MSPRO_CMD_RESET 189 MSPRO_CMD_READ_QUAD = 0x27,
147 MSPRO_CMD_WAKEUP 190 MSPRO_CMD_WRITE_QUAD = 0x28,
148 MSPRO_CMD_IN_IO_DATA 191 MSPRO_CMD_SET_IBD = 0x46,
149 MSPRO_CMD_OUT_IO_DATA 192 MSPRO_CMD_GET_IBD = 0x47,
150 MSPRO_CMD_READ_IO_ATRB 193 MSPRO_CMD_IN_IO_DATA = 0xb0,
151 MSPRO_CMD_IN_IO_FIFO 194 MSPRO_CMD_OUT_IO_DATA = 0xb1,
152 MSPRO_CMD_OUT_IO_FIFO 195 MSPRO_CMD_READ_IO_ATRB = 0xb2,
153 MSPRO_CMD_IN_IOM 196 MSPRO_CMD_IN_IO_FIFO = 0xb3,
154 MSPRO_CMD_OUT_IOM 197 MSPRO_CMD_OUT_IO_FIFO = 0xb4,
155*/ 198 MSPRO_CMD_IN_IOM = 0xb5,
199 MSPRO_CMD_OUT_IOM = 0xb6,
156}; 200};
157 201
158/*** Driver structures and functions ***/ 202/*** Driver structures and functions ***/
@@ -165,7 +209,8 @@ enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE };
165#define MEMSTICK_POWER_ON 1 209#define MEMSTICK_POWER_ON 1
166 210
167#define MEMSTICK_SERIAL 0 211#define MEMSTICK_SERIAL 0
168#define MEMSTICK_PARALLEL 1 212#define MEMSTICK_PAR4 1
213#define MEMSTICK_PAR8 2
169 214
170struct memstick_host; 215struct memstick_host;
171struct memstick_driver; 216struct memstick_driver;
@@ -195,11 +240,7 @@ struct memstick_request {
195 unsigned char data_dir:1, 240 unsigned char data_dir:1,
196 need_card_int:1, 241 need_card_int:1,
197 get_int_reg:1, 242 get_int_reg:1,
198 io_type:2; 243 long_data:1;
199#define MEMSTICK_IO_NONE 0
200#define MEMSTICK_IO_VAL 1
201#define MEMSTICK_IO_SG 2
202
203 unsigned char int_reg; 244 unsigned char int_reg;
204 int error; 245 int error;
205 union { 246 union {
@@ -231,8 +272,9 @@ struct memstick_host {
231 struct mutex lock; 272 struct mutex lock;
232 unsigned int id; 273 unsigned int id;
233 unsigned int caps; 274 unsigned int caps;
234#define MEMSTICK_CAP_PARALLEL 1 275#define MEMSTICK_CAP_AUTO_GET_INT 1
235#define MEMSTICK_CAP_AUTO_GET_INT 2 276#define MEMSTICK_CAP_PAR4 2
277#define MEMSTICK_CAP_PAR8 4
236 278
237 struct work_struct media_checker; 279 struct work_struct media_checker;
238 struct class_device cdev; 280 struct class_device cdev;
@@ -270,6 +312,8 @@ int memstick_add_host(struct memstick_host *host);
270void memstick_remove_host(struct memstick_host *host); 312void memstick_remove_host(struct memstick_host *host);
271void memstick_free_host(struct memstick_host *host); 313void memstick_free_host(struct memstick_host *host);
272void memstick_detect_change(struct memstick_host *host); 314void memstick_detect_change(struct memstick_host *host);
315void memstick_suspend_host(struct memstick_host *host);
316void memstick_resume_host(struct memstick_host *host);
273 317
274void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, 318void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc,
275 struct scatterlist *sg); 319 struct scatterlist *sg);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f3165e7ac431..38eff1947750 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -389,13 +389,13 @@ struct pci_driver {
389#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) 389#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
390 390
391/** 391/**
392 * DECLARE_PCI_DEVICE_TABLE - macro used to describe a pci device table 392 * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table
393 * @_table: device table name 393 * @_table: device table name
394 * 394 *
395 * This macro is used to create a struct pci_device_id array (a device table) 395 * This macro is used to create a struct pci_device_id array (a device table)
396 * in a generic manner. 396 * in a generic manner.
397 */ 397 */
398#define DECLARE_PCI_DEVICE_TABLE(_table) \ 398#define DEFINE_PCI_DEVICE_TABLE(_table) \
399 const struct pci_device_id _table[] __devinitconst 399 const struct pci_device_id _table[] __devinitconst
400 400
401/** 401/**
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index effdb558a588..70eb3c803d47 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2184,6 +2184,7 @@
2184#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 2184#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
2185#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 2185#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368
2186#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 2186#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381
2187#define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383
2187 2188
2188#define PCI_VENDOR_ID_KORENIX 0x1982 2189#define PCI_VENDOR_ID_KORENIX 0x1982
2189#define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 2190#define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600
diff --git a/include/linux/tifm.h b/include/linux/tifm.h
index da76ed85f595..848c0f392541 100644
--- a/include/linux/tifm.h
+++ b/include/linux/tifm.h
@@ -70,9 +70,9 @@ enum {
70 70
71#define TIFM_FIFO_ENABLE 0x00000001 71#define TIFM_FIFO_ENABLE 0x00000001
72#define TIFM_FIFO_READY 0x00000001 72#define TIFM_FIFO_READY 0x00000001
73#define TIFM_FIFO_MORE 0x00000008
73#define TIFM_FIFO_INT_SETALL 0x0000ffff 74#define TIFM_FIFO_INT_SETALL 0x0000ffff
74#define TIFM_FIFO_INTMASK 0x00000005 75#define TIFM_FIFO_INTMASK 0x00000005
75#define TIFM_FIFO_SIZE 0x00000200
76 76
77#define TIFM_DMA_RESET 0x00000002 77#define TIFM_DMA_RESET 0x00000002
78#define TIFM_DMA_TX 0x00008000 78#define TIFM_DMA_TX 0x00008000