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