• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

klaptopdaemon

bulkmem.h

Go to the documentation of this file.
00001 /*
00002  * Definitions for bulk memory services
00003  *
00004  * bulkmem.h 1.8 1998/05/10 12:10:34
00005  *
00006  * The contents of this file are subject to the Mozilla Public License
00007  * Version 1.0 (the "License"); you may not use this file except in
00008  * compliance with the License. You may obtain a copy of the License
00009  * at http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS"
00012  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00013  * the License for the specific language governing rights and
00014  * limitations under the License. 
00015  *
00016  * The initial developer of the original code is David A. Hinds
00017  * <dhinds@hyper.stanford.edu>.  Portions created by David A. Hinds
00018  * are Copyright (C) 1998 David A. Hinds.  All Rights Reserved.
00019  * bulkmem.h 1.3 1995/05/27 04:49:49
00020  */
00021 
00022 #ifndef _LINUX_BULKMEM_H
00023 #define _LINUX_BULKMEM_H
00024 
00025 /* For GetFirstRegion and GetNextRegion */
00026 typedef struct region_info_t {
00027     u_int       Attributes;
00028     u_int       CardOffset;
00029     u_int       RegionSize;
00030     u_int       AccessSpeed;
00031     u_int       BlockSize;
00032     u_int       PartMultiple;
00033     u_char      JedecMfr, JedecInfo;
00034     memory_handle_t next;
00035 } region_info_t;
00036 
00037 #define REGION_TYPE     0x0001
00038 #define REGION_TYPE_CM      0x0000
00039 #define REGION_TYPE_AM      0x0001
00040 #define REGION_PREFETCH     0x0008
00041 #define REGION_CACHEABLE    0x0010
00042 #define REGION_BAR_MASK     0xe000
00043 #define REGION_BAR_SHIFT    13
00044 
00045 /* For OpenMemory */
00046 typedef struct open_mem_t {
00047     u_int       Attributes;
00048     u_int       Offset;
00049 } open_mem_t;
00050 
00051 /* Attributes for OpenMemory */
00052 #define MEMORY_TYPE     0x0001
00053 #define MEMORY_TYPE_CM      0x0000
00054 #define MEMORY_TYPE_AM      0x0001
00055 #define MEMORY_EXCLUSIVE    0x0002
00056 #define MEMORY_PREFETCH     0x0008
00057 #define MEMORY_CACHEABLE    0x0010
00058 #define MEMORY_BAR_MASK     0xe000
00059 #define MEMORY_BAR_SHIFT    13
00060 
00061 typedef struct eraseq_entry_t {
00062     memory_handle_t Handle;
00063     u_char      State;
00064     u_int       Size;
00065     u_int       Offset;
00066     void        *Optional;
00067 } eraseq_entry_t;
00068 
00069 typedef struct eraseq_hdr_t {
00070     int         QueueEntryCnt;
00071     eraseq_entry_t  *QueueEntryArray;
00072 } eraseq_hdr_t;
00073 
00074 #define ERASE_QUEUED        0x00
00075 #define ERASE_IN_PROGRESS(n)    (((n) > 0) && ((n) < 0x80))
00076 #define ERASE_IDLE      0xff
00077 #define ERASE_PASSED        0xe0
00078 #define ERASE_FAILED        0xe1
00079 
00080 #define ERASE_MISSING       0x80
00081 #define ERASE_MEDIA_WRPROT  0x84
00082 #define ERASE_NOT_ERASABLE  0x85
00083 #define ERASE_BAD_OFFSET    0xc1
00084 #define ERASE_BAD_TECH      0xc2
00085 #define ERASE_BAD_SOCKET    0xc3
00086 #define ERASE_BAD_VCC       0xc4
00087 #define ERASE_BAD_VPP       0xc5
00088 #define ERASE_BAD_SIZE      0xc6
00089 
00090 /* For CopyMemory */
00091 typedef struct copy_op_t {
00092     u_int       Attributes;
00093     u_int       SourceOffset;
00094     u_int       DestOffset;
00095     u_int       Count;
00096 } copy_op_t;
00097 
00098 /* For ReadMemory and WriteMemory */
00099 typedef struct mem_op_t {
00100     u_int   Attributes;
00101     u_int   Offset;
00102     u_int   Count;
00103 } mem_op_t;
00104 
00105 #define MEM_OP_BUFFER       0x01
00106 #define MEM_OP_BUFFER_USER  0x00
00107 #define MEM_OP_BUFFER_KERNEL    0x01
00108 #define MEM_OP_DISABLE_ERASE    0x02
00109 #define MEM_OP_VERIFY       0x04
00110 
00111 /* For RegisterMTD */
00112 typedef struct mtd_reg_t {
00113     u_int   Attributes;
00114     u_int   Offset;
00115     u_long  MediaID;
00116 } mtd_reg_t;
00117 
00118 /*
00119  *  Definitions for MTD requests
00120  */
00121 
00122 typedef struct mtd_request_t {
00123     u_int   SrcCardOffset;
00124     u_int   DestCardOffset;
00125     u_int   TransferLength;
00126     u_int   Function;
00127     u_long  MediaID;
00128     u_int   Status;
00129     u_int   Timeout;
00130 } mtd_request_t;
00131 
00132 /* Fields in MTD Function */
00133 #define MTD_REQ_ACTION      0x003
00134 #define MTD_REQ_ERASE       0x000
00135 #define MTD_REQ_READ        0x001
00136 #define MTD_REQ_WRITE       0x002
00137 #define MTD_REQ_COPY        0x003
00138 #define MTD_REQ_NOERASE     0x004
00139 #define MTD_REQ_VERIFY      0x008
00140 #define MTD_REQ_READY       0x010
00141 #define MTD_REQ_TIMEOUT     0x020
00142 #define MTD_REQ_LAST        0x040
00143 #define MTD_REQ_FIRST       0x080
00144 #define MTD_REQ_KERNEL      0x100
00145 
00146 /* Status codes */
00147 #define MTD_WAITREQ 0x00
00148 #define MTD_WAITTIMER   0x01
00149 #define MTD_WAITRDY 0x02
00150 #define MTD_WAITPOWER   0x03
00151 
00152 /*
00153  *  Definitions for MTD helper functions
00154  */
00155 
00156 /* For MTDModifyWindow */
00157 typedef struct mtd_mod_win_t {
00158     u_int   Attributes;
00159     u_int   AccessSpeed;
00160     u_int   CardOffset;
00161 } mtd_mod_win_t;
00162 
00163 /* For MTDSetVpp */
00164 typedef struct mtd_vpp_req_t {
00165     u_char  Vpp1, Vpp2;
00166 } mtd_vpp_req_t;
00167 
00168 /* For MTDRDYMask */
00169 typedef struct mtd_rdy_req_t {
00170     u_int   Mask;
00171 } mtd_rdy_req_t;
00172 
00173 enum mtd_helper {
00174     MTDRequestWindow, MTDModifyWindow, MTDReleaseWindow,
00175     MTDSetVpp, MTDRDYMask
00176 };
00177 
00178 #ifdef IN_CARD_SERVICES
00179 extern int MTDHelperEntry(int func, void *a1, void *a2);
00180 #else
00181 extern int MTDHelperEntry(int func, ...);
00182 #endif
00183 
00184 #endif /* _LINUX_BULKMEM_H */

klaptopdaemon

Skip menu "klaptopdaemon"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal