1/******************************************************************************* 2Copyright (C) 2016 Marvell International Ltd. 3 4Marvell BSD License Option 5 6If you received this File from Marvell, you may opt to use, redistribute and/or 7modify this File under the following licensing terms. 8Redistribution and use in source and binary forms, with or without modification, 9are permitted provided that the following conditions are met: 10 11 * Redistributions of source code must retain the above copyright notice, 12 this list of conditions and the following disclaimer. 13 14 * Redistributions in binary form must reproduce the above copyright 15 notice, this list of conditions and the following disclaimer in the 16 documentation and/or other materials provided with the distribution. 17 18 * Neither the name of Marvell nor the names of its contributors may be 19 used to endorse or promote products derived from this software without 20 specific prior written permission. 21 22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 23ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 24WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 26ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 29ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 33*******************************************************************************/ 34 35/=# 36 37#langdef en-US "english" 38 39#string STR_GET_HELP_SF #language en-US "" 40".TH sf 0 "Basic SPI flash command."\r\n" 41".SH NAME\r\n" 42"Read/write data from/into SPI flash.\r\n" 43".SH SYNOPSIS\r\n" 44" \r\n" 45"sf [probe | read | readfile | write | writefile | erase | \r\n" 46" update | updatefile] \r\n" 47".SH OPTIONS\r\n" 48" \r\n" 49" Length - Number of bytes to send\r\n" 50" Address - Address in RAM to store/load data\r\n" 51" Offset - Offset from beggining of SPI flash to store/load data\r\n" 52" FilePath - Path to file to read data into or write/update data from \r\n" 53".SH EXAMPLES\r\n" 54" \r\n" 55"EXAMPLES:\r\n" 56"Check if there is response from SPI flash\r\n" 57" sf probe\r\n" 58"Read 32 bytes from 0xe00000 of SPI flash into RAM at address 0x100000\r\n" 59" sf read 0x100000 0xe00000 32\r\n" 60"Read 0x20 bytes from 0x200000 of SPI flash into RAM at address 0x300000\r\n" 61" sf read 0x300000 0x200000 0x20\r\n" 62"Erase 0x10000 bytes from offset 0x100000 of SPI flash\r\n" 63" sf erase 0x100000 0x100000\r\n" 64"Write 16 bytes from 0x200000 at RAM into SPI flash at address 0x4000000\r\n" 65" sf write 0x200000 0x4000000 16\r\n" 66"Update 100 bytes from 0x100000 at RAM in SPI flash at address 0xe00000\r\n" 67" sf update 0x100000 0xe00000 100\r\n" 68"Read 0x3000 bytes from 0x0 of SPI flash into file fs2:file.bin\r\n" 69" sf readfile fs2:file.bin 0x0 0x3000\r\n" 70"Update data in SPI flash at 0x3000000 from file Linux.efi\r\n" 71" sf update Linux.efi 0x3000000\r\n" 72".SH RETURNVALUES\r\n" 73" \r\n" 74"RETURN VALUES:\r\n" 75" SHELL_SUCCESS The action was completed as requested.\r\n" 76" SHELL_ABORTED Error while processing command\r\n" 77 78 79