1.\" $NetBSD: flash.4,v 1.5 2013/08/06 19:02:57 snj Exp $ 2.\" 3.\" Copyright (c) 2010 Department of Software Engineering, 4.\" University of Szeged, Hungary 5.\" Copyright (c) 2010 Adam Hoka <ahoka@NetBSD.org> 6.\" All rights reserved. 7.\" 8.\" This code is derived from software contributed to The NetBSD Foundation 9.\" by the Department of Software Engineering, University of Szeged, Hungary 10.\" 11.\" Redistribution and use in source and binary forms, with or without 12.\" modification, are permitted provided that the following conditions 13.\" are met: 14.\" 1. Redistributions of source code must retain the above copyright 15.\" notice, this list of conditions and the following disclaimer. 16.\" 2. Redistributions in binary form must reproduce the above copyright 17.\" notice, this list of conditions and the following disclaimer in the 18.\" documentation and/or other materials provided with the distribution. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 25.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 27.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.Dd January 21, 2010 33.Dt FLASH 4 34.Os 35.Sh NAME 36.Nm flash 37.Nd device-independent flash layer 38.Sh SYNOPSIS 39.In sys/flash.h 40.Sh DESCRIPTION 41The 42.Nm 43driver provides a device-independent interface for using flash memory. 44.Pp 45The following 46.Xr ioctl 2 47operations are supported on 48.Pa /dev/flash : 49.Bl -tag -width indent 50.It Dv FLASH_BLOCK_ISBAD (struct flash_badblock_params) 51This command checks if a block is marked as bad. 52.It Dv FLASH_BLOCK_MARKBAD (struct flash_badblock_params) 53This command marks a block as bad. 54.It Dv FLASH_DUMP (struct flash_dump_params) 55This command dumps a block. 56.It Dv FLASH_ERASE_BLOCK (struct flash_erase_params) 57This command erases one or more blocks. 58.It Dv FLASH_GET_INFO (struct flash_info_params) 59This command acquires information about the flash device. 60.El 61.Sh FILES 62.Bl -tag -width /dev/flash -compact 63.It Pa /dev/flash 64.El 65.Sh SEE ALSO 66.Xr flash 9 , 67.Xr nand 9 68.Sh AUTHORS 69.An Adam Hoka Aq Mt ahoka@NetBSD.org 70