diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-18 22:08:58 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-18 22:08:58 -0700 |
| commit | 340fc58cdc937c07c8ed4723cc0ef0062a6cdcb3 (patch) | |
| tree | 2a77c1ec017e0bd400320d392666045eaf9c2db2 /include | |
| parent | da2def39ab0ab53286831929a4e2b691c6b63db0 (diff) | |
| parent | 0848d6f4c3afbe943a83863f16813b19cd4ded41 (diff) | |
Merge
Diffstat (limited to 'include')
| -rw-r--r-- | include/pcmcia/bulkmem.h | 148 | ||||
| -rw-r--r-- | include/pcmcia/cistpl.h | 10 | ||||
| -rw-r--r-- | include/pcmcia/cs.h | 15 | ||||
| -rw-r--r-- | include/pcmcia/cs_types.h | 3 | ||||
| -rw-r--r-- | include/pcmcia/ftl.h | 73 | ||||
| -rw-r--r-- | include/pcmcia/memory.h | 41 | ||||
| -rw-r--r-- | include/pcmcia/ss.h | 8 |
7 files changed, 15 insertions, 283 deletions
diff --git a/include/pcmcia/bulkmem.h b/include/pcmcia/bulkmem.h index c21d64d62b60..f6954220f419 100644 --- a/include/pcmcia/bulkmem.h +++ b/include/pcmcia/bulkmem.h @@ -53,155 +53,7 @@ typedef struct region_info_t { #define REGION_BAR_MASK 0xe000 #define REGION_BAR_SHIFT 13 -/* For OpenMemory */ -typedef struct open_mem_t { - u_int Attributes; - u_int Offset; -} open_mem_t; - -/* Attributes for OpenMemory */ -#define MEMORY_TYPE 0x0001 -#define MEMORY_TYPE_CM 0x0000 -#define MEMORY_TYPE_AM 0x0001 -#define MEMORY_EXCLUSIVE 0x0002 -#define MEMORY_PREFETCH 0x0008 -#define MEMORY_CACHEABLE 0x0010 -#define MEMORY_BAR_MASK 0xe000 -#define MEMORY_BAR_SHIFT 13 - -typedef struct eraseq_entry_t { - memory_handle_t Handle; - u_char State; - u_int Size; - u_int Offset; - void *Optional; -} eraseq_entry_t; - -typedef struct eraseq_hdr_t { - int QueueEntryCnt; - eraseq_entry_t *QueueEntryArray; -} eraseq_hdr_t; - -#define ERASE_QUEUED 0x00 -#define ERASE_IN_PROGRESS(n) (((n) > 0) && ((n) < 0x80)) -#define ERASE_IDLE 0xff -#define ERASE_PASSED 0xe0 -#define ERASE_FAILED 0xe1 - -#define ERASE_MISSING 0x80 -#define ERASE_MEDIA_WRPROT 0x84 -#define ERASE_NOT_ERASABLE 0x85 -#define ERASE_BAD_OFFSET 0xc1 -#define ERASE_BAD_TECH 0xc2 -#define ERASE_BAD_SOCKET 0xc3 -#define ERASE_BAD_VCC 0xc4 -#define ERASE_BAD_VPP 0xc5 -#define ERASE_BAD_SIZE 0xc6 - -/* For CopyMemory */ -typedef struct copy_op_t { - u_int Attributes; - u_int SourceOffset; - u_int DestOffset; - u_int Count; -} copy_op_t; - -/* For ReadMemory and WriteMemory */ -typedef struct mem_op_t { - u_int Attributes; - u_int Offset; - u_int Count; -} mem_op_t; - -#define MEM_OP_BUFFER 0x01 -#define MEM_OP_BUFFER_USER 0x00 -#define MEM_OP_BUFFER_KERNEL 0x01 -#define MEM_OP_DISABLE_ERASE 0x02 -#define MEM_OP_VERIFY 0x04 - -/* For RegisterMTD */ -typedef struct mtd_reg_t { - u_int Attributes; - u_int Offset; - u_long MediaID; -} mtd_reg_t; - -/* - * Definitions for MTD requests - */ - -typedef struct mtd_request_t { - u_int SrcCardOffset; - u_int DestCardOffset; - u_int TransferLength; - u_int Function; - u_long MediaID; - u_int Status; - u_int Timeout; -} mtd_request_t; - -/* Fields in MTD Function */ -#define MTD_REQ_ACTION 0x003 -#define MTD_REQ_ERASE 0x000 -#define MTD_REQ_READ 0x001 -#define MTD_REQ_WRITE 0x002 -#define MTD_REQ_COPY 0x003 -#define MTD_REQ_NOERASE 0x004 -#define MTD_REQ_VERIFY 0x008 -#define MTD_REQ_READY 0x010 -#define MTD_REQ_TIMEOUT 0x020 -#define MTD_REQ_LAST 0x040 -#define MTD_REQ_FIRST 0x080 -#define MTD_REQ_KERNEL 0x100 - -/* Status codes */ -#define MTD_WAITREQ 0x00 -#define MTD_WAITTIMER 0x01 -#define MTD_WAITRDY 0x02 -#define MTD_WAITPOWER 0x03 - -/* - * Definitions for MTD helper functions - */ - -/* For MTDModifyWindow */ -typedef struct mtd_mod_win_t { - u_int Attributes; - u_int AccessSpeed; - u_int CardOffset; -} mtd_mod_win_t; - -/* For MTDSetVpp */ -typedef struct mtd_vpp_req_t { - u_char Vpp1, Vpp2; -} mtd_vpp_req_t; - -/* For MTDRDYMask */ -typedef struct mtd_rdy_req_t { - u_int Mask; -} mtd_rdy_req_t; - -enum mtd_helper { - MTDRequestWindow, MTDModifyWindow, MTDReleaseWindow, - MTDSetVpp, MTDRDYMask -}; - -#ifdef IN_CARD_SERVICES -extern int MTDHelperEntry(int func, void *a1, void *a2); -#else -extern int MTDHelperEntry(int func, ...); -#endif - int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn); int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn); -int pcmcia_register_mtd(client_handle_t handle, mtd_reg_t *reg); -int pcmcia_register_erase_queue(client_handle_t *handle, eraseq_hdr_t *header, eraseq_handle_t *e); -int pcmcia_deregister_erase_queue(eraseq_handle_t eraseq); -int pcmcia_check_erase_queue(eraseq_handle_t eraseq); -int pcmcia_open_memory(client_handle_t *handle, open_mem_t *open, memory_handle_t *m); -int pcmcia_close_memory(memory_handle_t handle); -int pcmcia_read_memory(memory_handle_t handle, mem_op_t *req, caddr_t buf); -int pcmcia_write_memory(memory_handle_t handle, mem_op_t *req, caddr_t buf); -int pcmcia_copy_memory(memory_handle_t handle, copy_op_t *req); #endif /* _LINUX_BULKMEM_H */ diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h index a14f0b91335d..499f748c0028 100644 --- a/include/pcmcia/cistpl.h +++ b/include/pcmcia/cistpl.h @@ -607,6 +607,14 @@ int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple); int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse); int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info); -int pcmcia_replace_cis(client_handle_t handle, cisdump_t *cis); +int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); + +/* don't use outside of PCMCIA core yet */ +int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int func, tuple_t *tuple); +int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple); +int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple); +int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse); + +int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); #endif /* LINUX_CISTPL_H */ diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 871d8f1d9ac8..48eddee1e554 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h @@ -348,7 +348,6 @@ typedef struct mtd_bind_t { #define CS_EVENT_RESET_PHYSICAL 0x000200 #define CS_EVENT_CARD_RESET 0x000400 #define CS_EVENT_REGISTRATION_COMPLETE 0x000800 -#define CS_EVENT_RESET_COMPLETE 0x001000 #define CS_EVENT_PM_SUSPEND 0x002000 #define CS_EVENT_PM_RESUME 0x004000 #define CS_EVENT_INSERTION_REQUEST 0x008000 @@ -425,16 +424,12 @@ int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg int pcmcia_deregister_client(client_handle_t handle); int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config); int pcmcia_get_card_services_info(servinfo_t *info); -int pcmcia_get_first_client(client_handle_t *handle, client_req_t *req); -int pcmcia_get_next_client(client_handle_t *handle, client_req_t *req); -int pcmcia_get_window(window_handle_t *handle, int idx, win_req_t *req); int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); int pcmcia_get_status(client_handle_t handle, cs_status_t *status); int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); int pcmcia_modify_configuration(client_handle_t handle, modconf_t *mod); -int pcmcia_modify_window(window_handle_t win, modwin_t *req); int pcmcia_register_client(client_handle_t *handle, client_reg_t *req); int pcmcia_release_configuration(client_handle_t handle); int pcmcia_release_io(client_handle_t handle, io_req_t *req); @@ -449,12 +444,14 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt); int pcmcia_resume_card(struct pcmcia_socket *skt); int pcmcia_eject_card(struct pcmcia_socket *skt); int pcmcia_insert_card(struct pcmcia_socket *skt); -int pcmcia_set_event_mask(client_handle_t handle, eventmask_t *mask); int pcmcia_report_error(client_handle_t handle, error_info_t *err); -struct pci_bus *pcmcia_lookup_bus(client_handle_t handle); -/* rsrc_mgr.c */ -int pcmcia_adjust_resource_info(client_handle_t handle, adjust_t *adj); +#ifdef CONFIG_PCMCIA_OBSOLETE +int pcmcia_get_first_client(client_handle_t *handle, client_req_t *req); +int pcmcia_get_next_client(client_handle_t *handle, client_req_t *req); +int pcmcia_modify_window(window_handle_t win, modwin_t *req); +int pcmcia_set_event_mask(client_handle_t handle, eventmask_t *mask); +#endif #endif /* __KERNEL__ */ diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h index abc32897e390..3a4aec08549e 100644 --- a/include/pcmcia/cs_types.h +++ b/include/pcmcia/cs_types.h @@ -56,9 +56,6 @@ typedef struct window_t *window_handle_t; struct region_t; typedef struct region_t *memory_handle_t; -struct eraseq_t; -typedef struct eraseq_t *eraseq_handle_t; - #ifndef DEV_NAME_LEN #define DEV_NAME_LEN 32 #endif diff --git a/include/pcmcia/ftl.h b/include/pcmcia/ftl.h deleted file mode 100644 index 62a8071f2f7f..000000000000 --- a/include/pcmcia/ftl.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * ftl.h 1.8 2000/06/12 21:55:40 - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License - * at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - * the License for the specific language governing rights and - * limitations under the License. - * - * The initial developer of the original code is David A. Hinds - * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds - * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License version 2 (the "GPL"), in which - * case the provisions of the GPL are applicable instead of the - * above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use - * your version of this file under the MPL, indicate your decision by - * deleting the provisions above and replace them with the notice and - * other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file - * under either the MPL or the GPL. - */ - -#ifndef _LINUX_FTL_H -#define _LINUX_FTL_H - -typedef struct erase_unit_header_t { - u_char LinkTargetTuple[5]; - u_char DataOrgTuple[10]; - u_char NumTransferUnits; - u_int EraseCount; - u_short LogicalEUN; - u_char BlockSize; - u_char EraseUnitSize; - u_short FirstPhysicalEUN; - u_short NumEraseUnits; - u_int FormattedSize; - u_int FirstVMAddress; - u_short NumVMPages; - u_char Flags; - u_char Code; - u_int SerialNumber; - u_int AltEUHOffset; - u_int BAMOffset; - u_char Reserved[12]; - u_char EndTuple[2]; -} erase_unit_header_t; - -/* Flags in erase_unit_header_t */ -#define HIDDEN_AREA 0x01 -#define REVERSE_POLARITY 0x02 -#define DOUBLE_BAI 0x04 - -/* Definitions for block allocation information */ - -#define BLOCK_FREE(b) ((b) == 0xffffffff) -#define BLOCK_DELETED(b) (((b) == 0) || ((b) == 0xfffffffe)) - -#define BLOCK_TYPE(b) ((b) & 0x7f) -#define BLOCK_ADDRESS(b) ((b) & ~0x7f) -#define BLOCK_NUMBER(b) ((b) >> 9) -#define BLOCK_CONTROL 0x30 -#define BLOCK_DATA 0x40 -#define BLOCK_REPLACEMENT 0x60 -#define BLOCK_BAD 0x70 - -#endif /* _LINUX_FTL_H */ diff --git a/include/pcmcia/memory.h b/include/pcmcia/memory.h deleted file mode 100644 index ef87944dd4b3..000000000000 --- a/include/pcmcia/memory.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * memory.h 1.7 2000/06/12 21:55:40 - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License - * at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - * the License for the specific language governing rights and - * limitations under the License. - * - * The initial developer of the original code is David A. Hinds - * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds - * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License version 2 (the "GPL"), in which - * case the provisions of the GPL are applicable instead of the - * above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use - * your version of this file under the MPL, indicate your decision by - * deleting the provisions above and replace them with the notice and - * other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file - * under either the MPL or the GPL. - */ - -#ifndef _LINUX_MEMORY_H -#define _LINUX_MEMORY_H - -typedef struct erase_info_t { - u_long Offset; - u_long Size; -} erase_info_t; - -#define MEMGETINFO _IOR('M', 1, region_info_t) -#define MEMERASE _IOW('M', 2, erase_info_t) - -#endif /* _LINUX_MEMORY_H */ diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 7883d79b9055..1958cda29889 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h @@ -135,13 +135,6 @@ struct pccard_operations { */ struct pcmcia_socket; -typedef struct erase_busy_t { - eraseq_entry_t *erase; - client_handle_t client; - struct timer_list timeout; - struct erase_busy_t *prev, *next; -} erase_busy_t; - typedef struct io_window_t { u_int Attributes; ioaddr_t BasePort, NumPorts; @@ -185,7 +178,6 @@ struct pcmcia_socket { io_window_t io[MAX_IO_WIN]; window_t win[MAX_WIN]; struct region_t *c_region, *a_region; - erase_busy_t erase_busy; struct list_head cis_cache; u_int fake_cis_len; char *fake_cis; |
