OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / pcmcia-cs / draft / man4 / memory_cs.4
1 .\" Copyright (C) 1998 David A. Hinds -- dhinds@pcmcia.sourceforge.org
2 .\" memory_cs.4 1.10 1999/10/25 19:50:46
3 .\"
4 .\"O .TH MEMORY_CS 4 "1999/10/25 19:50:46" "pcmcia-cs"
5 .\"O .SH NAME
6 .\"O memory_cs \- MTD-aware PCMCIA memory card driver
7 .\"O .SH SYNOPSIS
8 .\"O .B insmod memory_cs.o
9 .\"O .RB [ pc_debug=\c
10 .\"O .IR n ]
11 .\"O .RB [ mem_speed=\c
12 .\"O .IR n ]
13 .\"O .RB [ word_width=\c
14 .\"O .IR n ]
15 .\"O .SH DESCRIPTION
16 .\"O .B Memory_cs
17 .\"O is the Card Services driver for PCMCIA memory cards, and also provides
18 .\"O direct memory access for other types of cards.
19 .\"O It provides character-mode and block-mode for accessing any card's
20 .\"O attribute and common memory address spaces, analogous to
21 .\"O .IR /dev/mem .
22 .\"O .B Memory_cs
23 .\"O will allocate a free major device number when it is loaded.  It
24 .\"O provides two types of minor devices: "direct" character-mode devices
25 .\"O for raw access a card's entire PCMCIA common and attribute memory
26 .\"O spaces, and "indirect" devices for accessing specific memory
27 .\"O partitions via an appropriate Memory Technology Driver.  The
28 .\"O bitwise layout of minor device numbers is 'ddddxarr'.  'dddd'
29 .\"O is the device number, with one card counting as one memory device.
30 .\"O 'x' is set if this is a direct-access device, 'a' is set for attribute
31 .\"O memory, and 'rr' is the region number (for indirect devices).  When
32 .\"O .B memory_cs
33 .\"O is bound to a card, it will report its major and minor device numbers
34 .\"O to
35 .\"O .BR cardmgr (8).
36 .\"O .PP
37 .\"O The default memory card initialization script creates character
38 .\"O special device files for the direct common memory and attribute memory
39 .\"O devices.  It also creates character special devices for accessing the
40 .\"O first attribute and common memory partitions, and a block device for
41 .\"O accessing the first common memory partition.  These devices have the
42 .\"O following names: 
43 .\"O .TP
44 .\"O .I /dev/mem#c
45 .\"O Common memory direct access, character special device.
46 .\"O .TP
47 .\"O .I /dev/mem#a
48 .\"O Attribute memory direct access, character special device.
49 .\"O .TP
50 .\"O .I /dev/mem#c0c
51 .\"O Common memory region 0, character special device.
52 .\"O .TP
53 .\"O .I /dev/mem#c0b
54 .\"O Common memory region 0, block special device.
55 .\"O .TP
56 .\"O .I /dev/mem#a0c
57 .\"O Attribute memory region 0, character special device.
58 .\"O .PP
59 .\"O The block special device for a card's common memory can be used to
60 .\"O create a filesystem on a card, and the device can be mounted in much
61 .\"O the same way as a floppy disk.  In some cases, you may need to
62 .\"O explicitly specify the card's capacity when creating a filesystem.
63 .\"O .PP
64 .\"O The character special devices can be used to read and write arbitrary
65 .\"O numbers of bytes to arbitrary locations.  For devices that need to be
66 .\"O explicitly erased before writing, if a write request is aligned and
67 .\"O sized on erase block boundaries for the target memory card, the driver
68 .\"O will erase the target region before writing to the card.
69 .\"O .PP
70 .\"O Since any PCMCIA card can be accessed as a memory card,
71 .\"O .B memory_cs
72 .\"O can be bound to any card regardless of function, and regardless of
73 .\"O what other drivers might also be bound to that card.  For example,
74 .\"O this driver can be bound to a card and then used to read out the
75 .\"O contents of the card's attribute memory.
76 .\"O .SH PARAMETERS
77 .\"O .TP
78 .\"O .BI pc_debug= n
79 .\"O Selects the PCMCIA debugging level.  This parameter is only available
80 .\"O if the module is compiled with debugging enabled.  A non-zero value
81 .\"O enables debugging.
82 .\"O .TP
83 .\"O .BI mem_speed= n
84 .\"O Sets the access speed of the shared memory window for direct access
85 .\"O devices, in nanoseconds.  The default is 0 (i.e., no extra wait
86 .\"O states).  Values of up to 1000 are legal.
87 .\"O .TP
88 .\"O .BI word_width= n
89 .\"O A flag indicating if direct access devices should be configured for
90 .\"O 8-bit (if 0) or 16-bit (if 1) transfers.  The default is 1 (16-bit).
91 .\"O .SH IOCTLS
92 .\"O These are defined in
93 .\"O .BR <pcmcia/memory.h> .
94 .\"O .TP
95 .\"O .B MEMGETINFO
96 .\"O This takes an argument of type
97 .\"O .BR (region_info_t\ *) ,
98 .\"O defined in
99 .\"O .BR <pcmcia/bulkmem.h> .
100 .\"O The structure will be filled in with memory region information for 
101 .\"O this device, such as access speed, erase block size, and JEDEC
102 .\"O identifiers.  
103 .\"O .TP
104 .\"O .B MEMERASE
105 .\"O This takes an argument of type
106 .\"O .BR (erase_info_t\ *) ,
107 .\"O specifying the offset and length of a memory region to be erased.  
108 .\"O .SH AUTHOR
109 .\"O David Hinds \- dhinds@pcmcia.sourceforge.org
110 .\"O .SH "SEE ALSO"
111 .\"O cardmgr(8), pcmcia(5), memory_cb(4).