.\" Copyright (c) 1995 David Hinds .\" memory_cs.4 1.3 1995/09/29 16:49:05 .\" .TH MEMORY_CS 4 "1995/09/29 16:49:05" "Stanford University" .SH NAME memory_cs \- MTD-aware PCMCIA memory card driver .SH SYNOPSIS .B insmod memory_cs.o .RB [ pc_debug=n ] .SH DESCRIPTION .B Memory_cs is the Card Services driver for memory cards that have MTD support. It provides character-mode and block-mode for accessing any card's attribute and common memory address spaces, analogous to .IR /dev/mem . .B Memory_cs will allocate a free major device number when it is loaded. The bitwise layout of minor device numbers is 'dddddarr', where 'ddddd' is the device number, 'a' is set for attribute memory, and 'rr' is the region number. When .B memory_cs is bound to a card, it will report its major and minor device numbers to .BR cardmgr (8). .PP The default memory card initialization script creates block and character special device files for a card's first attribute and common memory regions. These devices have the following names: .TP .I /dev/mem#c0c Common memory region 0, character special device. .TP .I /dev/mem#c0b Common memory region 0, block special device. .TP .I /dev/mem#a0c Attribute memory region 0, character special device. .TP .I /dev/mem#a0b Attribute memory region 0, block special device. .PP Also, .I /dev/mem#c is linked to .I /dev/mem#c0c and .I /dev/mem#b is linked to .IR /dev/mem#c0b . .PP The block special device for a card's common memory can be used to create a filesystem on a card, and the device can be mounted in much the same way as a floppy disk. You may need to explicitly specify the card's capacity when creating a filesystem. .PP The character special devices can be used to read and write arbitrary numbers of bytes to arbitrary locations. For devices that need to be explicitly erased before writing, if a write request is aligned and sized on erase block boundaries for the target memory card, the driver will erase the target region before writing to the card. .PP Since any PCMCIA card can be accessed as a memory card, .B memory_cs can be bound to any card regardless of function, and regardless of what other drivers might also be bound to that card. For example, this driver can be bound to a card and then used to read out the contents of the card's attribute memory. .SH PARAMETERS .TP .B pc_debug=n Selects the PCMCIA debugging level. This parameter is only available if the module is compiled with debugging enabled. A non-zero value enables debugging. .SH AUTHOR David Hinds \- dhinds@allegro.stanford.edu .SH "SEE ALSO" cardmgr(8), pcmcia(5).