2 * Copyright (c) 2010-2012 Semihalf.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 static const char nand_help_usage[] =
33 "Usage: %s help topic=<cmd>\n"
36 "\tcmd\t- [help|read|write|erase|readoob|writeoob|info]\n"
39 static const char nand_read_usage[] =
40 "Usage: %s read dev=<gnand_device> (block|page|pos)=n [count=n]\n"
43 "\tdev\t- path to gnand device node\n"
44 "\tblock\t- starting block or\n"
45 "\tpage\t- starting page or\n"
46 "\tpos\t- starting position (in bytes, must be page-aligned)\n"
47 "\tout\t- output file (hexdump to stdout if not supplied)\n"
49 "Note that you can only specify only one of: 'block', 'page', 'pos'\n"
50 "parameters at once. 'count' parameter is meaningful in terms of used\n"
51 "unit (page, block or byte).\n";
53 static const char nand_write_usage[] =
54 "Usage: %s write dev=<gnand_device> in=<file> (block|page|pos)=n [count=n]\n"
57 "\tdev\t- path to gnand device node\n"
58 "\tin\t- path to input file which be writed to gnand\n"
59 "\tblock\t- starting block or\n"
60 "\tpage\t- starting page or\n"
61 "\tpos\t- starting position (in bytes, must be page-aligned)\n"
62 "\tcount\t- byte/page/block count\n"
66 static const char nand_erase_usage[] =
67 "Usage: %s erase dev=<gnand_device> (block|page|pos)=n [count=n]\n"
70 "\tdev\t- path to gnand device node\n"
71 "\tblock\t- starting block or\n"
72 "\tpage\t- starting page or\n"
73 "\tpos\t- starting position (in bytes, muse be block-aligned)\n"
74 "\tcount\t- byte/page/block count\n"
76 "NOTE: position and count for erase operation MUST be block-aligned\n";
78 static const char nand_read_oob_usage[] =
79 "Usage: %s readoob dev=<gnand_device> page=n [out=file] [count=n]\n"
82 "\tdev\t- path to gnand device node\n"
83 "\tpage\t- page (page) number\n"
84 "\tout\t- outut file (hexdump to stdout if not supplied)\n"
85 "\tcount\t- page count (default is 1)\n"
87 "If you supply count parameter with value other than 1, data will be\n"
88 "read from subsequent page's OOB areas\n";
90 static const char nand_write_oob_usage[] =
91 "Usage: %s writeoob dev=<gnand_device> in=<file> page=n [count=n]\n"
93 "\tdev\t- path to gnand device node\n"
94 "\tin\t- path to file containing data which will be written\n"
95 "\tpage\t- page (page) number\n"
97 "If you supply count parameter with value other than 1, data will be\n"
98 "written to subsequent page's OOB areas\n";
100 static const char nand_info_usage[] =
101 "Usage: %s info dev=<gnand_device>\n"
104 "\tdev\t- path to gnand device node\n";
106 static const char nand_stats_usage[] =
107 "Usage: %s stats dev=<gnand_device> (page|block)=<n>\n"
110 "\tdev\t- path to gnand device node\n";
112 #endif /* __USAGE_H */